OSDN Git Service

android-x86/frameworks-base.git
7 years agoMerge "Switch ConfigUpdater to the new version of timezone updater code"
Neil Fuller [Wed, 11 Jan 2017 14:46:46 +0000 (14:46 +0000)]
Merge "Switch ConfigUpdater to the new version of timezone updater code"

7 years agoMerge "Don't offer the BT sharing option to the user if BT is disallowed."
Treehugger Robot [Wed, 11 Jan 2017 14:40:05 +0000 (14:40 +0000)]
Merge "Don't offer the BT sharing option to the user if BT is disallowed."

7 years agoMerge "Refactor RFCOMM / BluetoothSocket usage of LocalSocket"
Neil Fuller [Wed, 11 Jan 2017 13:27:09 +0000 (13:27 +0000)]
Merge "Refactor RFCOMM / BluetoothSocket usage of LocalSocket"

7 years agoMerge "Cleanup code given PATCHOAT_FOR_RELOCATION has been removed."
Treehugger Robot [Wed, 11 Jan 2017 10:28:16 +0000 (10:28 +0000)]
Merge "Cleanup code given PATCHOAT_FOR_RELOCATION has been removed."

7 years agoCleanup code given PATCHOAT_FOR_RELOCATION has been removed.
Richard Uhler [Thu, 8 Dec 2016 10:33:09 +0000 (10:33 +0000)]
Cleanup code given PATCHOAT_FOR_RELOCATION has been removed.

Test: make, device boots, installed an app
Test: adb shell cmd package compile -m speed|speed-profile <app>
Bug: 33192586
Change-Id: I8ef7d4926773586251fedf8a7737a8005f119859

7 years agoMerge "Prepare UpstreamNetworkMonitor for extraction"
Erik Kline [Wed, 11 Jan 2017 08:29:17 +0000 (08:29 +0000)]
Merge "Prepare UpstreamNetworkMonitor for extraction"

7 years agoPrepare UpstreamNetworkMonitor for extraction
Erik Kline [Tue, 10 Jan 2017 08:37:54 +0000 (17:37 +0900)]
Prepare UpstreamNetworkMonitor for extraction

Test: as follows:
    - built (bullhead)
    - flashed
    - booted
    - runtest frameworks-net
    - tested basic wifi-to-mobile tethering (no DUN)
Bug: 32163131
Change-Id: Id0b2497f231af5e79ae3bbf42c73bc78031b6fa3

7 years agoMerge "Zygote: Add fdsToIgnore"
Treehugger Robot [Wed, 11 Jan 2017 02:20:36 +0000 (02:20 +0000)]
Merge "Zygote: Add fdsToIgnore"

7 years agoMerge changes I5b94a8f0,Ie6cdd846,Ie6b5f5e6,Ib962edf6,I9d779b2d, ...
Treehugger Robot [Wed, 11 Jan 2017 02:15:28 +0000 (02:15 +0000)]
Merge changes I5b94a8f0,Ie6cdd846,Ie6b5f5e6,Ib962edf6,I9d779b2d, ...

* changes:
  Add an extra debug flag to BackgroundDexOptimizer
  Some refactoring in BackgroundDexOptService.
  Do not try to resolve realpath in DexManager.
  Log DexManager realpath errors only in debug mode.
  Record data about dex files use on disk
  Add logic for recording dex files use on disk

7 years agoMerge "Delete old WifiNotificationController strings."
Treehugger Robot [Wed, 11 Jan 2017 02:12:48 +0000 (02:12 +0000)]
Merge "Delete old WifiNotificationController strings."

7 years agoMerge "Moved isCallerActiveScorer() to the score service."
Treehugger Robot [Wed, 11 Jan 2017 01:30:02 +0000 (01:30 +0000)]
Merge "Moved isCallerActiveScorer() to the score service."

7 years agoMerge changes I559eb049,I52425b84
Treehugger Robot [Wed, 11 Jan 2017 01:06:56 +0000 (01:06 +0000)]
Merge changes I559eb049,I52425b84

* changes:
  DO NOT MERGE Captive portals: login activity probes like NetworkMonitor
  DO NOT MERGE Logging improvements in CaptivePortalLoginActivity

7 years agoMerge changes I1eaab5ea,I42928da8
Treehugger Robot [Wed, 11 Jan 2017 01:02:05 +0000 (01:02 +0000)]
Merge changes I1eaab5ea,I42928da8

* changes:
  DO NOT MERGE Captive portal systel log improvements
  DO NOT MERGE Fix flaky IpPrefixTest.

7 years agoMerge "Fix a use-of-uninitialized-value warning."
John Reck [Wed, 11 Jan 2017 00:57:34 +0000 (00:57 +0000)]
Merge "Fix a use-of-uninitialized-value warning."

7 years agoZygote: Add fdsToIgnore
Andreas Gampe [Thu, 5 Jan 2017 20:45:58 +0000 (12:45 -0800)]
Zygote: Add fdsToIgnore

Add file descriptors that should be ignored in the file descriptor
table check.

Use this to ignore the pipe file descriptors when starting an app
with invoke-with (wrapper).

Bug: 32607405
Test: m
Test: Device boots
Test: Apps start
Test: adb root && adb shell setprop wrap.com.android.calculator2 logwrapper && adb shell am start -S -n com.android.calculator2/.Calculator
Change-Id: I4a30dfc9382d3172cc815bd41b17a123799354f6

7 years agoAdd an extra debug flag to BackgroundDexOptimizer
Calin Juravle [Thu, 22 Dec 2016 16:50:05 +0000 (18:50 +0200)]
Add an extra debug flag to BackgroundDexOptimizer

This makes testing/debugging the job a bit easier.

Test: device boots, packages get compiled
Bug: 32871170

(cherry picked from commit a50d58e22630cd651a815381639e70476991bdbf)

Change-Id: I5b94a8f0b3bbf9075dcaecf028aaf79a21aaab7b

7 years agoSome refactoring in BackgroundDexOptService.
Calin Juravle [Thu, 22 Dec 2016 16:50:05 +0000 (18:50 +0200)]
Some refactoring in BackgroundDexOptService.

Extract postOta/idle optimizations in their own method.
In preparation for adding the logic to handle secondary dex files.

Test: device boots, pacakges get compiled
Bug: 32871170

(cherry picked from commit be6a71a0b3f369843a26c91dd5123d0499f00e7e)

Change-Id: Ie6cdd8461e7214f5de68bc9172f4171ebf72aa39

7 years agoDo not try to resolve realpath in DexManager.
Calin Juravle [Thu, 22 Dec 2016 16:47:05 +0000 (18:47 +0200)]
Do not try to resolve realpath in DexManager.

PM should already provide the real path of the application directory.

Test: runtest -x .../DexManagerTests.java

Bug: 33807524
Bug: 32871170

(cherry picked from commit c066205cea051c6d9f386188b9cb426c03dbee2d)

Change-Id: Ie6b5f5e61d08710e7ef7d3149b7b13cc7d03a242

7 years agoLog DexManager realpath errors only in debug mode.
Calin Juravle [Thu, 22 Dec 2016 14:31:19 +0000 (14:31 +0000)]
Log DexManager realpath errors only in debug mode.

Test: runtest -x .../DexManagerTests.java
Bug: 33807524

(cherry picked from commit bb9ed1f3c93f0267fa97d6cbeb58ecd1de41d795)

Change-Id: Ib962edf67ce7f5b9b93c9bc6855675e00e025810

7 years agoRecord data about dex files use on disk
Calin Juravle [Fri, 16 Dec 2016 16:22:00 +0000 (16:22 +0000)]
Record data about dex files use on disk

Add DexManager to keep track of how dex files are used.

Every time a dex file is loaded, PackageManager will notify DexManager
which will process the load. The DexManager will look up what package
owns the dex file and record its use in package-dex-usage.list (through
PackageDexUsage).

Test: device boots, package-dex-usage.list is created and contains valid data, after device reboot the list is succesfully read from disk.
runtest -x .../PackageDexUsageTests.java
runtest -x .../DexManagerTests.java

Bug: 32871170

(cherry picked from commit b8976d8f22fecaa9ed39276d9d8ded17d35b51a6)

Change-Id: I9d779b2d39814d7c54fc7a888df93d403a001df5

7 years agoAdd logic for recording dex files use on disk
Calin Juravle [Thu, 1 Dec 2016 17:53:07 +0000 (17:53 +0000)]
Add logic for recording dex files use on disk

Add PackageDexUsage to handle the I/O operations of dex usage data. It
is responsible to encode, save and load dex

Test: runtest -x .../PackageDexUsageTests.java

Bug: 32871170

(cherry picked from commit 0318162abcbd07a0472989df43e00e353fac731b)

Change-Id: I6d483d480d62aa14cb1663560fd88092469a2835

7 years agoMoved isCallerActiveScorer() to the score service.
Jeremy Joslin [Tue, 10 Jan 2017 00:22:20 +0000 (16:22 -0800)]
Moved isCallerActiveScorer() to the score service.

Implemented isCallerActiveScorer() in the NetworkScoreService to make
it more efficient (no need to query PM). Exposed the call as a new
internal API on NetworkScoreManager and deprecated the call on
NetworkScorerAppManager.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 33781558
Change-Id: I8ad232f8ef34b6e2f155ebb232e64300303300f0
Merged-In: I0e2142af95b068d322343f7c9362ac53d46b545e

7 years agoFix a use-of-uninitialized-value warning.
George Burgess IV [Tue, 10 Jan 2017 23:33:57 +0000 (15:33 -0800)]
Fix a use-of-uninitialized-value warning.

This warning was generated by the static analyzer:
warning: The left expression of the compound assignment is an
uninitialized value. The computed value will also be garbage
        *mDirtyMask |= animator->dirtyMask();

This can be fixed by initializing dirtyMask before using it in
AnimateFunctor.

Bug: None
Test: Static analyzer no longer complains about this.
Change-Id: I892749079cf93a012f1bed059a3f0c8bbaed9d7e

7 years agoMerge "Fix naming of key"
Jordan Liu [Tue, 10 Jan 2017 22:51:49 +0000 (22:51 +0000)]
Merge "Fix naming of key"

7 years agoMerge changes Ia1f2535c,I9ca93f31,If5b53f6f,I119e0bfc
Treehugger Robot [Tue, 10 Jan 2017 22:21:01 +0000 (22:21 +0000)]
Merge changes Ia1f2535c,I9ca93f31,If5b53f6f,I119e0bfc

* changes:
  Dynamically add the webview_zygote's preloaded APK to the zygote FD whitelist.
  Split core/jni/fd_utils-inl.h into a .h/.cpp pair.
  Zygote: Additional whitelisting for legacy devices.
  Zygote: Additional whitelists for runtime overlay / other static resources.

7 years agoMerge "Cleanup test method names."
Treehugger Robot [Tue, 10 Jan 2017 22:18:56 +0000 (22:18 +0000)]
Merge "Cleanup test method names."

7 years agoMerge "Remove unused variable."
Treehugger Robot [Tue, 10 Jan 2017 21:15:01 +0000 (21:15 +0000)]
Merge "Remove unused variable."

7 years agoCleanup test method names.
Jeremy Joslin [Tue, 10 Jan 2017 16:53:02 +0000 (08:53 -0800)]
Cleanup test method names.

Renamed some test methods to reflect the proper permission.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 1764042
Change-Id: Ia7db8826ad18c3b8f119aa063cb2c7b3793a9d17
Merged-In: I5551ddcb411432c6aeb14c03d9a284aa68f1bd1b

7 years agoDynamically add the webview_zygote's preloaded APK to the zygote FD whitelist.
Robert Sesek [Fri, 2 Dec 2016 22:27:50 +0000 (17:27 -0500)]
Dynamically add the webview_zygote's preloaded APK to the zygote FD whitelist.

This refactors the whitelist to be a class, rather than just a static C array.
The whitelist can then be augmented dynamically when the package path is known
in the webview_zygote.

Test: m
Test: sailfish boots
Test: Enable Multi-process WebView in developer options, perform a search in GSA.

Bug: 21643067
Change-Id: Ia1f2535c7275b42b309631b4fe7859c30cbf7309
(cherry picked from commit 061ee3088a79ab0e07d37d1c0897d51422f29c4e)

7 years agoSplit core/jni/fd_utils-inl.h into a .h/.cpp pair.
Robert Sesek [Fri, 16 Dec 2016 19:02:31 +0000 (14:02 -0500)]
Split core/jni/fd_utils-inl.h into a .h/.cpp pair.

(cherry picked from commit 44afe8be8f654192dc436a9c4238a925c22b14bf)

Test: m
Test: sailfish boots

Change-Id: I9ca93f31f6c20b702b2207333a9d56f6592630b0

7 years agoZygote: Additional whitelisting for legacy devices.
Narayan Kamath [Mon, 7 Nov 2016 19:59:29 +0000 (19:59 +0000)]
Zygote: Additional whitelisting for legacy devices.

On M and below, we provide a blanket whitelist for all files under
"/vendor/zygote_whitelist". This path is whitelisted purely to allow
this patch to be applied easily on legacy devices and configurations.

Note that this does not amount to a loosening of our security policy
because whitelisted files are reopened anyway.

(cherry picked from commit 5e2f7c6229d7191183888d685b57a7d0a2835fce)

Bug: 32691930
Test: manual
Change-Id: If5b53f6f0a707f8d36603c09bfd3f72dbfbbbb99

7 years agoRemove unused variable.
Tao Wu [Fri, 11 Nov 2016 18:42:02 +0000 (10:42 -0800)]
Remove unused variable.

Code search show nobody referenced it and aosp image still compiles after
remove it.

Test: make -j18 systemimage userdataimage ramdisk

Change-Id: I3e37ea590610091b938296c999dceb3caf919906
Merged-In: I3e37ea590610091b938296c999dceb3caf919906
Signed-off-by: Tao Wu <lepton@google.com>
7 years agoZygote: Additional whitelists for runtime overlay / other static resources.
Narayan Kamath [Fri, 23 Sep 2016 08:07:11 +0000 (09:07 +0100)]
Zygote: Additional whitelists for runtime overlay / other static resources.

Partially cherry picked from commit 1c15c635785c64a.

These files are safe to reopen for the same reason that files in
/system/framework are. They're regular files and will not change after
the first zygote fork.

(cherry picked from commit 25cd01cc69fcad34756b00e52a79c0c54178f2e6)

Bug: 32618130
Test: m
Change-Id: I119e0bfcbf397cb331064adf148d92a5cd3ea92f

7 years agoDelete old WifiNotificationController strings.
Stephen Chen [Tue, 13 Dec 2016 22:44:18 +0000 (14:44 -0800)]
Delete old WifiNotificationController strings.

Bug: 33355924
Test: make

Change-Id: Ia7065549168b4f342760e2f77efe4d9eb1851eb9

7 years agoDon't offer the BT sharing option to the user if BT is disallowed.
Lenka Trochtova [Mon, 9 Jan 2017 18:48:51 +0000 (19:48 +0100)]
Don't offer the BT sharing option to the user if BT is disallowed.

Disable BluetoothOppLauncherActivity component if the
UserManager#BLUETOOTH_DISALLOWED user restriction is set.

Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases --test com.android.cts.devicepolicy.DeviceOwnerTest#testBluetoothRestriction

Bug: 32895060

Change-Id: I4316843b2858aefa750f12a8a0e940424aa21a10

7 years agoMerge "Methods to calculate user and external disk usage."
Jeff Sharkey [Tue, 10 Jan 2017 04:30:46 +0000 (04:30 +0000)]
Merge "Methods to calculate user and external disk usage."

7 years agoMerge "Support EGL_KHR_partial_update without EGL_EXT_buffer_age"
Treehugger Robot [Tue, 10 Jan 2017 00:26:42 +0000 (00:26 +0000)]
Merge "Support EGL_KHR_partial_update without EGL_EXT_buffer_age"

7 years agoMethods to calculate user and external disk usage.
Jeff Sharkey [Mon, 9 Jan 2017 00:06:58 +0000 (17:06 -0700)]
Methods to calculate user and external disk usage.

Add method to calculate user disk usage, which will be faster than
making a Binder call for every single appId under a user.  Add method
to calculate external disk usage, which uses file extensions to track
usage with "audio", "video", and "images" categories.

Start measuring internal and external storage space separately; new
GIDs are coming in a future CL.  Pass down all package names, inodes,
and code paths, since shared UIDs host more than one.

Test: builds, boots, stats are consistent
Bug: 2794881732206268
Change-Id: Icbb82a30fe711ef05e9a16bb1dc740dc943a9ddc

7 years agoMerge "Cherrypick: Create ScoredNetwork Badging API changes."
Treehugger Robot [Mon, 9 Jan 2017 23:39:47 +0000 (23:39 +0000)]
Merge "Cherrypick: Create ScoredNetwork Badging API changes."

7 years agoMerge "Expose fields in WifiConfiguration."
Treehugger Robot [Mon, 9 Jan 2017 23:33:24 +0000 (23:33 +0000)]
Merge "Expose fields in WifiConfiguration."

7 years agoSupport EGL_KHR_partial_update without EGL_EXT_buffer_age
John Reck [Tue, 27 Sep 2016 21:45:28 +0000 (14:45 -0700)]
Support EGL_KHR_partial_update without EGL_EXT_buffer_age

Bug: 31334677
Test: manual && hwuimacro --onscreen partialdamage

Change-Id: I9b346b4053ec12c8a78a143a4dc0e708c44888a2

7 years agoMerge "Moved implicit intents into explicit intents"
Treehugger Robot [Mon, 9 Jan 2017 22:02:36 +0000 (22:02 +0000)]
Merge "Moved implicit intents into explicit intents"

7 years agoCherrypick: Create ScoredNetwork Badging API changes.
Sundeep Ghuman [Fri, 16 Dec 2016 21:30:45 +0000 (13:30 -0800)]
Cherrypick: Create ScoredNetwork Badging API changes.

Defines an attribute bundles key to hold the badging curve, the
enums for badge values, and an API to retrieve a badge for a
specific RSSI.

OCL: ag/1727147
Bug: 33457699
Test: Unit tests
Change-Id: If9e8a60c4670b51c395fb501f55ddece8a72981e
Merged-In: If9e8a60c4670b51c395fb501f55ddece8a72981e

7 years agoMerge "Make REQUEST_NETWORK_SCORES signature only."
Treehugger Robot [Mon, 9 Jan 2017 20:51:33 +0000 (20:51 +0000)]
Merge "Make REQUEST_NETWORK_SCORES signature only."

7 years agoMerge "Check for REQUEST_NETWORK_SCORES instead of BROADCAST_NETWORK_PRIVILEGED."
Treehugger Robot [Mon, 9 Jan 2017 20:45:51 +0000 (20:45 +0000)]
Merge "Check for REQUEST_NETWORK_SCORES instead of BROADCAST_NETWORK_PRIVILEGED."

7 years agoMake REQUEST_NETWORK_SCORES signature only.
Jeremy Joslin [Fri, 6 Jan 2017 22:38:57 +0000 (14:38 -0800)]
Make REQUEST_NETWORK_SCORES signature only.

There are no use cases where it's needed by a privileged app today.

Test: Built and ran
BUG: 33752149
Change-Id: Ia63a86eca1f60644d25f037d395a08c541a06a08
Merged-In: Iae689e878fdb60b506536c918079a4fcff527a71

7 years agoCheck for REQUEST_NETWORK_SCORES instead of BROADCAST_NETWORK_PRIVILEGED.
Jeremy Joslin [Fri, 6 Jan 2017 22:36:54 +0000 (14:36 -0800)]
Check for REQUEST_NETWORK_SCORES instead of BROADCAST_NETWORK_PRIVILEGED.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
BUG: 33752149
Change-Id: I3dd352c98bbc34b128ab9c2a28f81e1261ae2669
Merged-In: I7d91fa9a4f6ef4f9170c6af98567ce443c805e74

7 years agoExpose fields in WifiConfiguration.
Amin Shaikh [Fri, 6 Jan 2017 18:00:33 +0000 (10:00 -0800)]
Expose fields in WifiConfiguration.

hasNoInternetAccess and isNoInternetAccessExpected are key signals needed
to determine whether Wi-Fi should be woken up for a given saved network.

Test: make
Bug: 33224312
Change-Id: I3f48735ebae72e15fbdb0a3057cf7c71fb0cc307
Merged-In: I3f48735ebae72e15fbdb0a3057cf7c71fb0cc307

7 years agoMerge "StorageManager: Improve exception handling"
Treehugger Robot [Mon, 9 Jan 2017 16:48:35 +0000 (16:48 +0000)]
Merge "StorageManager: Improve exception handling"

7 years agoStorageManager: Improve exception handling
Alex Naidis [Wed, 4 Jan 2017 17:52:36 +0000 (18:52 +0100)]
StorageManager: Improve exception handling

When "getPrimaryStorageSize" provides a path
to "readLong", the option that the path
doesn't exist is expected, since it tries
all paths from "INTERNAL_STORAGE_SIZE_PATHS"
until there is success.

This patch makes us catch the "FileNotFoundException"
and "NumberFormatException" seperately.

For the above reason a "FileNotFoundException"
is now treated as an information only.
The "NumberFormatException" and other exceptions
are now treated as error since those are not
expected to happen.

Change-Id: I5316f9c3108e36c31b27dc5df8bf8ac4d4257629
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
7 years agoMerge "Track libcore/jsr-166 update"
Przemyslaw Szczepaniak [Mon, 9 Jan 2017 11:08:34 +0000 (11:08 +0000)]
Merge "Track libcore/jsr-166 update"

7 years agoTrack libcore/jsr-166 update
Przemyslaw Szczepaniak [Thu, 29 Dec 2016 14:28:51 +0000 (14:28 +0000)]
Track libcore/jsr-166 update

No functional changes.

Update after the switch from custom to openJdk-based implementation of
java.util.concurrent.CopyOnWriteArrayList class.
Tracks libcore commit 29957558cf0db700bfaae360a80c42dc3871d0e5.

Test: make -j 32
Bug: 30860904
Change-Id: I4435bc1fb5ef9fc4ee5f882370073ba8ce2bcfba

7 years agoMerge "Dumps total size of primary storage."
Nick Kralevich [Sun, 8 Jan 2017 14:53:08 +0000 (14:53 +0000)]
Merge "Dumps total size of primary storage."

7 years agoMerge "wifi: hotspot2: Passpoint configuration APIs update"
Treehugger Robot [Sun, 8 Jan 2017 06:51:51 +0000 (06:51 +0000)]
Merge "wifi: hotspot2: Passpoint configuration APIs update"

7 years agoDumps total size of primary storage.
Felipe Leme [Tue, 11 Oct 2016 00:12:20 +0000 (17:12 -0700)]
Dumps total size of primary storage.

BUG: 32069168
Test: manual verification

(cherry picked from commit 281389ac5475e483d10a2e8aa31195b9e9875246)

Change-Id: If5dee52a99c03a00dada22736c09d953dc0b66d1

7 years agoMerge "[AWARE] Remove reason from discovery session terminate callback"
Etan Cohen [Sat, 7 Jan 2017 20:05:37 +0000 (20:05 +0000)]
Merge "[AWARE] Remove reason from discovery session terminate callback"

7 years agoMerge "[AWARE] Simplify Wi-Fi Aware API namespace"
Etan Cohen [Sat, 7 Jan 2017 18:12:33 +0000 (18:12 +0000)]
Merge "[AWARE] Simplify Wi-Fi Aware API namespace"

7 years agoMoved implicit intents into explicit intents
Jack Yu [Thu, 5 Jan 2017 23:19:31 +0000 (15:19 -0800)]
Moved implicit intents into explicit intents

Moved two intents SMS_EMERGENCY_CB_RECEIVED_ACTION and
SMS_SERVICE_CATEGORY_PROGRAM_DATA_RECEIVED_ACTION are
now sent to the default cell broadcast receiver only.

The default cell broadcast receiver can be changed through
the resource overlay. Otherwise it is default to
com.android.cellbroadcastreceiver

bug: 33783447
Test: manual
Change-Id: I64db3b05400513bacf278ff9f93236495860803e
Merged-In: I64db3b05400513bacf278ff9f93236495860803e

7 years agoMerge "DefaultPermissionGrantPolicy: Pass correct arguments"
Treehugger Robot [Sat, 7 Jan 2017 01:33:18 +0000 (01:33 +0000)]
Merge "DefaultPermissionGrantPolicy: Pass correct arguments"

7 years agoMerge "Add Bluetooth Codec selection UI to the Developer Options"
Treehugger Robot [Sat, 7 Jan 2017 01:19:33 +0000 (01:19 +0000)]
Merge "Add Bluetooth Codec selection UI to the Developer Options"

7 years ago[AWARE] Remove reason from discovery session terminate callback
Etan Cohen [Sat, 24 Dec 2016 20:44:59 +0000 (12:44 -0800)]
[AWARE] Remove reason from discovery session terminate callback

Only valid reason is per request (destroy or timeout/count).

Bug: 32670068
Test: unit tests & integration tests (sl4a) passing
Change-Id: I85d417442e26a16d7f09d6d2d4cbb8ae7a9eba7e

7 years ago[AWARE] Simplify Wi-Fi Aware API namespace
Etan Cohen [Mon, 19 Dec 2016 23:54:51 +0000 (15:54 -0800)]
[AWARE] Simplify Wi-Fi Aware API namespace

Simplify Wi-fi Aware API namespace. Rely on project and remove WifiAware
prefix from most classes.

(pure rename operation: no functional changes)

Bug: 31470256
Test: unit-tests + integration (sl4a) tests.
Change-Id: I38b8137c1730c8f40c482c6770caafcaeafd5c46

7 years agoAdd Bluetooth Codec selection UI to the Developer Options
Pavlin Radoslavov [Thu, 5 Jan 2017 18:46:08 +0000 (10:46 -0800)]
Add Bluetooth Codec selection UI to the Developer Options

Test: A2DP streaming to headsets and manual UI interaction
Bug: 30958229
Change-Id: I88f6efedf1c89b524c863543135ef7be9b7e1a7c

7 years agoDefaultPermissionGrantPolicy: Pass correct arguments
Alex Naidis [Tue, 3 Jan 2017 17:24:57 +0000 (18:24 +0100)]
DefaultPermissionGrantPolicy: Pass correct arguments

After parsing the xml files in the "default-permissions"
system, we are passing the arguments in the wrong order.

The method we are targeting is:
private void grantRuntimePermissionsLPw(PackageParser.Package pkg, Set<String> permissions,
            boolean systemFixed, boolean isDefaultPhoneOrSms, int userId) {

However we are passing our argument for "systemFixed"
to "isDefaultPhoneOrSms" and the other way around too.

This patch fixes it by using the version of the method
which takes 4 arguments and sets "isDefaultPhoneOrSms"
as false.

Change-Id: I3604a5d6045aadcd91b6dd3f6f1b47b561403b23
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
7 years agowifi: hotspot2: Passpoint configuration APIs update
Peter Qiu [Thu, 15 Dec 2016 23:38:56 +0000 (15:38 -0800)]
wifi: hotspot2: Passpoint configuration APIs update

- renamed addPasspointConfiguration to addOrUpdatePasspointConfiguration
  to match the implementation of the API
- updated getPasspointConfigurations to return an empty list instead of
  a null when no configuration is installled

Bug: 33587910
Test: frameworks/base/wifi/tests/runtests.sh
Change-Id: Id40185edb08910c01454c44b77957e2d5c0df722

7 years agoMerge "Unversion NDK stub libraries."
Treehugger Robot [Fri, 6 Jan 2017 20:44:18 +0000 (20:44 +0000)]
Merge "Unversion NDK stub libraries."

7 years agoUnversion NDK stub libraries.
Dan Albert [Fri, 6 Jan 2017 00:01:14 +0000 (16:01 -0800)]
Unversion NDK stub libraries.

The system versions of these libraries aren't versioned yet.

Bug: https://github.com/android-ndk/ndk/issues/278
Test: make ndk
Change-Id: I74e988be8f60f8728a0bfa7360091cbd9f5b1186

7 years agoMerge "nfc: Adds NFC_PAYMENT_DEFAULT_COMPONENT to the backed up settings."
Ruchi Kandoi [Fri, 6 Jan 2017 18:49:44 +0000 (18:49 +0000)]
Merge "nfc: Adds NFC_PAYMENT_DEFAULT_COMPONENT to the backed up settings."

7 years agonfc: Adds NFC_PAYMENT_DEFAULT_COMPONENT to the backed up settings.
Ruchi Kandoi [Thu, 29 Dec 2016 21:31:43 +0000 (13:31 -0800)]
nfc: Adds NFC_PAYMENT_DEFAULT_COMPONENT to the backed up settings.

Bug: 32881476
Test: Manual; backup, change settings, restore

Change-Id: Ibc31b23f632c50a2c7120734fc96e7d855df062e
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
7 years agoRefactor RFCOMM / BluetoothSocket usage of LocalSocket
Neil Fuller [Fri, 6 Jan 2017 11:29:15 +0000 (11:29 +0000)]
Refactor RFCOMM / BluetoothSocket usage of LocalSocket

LocalSocket is used by BluetoothSocket. BluetoothSocket
passes a pre-created file descriptor to LocalSocket that
is then given to the LocalSocketImpl.

Commit b08c7bc0bdc48ae95be2697ca27ea89a9dd92c3e broke the
behavior. Commit 7a8c36aa4e6a1b5e48f0ee5a787f10bcfece7587
put in a minimal fix.

This change tidies up LocalSocket and associated classes
and replaces a specialist constructor with a factory method
to highlight the special case. While there an unnecessary
exception has been removed.

Bug: 34111534
Test: Boot device
Test: vogar --mode app_process tests/tests/net/src/android/net/cts/LocalSocketTest.java
Change-Id: I4ba2f2d9ea361a950ff8bc8d64fc800d998c3210

7 years agoMerge "Fix LOCAL_SDK_VERSION of 3 multidex apks"
Yohann Roussel [Fri, 6 Jan 2017 09:29:25 +0000 (09:29 +0000)]
Merge "Fix LOCAL_SDK_VERSION of 3 multidex apks"

7 years agoMerge "Prevent LocalSocket from creating an fd if fd is already there"
Treehugger Robot [Fri, 6 Jan 2017 01:29:46 +0000 (01:29 +0000)]
Merge "Prevent LocalSocket from creating an fd if fd is already there"

7 years agoMerge "HwBinder: get/register checked exceptions."
Treehugger Robot [Fri, 6 Jan 2017 00:58:17 +0000 (00:58 +0000)]
Merge "HwBinder: get/register checked exceptions."

7 years agoMerge "Fix stack-buffer-overflow detected by AddressSanitizer."
Treehugger Robot [Fri, 6 Jan 2017 00:17:00 +0000 (00:17 +0000)]
Merge "Fix stack-buffer-overflow detected by AddressSanitizer."

7 years agoMerge "Fix NetworkScorerAppManager#isCallerActiveScorer."
Treehugger Robot [Thu, 5 Jan 2017 23:57:53 +0000 (23:57 +0000)]
Merge "Fix NetworkScorerAppManager#isCallerActiveScorer."

7 years agoPrevent LocalSocket from creating an fd if fd is already there
Ajay Panicker [Thu, 5 Jan 2017 23:38:52 +0000 (15:38 -0800)]
Prevent LocalSocket from creating an fd if fd is already there

Any LocalSocket created with a FileDescriptor will throw IOExceptions
when performing most opperations due to the fact that the LocalSocket
tries to create an implementation but fails since there is a FileDescriptor
already set.

Bug: 34095140
Test: Setup using tap&go
Change-Id: Ie8f50def6156c16617697d939d6c0ab570281642

7 years agoFix NetworkScorerAppManager#isCallerActiveScorer.
Amin Shaikh [Thu, 5 Jan 2017 22:28:47 +0000 (14:28 -0800)]
Fix NetworkScorerAppManager#isCallerActiveScorer.

The current implementation checks whether the caller's uid has the
SCORE_NETWORKS permission instead of checking the passed in callingUid. I
removed this check entirely because the getActiveScorer method already checks
whether the scorer's package has the SCORE_NETWORKS permission. There is no way
callingUid can equal the active scoring package's uid without also having the
SCORE_NETWORKS permission.

Bug: 34107721
Test: runtest --path core/tests/coretests/src/android/net/NetworkScorerAppManagerTest.java
Change-Id: Ifd427792169837c84a10a76b208c76137db06ae9

7 years agoMerge "Use half-width quotes in code example."
Treehugger Robot [Thu, 5 Jan 2017 21:39:05 +0000 (21:39 +0000)]
Merge "Use half-width quotes in code example."

7 years agoFix stack-buffer-overflow detected by AddressSanitizer.
Evgenii Stepanov [Mon, 3 Oct 2016 21:44:35 +0000 (14:44 -0700)]
Fix stack-buffer-overflow detected by AddressSanitizer.

Bug: 31855186
Test: boot SANITIZE_TARGET=address build
Change-Id: I5c2c64564ccea28e416d66b27af9d86506d622ce

7 years agoUse half-width quotes in code example.
Xin Li [Thu, 5 Jan 2017 19:43:09 +0000 (11:43 -0800)]
Use half-width quotes in code example.

Test: m -j49 -k docs
BUG: 34106216
Change-Id: I366b0bf085ad3fd166b7961301bb8c35da6a7630

7 years agoHwBinder: get/register checked exceptions.
Steven Moreland [Wed, 4 Jan 2017 18:37:59 +0000 (10:37 -0800)]
HwBinder: get/register checked exceptions.

Bug: 33673120
Test: hidl_test_java
Change-Id: Id19b61b252e756a032ae11f7b59bd8eed82edbe9

7 years agoMerge "Callback elision for HIDL interfaces."
Martijn Coenen [Thu, 5 Jan 2017 09:40:55 +0000 (09:40 +0000)]
Merge "Callback elision for HIDL interfaces."

7 years agoMerge "Synchronize access to WebViewZygote."
Treehugger Robot [Thu, 5 Jan 2017 09:20:59 +0000 (09:20 +0000)]
Merge "Synchronize access to WebViewZygote."

7 years agoCallback elision for HIDL interfaces.
Martijn Coenen [Mon, 2 Jan 2017 14:16:24 +0000 (15:16 +0100)]
Callback elision for HIDL interfaces.

Test: mma, hidl_test_java
Bug: 31380743
Change-Id: I9a5c8ef0cc6ac3150395a867690ca82ec2bc419f

7 years agoMerge "Integration of the LDAC codec for A2DP source"
Treehugger Robot [Thu, 5 Jan 2017 07:43:49 +0000 (07:43 +0000)]
Merge "Integration of the LDAC codec for A2DP source"

7 years agoDO NOT MERGE Captive portals: login activity probes like NetworkMonitor
Hugo Benichi [Tue, 13 Dec 2016 23:23:40 +0000 (08:23 +0900)]
DO NOT MERGE Captive portals: login activity probes like NetworkMonitor

This patch changes CaptivePortalLoginActivity captive portal test to be
consistent with NetworkMonitor by:
 - using Network.java to open the http connection.
 - adding a UserAgent property to the request header.

Test: manually tested.
Bug: 32369183

(cherry picked from commit cdf3ba48ccef0f9c6ca8724c1c106df0dd725ad0)

Change-Id: I559eb0497475daad758ba3b3395225dcd0a27a57

7 years agoDO NOT MERGE Logging improvements in CaptivePortalLoginActivity
Hugo Benichi [Tue, 6 Dec 2016 06:36:30 +0000 (15:36 +0900)]
DO NOT MERGE Logging improvements in CaptivePortalLoginActivity

Logging improvements to help debugging captive portal issues.

Test: manually tested
Bug: 33126342

(cherry picked from commit 87de0c206709d3a170649b535a973de8f9c0fb0c)

Change-Id: I52425b849412f6bd5c5ca1f0be7a49cc772497eb

7 years agoDO NOT MERGE Captive portal systel log improvements
Hugo Benichi [Mon, 21 Nov 2016 04:50:05 +0000 (13:50 +0900)]
DO NOT MERGE Captive portal systel log improvements

This patch improves system logging around captive portal detection to
make inspection of bug reports sligthly easier:

- NetworkMonitor now logs by default CMD_CAPTIVE_PORTAL_RECHECK and
  CMD_CAPTIVE_PORTAL_APP_FINISHED. Other system logs are kept off with
  a new VDBG boolean contant,
- NetworkNotificationManager now prints the notification id at
  notification time. This allows to easily correlate show and clear.
- errors in NetworkNotificationManager are logged as Throwable instead
  of through their implicit toString() method.

Test: $ runtest frameworks-net
Bug: 32198726

(cherry picked from commit 8b025bf108c729156b40159038befa0e6c5bebce)

Change-Id: I1eaab5ea702063dde3e23324d3a1b3dc172c5ac5

7 years agoDO NOT MERGE Fix flaky IpPrefixTest.
Hugo Benichi [Thu, 10 Nov 2016 13:45:56 +0000 (22:45 +0900)]
DO NOT MERGE Fix flaky IpPrefixTest.

Test: IpPrefixTest passes
Bug: 32561414

(cherry picked from commit 32c687040301cb3601fd110281a742159a963aa9)

Change-Id: I42928da87f7f336900b3a95ebbf28563864da8d4

7 years agoIntegration of the LDAC codec for A2DP source
Pavlin Radoslavov [Thu, 5 Jan 2017 00:47:02 +0000 (16:47 -0800)]
Integration of the LDAC codec for A2DP source

The codec can be used if the encoding shared library is installed
on the device:
 libldacBT_enc.so

Test: A2DP streaming to LDAC headsets
Bug: 30958229

Change-Id: I524805fd308b5181427515617eda05625a7c4ae5

7 years agoMerge "Integration of the aptX and aptX-HD codecs for A2DP source"
Treehugger Robot [Thu, 5 Jan 2017 01:56:34 +0000 (01:56 +0000)]
Merge "Integration of the aptX and aptX-HD codecs for A2DP source"

7 years agoIntegration of the aptX and aptX-HD codecs for A2DP source
Pavlin Radoslavov [Thu, 5 Jan 2017 00:10:09 +0000 (16:10 -0800)]
Integration of the aptX and aptX-HD codecs for A2DP source

Each of the codecs can be used if the corresponding encoding
shared library is installed on the device:
 - aptX: libaptX.so
 - aptX-HD: libaptXHD.so

Test: A2DP streaming to aptX and aptX-HD headsets
Bug: 30958229
Change-Id: I24faddc8cd88ae3e1370922c633f30e13124a867

7 years agoMerge "Defining a new REQUEST_NETWORK_SCORES permission."
Treehugger Robot [Wed, 4 Jan 2017 23:04:46 +0000 (23:04 +0000)]
Merge "Defining a new REQUEST_NETWORK_SCORES permission."

7 years agoFix naming of key
Jordan Liu [Wed, 4 Jan 2017 22:41:23 +0000 (14:41 -0800)]
Fix naming of key

CarrierConfig Keys should start with "KEY_".

Test: runtest carrierconfig-unit
Change-Id: I317cdb53a09851a5e1a3832140c7dc28a5cde4a4
Merged-In: Iebb11739ae16e56fe1a0b2fdc9a3e005a71858dc

7 years agoMerge "Fix NetworkScoreServiceTest.testSystemRunning."
Treehugger Robot [Wed, 4 Jan 2017 22:43:34 +0000 (22:43 +0000)]
Merge "Fix NetworkScoreServiceTest.testSystemRunning."

7 years agoMerge "Use the new BIND_NETWORK_RECOMMENDATION_SERVICE."
Treehugger Robot [Wed, 4 Jan 2017 21:35:03 +0000 (21:35 +0000)]
Merge "Use the new BIND_NETWORK_RECOMMENDATION_SERVICE."

7 years agoDefining a new REQUEST_NETWORK_SCORES permission.
Jeremy Joslin [Wed, 21 Dec 2016 22:16:19 +0000 (14:16 -0800)]
Defining a new REQUEST_NETWORK_SCORES permission.

This is intended to be a drop-in replacement for the existing
BROADCAST_NETWORK_PRIVILEGED with a more appropriate name.

Test: Built, ran.
BUG: 33752149
Change-Id: Iebe9d1c12f159bd91953ef094d9866eba9ff925a
Merged-In: I12bdba9694fdf2a2e39990736265919edafd865e

7 years agoFix NetworkScoreServiceTest.testSystemRunning.
Jeremy Joslin [Thu, 29 Dec 2016 23:00:23 +0000 (15:00 -0800)]
Fix NetworkScoreServiceTest.testSystemRunning.

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
BUG: 33905890
Change-Id: Icc1db79cde26f1445ca925780ff760b7aa0515b1
Merged-In: Idc92fe3669b0efdb20d3899ce4ce7bae70033aff

7 years agoUse the new BIND_NETWORK_RECOMMENDATION_SERVICE.
Jeremy Joslin [Thu, 29 Dec 2016 18:18:48 +0000 (10:18 -0800)]
Use the new BIND_NETWORK_RECOMMENDATION_SERVICE.

Declare that the system uses the new
BIND_NETWORK_RECOMMENDATION_SERVICE permission.

Test: Built & ran
BUG: 33897544
Change-Id: I43424642a631f58da3a065f8221e351180f4f221
Merged-In: I41c7550adf0d1f81ed9a12068ba569e6a57f3b42

7 years agoMerge "Expose RecommendationRequest.Builder as SystemApi."
Treehugger Robot [Wed, 4 Jan 2017 19:42:16 +0000 (19:42 +0000)]
Merge "Expose RecommendationRequest.Builder as SystemApi."