277235 Commits

Author SHA1 Message Date
Martijn Coenen
24c82279fe Use new read(Embedded)Buffer APIs.
Bug: 34134129
Test: mma, hidl_test_java
Change-Id: I13b3841778d5df4e7c37760610712a26c68896d6
2017-01-11 13:33:19 +01:00
Treehugger Robot
8582826f8d Merge "Cleanup code given PATCHOAT_FOR_RELOCATION has been removed." 2017-01-11 10:28:18 +00:00
Richard Uhler
d670d58667 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
2017-01-11 08:44:26 +00:00
Erik Kline
f84e5e8f76 Merge "Prepare UpstreamNetworkMonitor for extraction" 2017-01-11 08:29:18 +00:00
Erik Kline
ebdb8c8e22 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
2017-01-11 13:27:09 +09:00
Akira Oshimi
f157511744 Fix clipping for edit screen of Quick Settings
The width of the edit screen is fixed when the display size is updated
in landscape mode. So when the device is rotated to portrait mode, the
width is not updated and the edit screen is truncated.
To fix this issue, "match_parent" should be used to match to the width
of Notification Panel always.

Bug: 34206618
Test: manual - go to Settings, rotate device to landscape mode, change
               display size (Default > Large > Default), rotate device
               to portrait mode and show QS edit screen

Change-Id: I35ac623812908a61cd34357e6bda567cab55ace1
2017-01-11 02:58:34 +00:00
Treehugger Robot
5b22a826d5 Merge "Zygote: Add fdsToIgnore" 2017-01-11 02:20:37 +00:00
Treehugger Robot
619d6282c3 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
2017-01-11 02:15:29 +00:00
Treehugger Robot
6daef4499f Merge "Delete old WifiNotificationController strings." 2017-01-11 02:12:49 +00:00
Treehugger Robot
663b444196 Merge "Moved isCallerActiveScorer() to the score service." 2017-01-11 01:30:03 +00:00
Treehugger Robot
60d10ea0f4 Merge changes I559eb049,I52425b84
* changes:
  DO NOT MERGE Captive portals: login activity probes like NetworkMonitor
  DO NOT MERGE Logging improvements in CaptivePortalLoginActivity
2017-01-11 01:06:57 +00:00
Treehugger Robot
b1e3c8aaf4 Merge changes I1eaab5ea,I42928da8
* changes:
  DO NOT MERGE Captive portal systel log improvements
  DO NOT MERGE Fix flaky IpPrefixTest.
2017-01-11 01:02:05 +00:00
John Reck
95ef9ec5b1 Merge "Fix a use-of-uninitialized-value warning." 2017-01-11 00:57:35 +00:00
Andreas Gampe
8dfa178efb 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
2017-01-10 16:55:34 -08:00
Calin Juravle
3a2b7f7d59 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
2017-01-10 16:54:07 -08:00
Calin Juravle
95176bb18e 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
2017-01-10 16:53:55 -08:00
Calin Juravle
b96dba9bad 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
2017-01-10 16:53:41 -08:00
Calin Juravle
271bacbf5c Log DexManager realpath errors only in debug mode.
Test: runtest -x .../DexManagerTests.java
Bug: 33807524

(cherry picked from commit bb9ed1f3c93f0267fa97d6cbeb58ecd1de41d795)

Change-Id: Ib962edf67ce7f5b9b93c9bc6855675e00e025810
2017-01-10 16:53:26 -08:00
Calin Juravle
5a9094c1b6 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
2017-01-10 16:53:13 -08:00
Calin Juravle
6ea5ace7b3 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
2017-01-10 16:49:58 -08:00
Jeremy Joslin
d7670f6d7c Move getActiveScorerPackage() to the score service.
Implemented getActiveScorerPackage() in the NetworkScoreService to
make it more efficient (no need to query PM).

Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Bug: 33781558
Change-Id: Iee7610e4982b44aefa1ef8b6c208292b8f9adcf8
Merged-In: I2144351c2c09cad30f80399069364f3572e38445
2017-01-10 16:41:42 -08:00
Jeremy Joslin
9b442faa91 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
2017-01-10 16:11:33 -08:00
George Burgess IV
a483173c78 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
2017-01-10 15:33:57 -08:00
Jordan Liu
0b74a1dabb Merge "Fix naming of key" 2017-01-10 22:51:50 +00:00
Treehugger Robot
98d86fe2b7 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.
2017-01-10 22:21:01 +00:00
Treehugger Robot
8e9fd295c8 Merge "Cleanup test method names." 2017-01-10 22:18:57 +00:00
Treehugger Robot
f3b1881bb2 Merge "Remove unused variable." 2017-01-10 21:15:02 +00:00
Jeremy Joslin
23f1fcd5ef 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
2017-01-10 13:00:32 -08:00
Robert Sesek
54e387ddbe 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)
2017-01-10 11:44:56 -08:00
Robert Sesek
8225b7c951 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
2017-01-10 11:41:01 -08:00
Narayan Kamath
f701ba36b3 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
2017-01-10 11:27:52 -08:00
Tao Wu
e68b7ca20c 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>
2017-01-10 19:20:18 +00:00
Narayan Kamath
0ff7ef60f5 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
2017-01-10 11:16:31 -08:00
Stephen Chen
9a0dd58ec0 Delete old WifiNotificationController strings.
Bug: 33355924
Test: make

Change-Id: Ia7065549168b4f342760e2f77efe4d9eb1851eb9
2017-01-10 10:35:24 -08:00
Lenka Trochtova
77fe44ffb6 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
2017-01-10 10:54:14 +01:00
Jeff Sharkey
6a9ad14172 Merge "Methods to calculate user and external disk usage." 2017-01-10 04:30:47 +00:00
Yifan Hong
90b6a37bd2 BpBase -> BpHwBase
Test: compiles

Bug: 33554989
Change-Id: I6ed40f4d0ac08876ab804720b193a17b49a93890
2017-01-09 17:58:33 -08:00
Treehugger Robot
f66126c828 Merge "Support EGL_KHR_partial_update without EGL_EXT_buffer_age" 2017-01-10 00:26:43 +00:00
Jeff Sharkey
82ca90171f 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: 27948817, 32206268
Change-Id: Icbb82a30fe711ef05e9a16bb1dc740dc943a9ddc
2017-01-09 17:00:38 -07:00
Treehugger Robot
e34e47d645 Merge "Cherrypick: Create ScoredNetwork Badging API changes." 2017-01-09 23:39:48 +00:00
Treehugger Robot
1ea4180c3a Merge "Expose fields in WifiConfiguration." 2017-01-09 23:33:25 +00:00
John Reck
1deac99c55 Support EGL_KHR_partial_update without EGL_EXT_buffer_age
Bug: 31334677
Test: manual && hwuimacro --onscreen partialdamage

Change-Id: I9b346b4053ec12c8a78a143a4dc0e708c44888a2
2017-01-09 14:35:37 -08:00
Mark Salyzyn
52eb4e01a4 Replace cutils/log.h and log/logger.h with log/log.h
Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I578b15b48f0fc2807a92abbc69a377c3d2191496
2017-01-09 14:31:34 -08:00
Treehugger Robot
ccda81e58f Merge "Moved implicit intents into explicit intents" 2017-01-09 22:02:37 +00:00
Sundeep Ghuman
8bc096c09d 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
2017-01-09 12:57:02 -08:00
Treehugger Robot
1f89f3d1da Merge "Make REQUEST_NETWORK_SCORES signature only." 2017-01-09 20:51:34 +00:00
Treehugger Robot
4c456d7ddf Merge "Check for REQUEST_NETWORK_SCORES instead of BROADCAST_NETWORK_PRIVILEGED." 2017-01-09 20:45:52 +00:00
Jeremy Joslin
85fcf96e99 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
2017-01-09 11:31:21 -08:00
Jeremy Joslin
186f3339ab 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
2017-01-09 11:03:21 -08:00
Amin Shaikh
bdc89f99ea 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
2017-01-09 18:47:46 +00:00