279312 Commits

Author SHA1 Message Date
Hugo Benichi
68ec108b6e DO NOT MERGE Fix flaky IpPrefixTest.
am: f6b180ff1a  -s ours

Change-Id: I929a0ef7a6a044d2263a04867c2701653c3634de
2017-01-11 01:12:54 +00:00
John Reck
44e14d0d2b Merge "Fix a use-of-uninitialized-value warning."
am: 95ef9ec5b1

Change-Id: I0b088bc47b1311ace1000cc700fd81d56eec4b7f
2017-01-11 01:11:59 +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
Jordan Liu
1d67d022fb Merge "Fix naming of key" am: 0b74a1dabb
am: c68c2f6885

Change-Id: Ibdd5177ea43ee9c2ea5603363429a7207a59d5ba
2017-01-10 23:44:43 +00:00
Robert Sesek
367f70cca4 Merge changes Ia1f2535c,I9ca93f31,If5b53f6f,I119e0bfc am: 98d86fe2b7
am: c6d9f0fbce

Change-Id: I0010cbf45a5e9fc10f86dbfbda510d34ba4b7429
2017-01-10 23:41:13 +00:00
Robert Sesek
df781cc514 Dynamically add the webview_zygote's preloaded APK to the zygote FD whitelist. am: 54e387ddbe
am: 839a185b2e

Change-Id: I1e761ea737447b347f2542419d18d1f42b1b50db
2017-01-10 23:40:15 +00:00
Robert Sesek
024793713f Split core/jni/fd_utils-inl.h into a .h/.cpp pair. am: 8225b7c951
am: 63a7fe6de8

Change-Id: I9148523bae8466e56cf00d7624c53c22318215f7
2017-01-10 23:39:28 +00:00
Narayan Kamath
647986fd54 Zygote: Additional whitelisting for legacy devices. am: f701ba36b3
am: 7a69406767

Change-Id: I932aa16137686cce2be00a13f32978df34857709
2017-01-10 23:38:18 +00:00
Andreas Gampe
ba33854fbc Merge "resolve merge conflicts of 53726c0bbfaf to nyc-mr1-dev-plus-aosp" into nyc-mr1-dev-plus-aosp 2017-01-10 23:34:45 +00: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
Andreas Gampe
be3a8ad2ba resolve merge conflicts of 53726c0bbfaf to nyc-mr1-dev-plus-aosp
Change-Id: Iddf65660f9ac1d66907c8a3d2a3d34d9f3f66d81
2017-01-10 15:12:18 -08:00
Jordan Liu
c68c2f6885 Merge "Fix naming of key"
am: 0b74a1dabb

Change-Id: I8eaaee259d96c2c2da70828cd882a86ae6bde8f1
2017-01-10 22:59:18 +00:00
Jordan Liu
0b74a1dabb Merge "Fix naming of key" 2017-01-10 22:51:50 +00:00
Jeremy Joslin
f41881b7fe Merge "Cleanup test method names." am: 8e9fd295c8
am: 361412ced4

Change-Id: I160b077d4faff67a721e9557f7dae10682dc2d81
2017-01-10 22:39:23 +00:00
Robert Sesek
c6d9f0fbce Merge changes Ia1f2535c,I9ca93f31,If5b53f6f,I119e0bfc
am: 98d86fe2b7

Change-Id: If98bcf93212e84c0e01eb3281b729e1760762356
2017-01-10 22:33:04 +00:00
Robert Sesek
839a185b2e Dynamically add the webview_zygote's preloaded APK to the zygote FD whitelist.
am: 54e387ddbe

Change-Id: I7b4e809767e4cdd64da4094decc929504e1e93d8
2017-01-10 22:33:00 +00:00
Robert Sesek
63a7fe6de8 Split core/jni/fd_utils-inl.h into a .h/.cpp pair.
am: 8225b7c951

Change-Id: Ic5a021e5851f158caddc7f58ad7098a070f6219a
2017-01-10 22:32:05 +00:00
Narayan Kamath
7a69406767 Zygote: Additional whitelisting for legacy devices.
am: f701ba36b3

Change-Id: Ic12fdc0261f258dcd1019290a057fef4fcedd0f3
2017-01-10 22:30:41 +00:00
Narayan Kamath
53726c0bbf Zygote: Additional whitelists for runtime overlay / other static resources.
am: 0ff7ef60f5

Change-Id: Ia4ee03a2a8e801918306cacf5ff1f69401f3847d
2017-01-10 22:29:55 +00:00
Jeremy Joslin
361412ced4 Merge "Cleanup test method names."
am: 8e9fd295c8

Change-Id: Idb000e2b6cd8b7ba2046d329e039f6b05424686e
2017-01-10 22:28:51 +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
Tao Wu
cab27fbbf4 Merge "Remove unused variable." am: f3b1881bb2
am: f338ed34f9

Change-Id: Ia2ab8632bfe5e5b4751bb89aad30c3c739112469
2017-01-10 21:34:20 +00:00
Tao Wu
f338ed34f9 Merge "Remove unused variable."
am: f3b1881bb2

Change-Id: I563647e4f5abc635ff3f67d7f0b658bdd1d92716
2017-01-10 21:29:16 +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
669affdb8e Merge "Methods to calculate user and external disk usage." am: 6a9ad14172
am: 7beb2b75a9

Change-Id: I236eb3357b597cac26f5234a72551a471919a411
2017-01-10 04:42:52 +00:00
Jeff Sharkey
7beb2b75a9 Merge "Methods to calculate user and external disk usage."
am: 6a9ad14172

Change-Id: Ie4ab045a5425b35ce1bdd245f7c6ab248c796df2
2017-01-10 04:38:15 +00: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
John Reck
43818c45a4 Merge "Support EGL_KHR_partial_update without EGL_EXT_buffer_age" am: f66126c828
am: 620d4c24de

Change-Id: I4fdb8ecba5a08f712871d3b99e0286c61f6d0806
2017-01-10 00:44:29 +00:00
John Reck
620d4c24de Merge "Support EGL_KHR_partial_update without EGL_EXT_buffer_age"
am: f66126c828

Change-Id: I649478ca7aa33de82a1524dfe9925c0a2d82a7a7
2017-01-10 00:39:28 +00:00