OSDN Git Service
TreeHugger Robot [Wed, 18 Jan 2017 20:12:46 +0000 (20:12 +0000)]
Merge "Ensure correct install reason"
Tamas Berghammer [Wed, 18 Jan 2017 20:02:42 +0000 (20:02 +0000)]
Merge "Update package names to work with the proto3 compiler" into nyc-mr1-dev-plus-aosp am:
3db5d42f90
am:
1a2a860d2c
Change-Id: I229a5c77a0dc5d75afc43669eb1d58d16f492844
Tamas Berghammer [Wed, 18 Jan 2017 19:58:06 +0000 (19:58 +0000)]
Merge "Update package names to work with the proto3 compiler am:
cbd3f0c59a -s ours" into nyc-mr2-dev-plus-aosp
am:
391ab8caaa
Change-Id: I204d0beaf83bfb0b841d08aba3eb0f0101bbfaf1
Tamas Berghammer [Wed, 18 Jan 2017 19:55:14 +0000 (19:55 +0000)]
Update package names to work with the proto3 compiler am:
cbd3f0c59a -s ours
am:
2c8d6c4c39
Change-Id: I092a61abba417a71fe1a8eb9d29016e74808feb2
TreeHugger Robot [Wed, 18 Jan 2017 19:44:52 +0000 (19:44 +0000)]
Merge "Validate custom pointer icons aren't null."
Adrian Roos [Wed, 18 Jan 2017 19:34:34 +0000 (19:34 +0000)]
Merge changes Ib6de3aa3,Idc46d1b2,I889e3864,I9a50ee57,I411f08ae, ...
* changes:
AOD: Use heads-up state instead of buzzBeepBlinked
AOD: Do not animate shelf icons when changing ambientness
AOD: Show ambient versions of notifications
AoD: Reposition shelf under clock
AoD: Adjust shelf, only show top notification
AoD: Adjust clock layout
Bartosz Fabianowski [Fri, 13 Jan 2017 15:46:47 +0000 (16:46 +0100)]
Ensure correct install reason
When installing a package, we trust the installer to set the install
reason correctly. However, there are cases where we know what the
install reason should be (e.g. install by Device Owner or Profile Owner
should always be recorded as caused by enterprise policy) or we do not
trust the installer (e.g. an ordinary app not acting on behalf of an
enterprise should not be allowed to set the install reason to enterprise
policy).
This CL introduces a fix-up method that enforces these rules.
Bug:
32692748
Test: Manually tested all scenarios; DO case also covered by CTS
Change-Id: I18eb891401c9e38546f823a14f67391c94b22e28
Rebecca Silberstein [Wed, 18 Jan 2017 18:53:55 +0000 (18:53 +0000)]
Merge "SystemServer: reorder wifi services start"
TreeHugger Robot [Wed, 18 Jan 2017 18:27:06 +0000 (18:27 +0000)]
Merge "Execute non-optimized add operations one at a time."
TreeHugger Robot [Wed, 18 Jan 2017 18:19:28 +0000 (18:19 +0000)]
Merge "System API for a proxy for registered players"
Selim Cinek [Wed, 18 Jan 2017 18:11:10 +0000 (18:11 +0000)]
Merge "Fixed a crash when showing guts"
Michael Wright [Wed, 18 Jan 2017 18:09:29 +0000 (18:09 +0000)]
Validate custom pointer icons aren't null.
Bug:
33853287
Test: cts
Change-Id: I844a9aec6e37e306a77eee0644a774f6470cf5df
Tamas Berghammer [Wed, 18 Jan 2017 18:06:43 +0000 (18:06 +0000)]
Merge "Update package names to work with the proto3 compiler" into nyc-mr1-dev-plus-aosp
am:
3db5d42f90
Change-Id: Ia944e535f7329c32bf34770fb0d99019cc1091f9
Kenny Guy [Wed, 18 Jan 2017 18:02:38 +0000 (18:02 +0000)]
Fix issue with saving admins before finishing loading. am:
f98ed6863a am:
b275a205af am:
ee9f03d1ed am:
1894632864 am:
748e78bd2c
am:
7f00eb6e90
Change-Id: Ib248081f9ff9a836b1daa93502b8895126ea7d89
Android Build Merger (Role) [Wed, 18 Jan 2017 18:01:56 +0000 (18:01 +0000)]
Merge "Update package names to work with the proto3 compiler am:
cbd3f0c59a -s ours" into nyc-mr2-dev-plus-aosp
TreeHugger Robot [Wed, 18 Jan 2017 17:57:59 +0000 (17:57 +0000)]
Merge "Fix test DevicePolicyManagerTest#testSetRequiredStrongAuthTimeout_DeviceOwner"
Kenny Guy [Wed, 18 Jan 2017 17:55:04 +0000 (17:55 +0000)]
Fix issue with saving admins before finishing loading. am:
f98ed6863a am:
b275a205af am:
ee9f03d1ed am:
1894632864
am:
748e78bd2c
Change-Id: I6d8c1b6e6f6b171527fa48bf477926a31aa5aacf
Kenny Guy [Wed, 18 Jan 2017 17:47:02 +0000 (17:47 +0000)]
Fix issue with saving admins before finishing loading. am:
f98ed6863a am:
b275a205af am:
ee9f03d1ed
am:
1894632864
Change-Id: I4328578f929875fd59f48681b8ae2c7c4d3bd623
Tamas Berghammer [Wed, 18 Jan 2017 17:44:23 +0000 (17:44 +0000)]
Update package names to work with the proto3 compiler
am:
cbd3f0c59a -s ours
Change-Id: I8c957a9ad00cb393dbaaa05bec9730cc3a84a94e
Kenny Guy [Wed, 18 Jan 2017 17:33:33 +0000 (17:33 +0000)]
Fix issue with saving admins before finishing loading. am:
f98ed6863a am:
b275a205af
am:
ee9f03d1ed
Change-Id: Ic724588cbab8d4282eeb5bc806f8c67791189a05
Kenny Guy [Wed, 18 Jan 2017 17:27:10 +0000 (17:27 +0000)]
Fix issue with saving admins before finishing loading. am:
f98ed6863a
am:
b275a205af
Change-Id: I01487d9c39f4e82b63961cdd43df238f2bfd2b89
Bartosz Fabianowski [Wed, 18 Jan 2017 17:25:45 +0000 (17:25 +0000)]
Merge "Allow system to retrieve permission grant state"
Bartosz Fabianowski [Mon, 16 Jan 2017 10:47:28 +0000 (11:47 +0100)]
Allow system to retrieve permission grant state
To inform the user which apps were granted permissions by the admin,
the Settings app needs to access this information without being a DO/PO.
Bug:
32692748
Test: FrameworksServicesTests unit test
Change-Id: I3770ec6343b85be9c6f7655675ed6db5cb50612c
Brian Duddie [Wed, 18 Jan 2017 17:16:02 +0000 (17:16 +0000)]
Merge "ContextHubService: Pass nanoapp header data explicitly"
Kenny Guy [Wed, 18 Jan 2017 17:13:31 +0000 (17:13 +0000)]
Fix issue with saving admins before finishing loading.
am:
f98ed6863a
Change-Id: I7f816c164548df86f9607c86772902efd0d53620
Makoto Onuki [Wed, 18 Jan 2017 17:04:23 +0000 (17:04 +0000)]
Merge "Add ProviderStatus.DATABASE_CREATION_TIMESTAMP"
Roozbeh Pournader [Wed, 18 Jan 2017 17:03:32 +0000 (17:03 +0000)]
Merge "Update locale data from in-tree ICU"
Tucker Sylvestro [Wed, 18 Jan 2017 16:47:59 +0000 (16:47 +0000)]
svc nfc should support watches too am:
1876583bfb am:
eed0a7bf45
am:
93591413eb
Change-Id: I5324063d869d8387b4964279b461cdd232011887
Tucker Sylvestro [Wed, 18 Jan 2017 16:41:54 +0000 (16:41 +0000)]
svc nfc should support watches too am:
1876583bfb
am:
eed0a7bf45
Change-Id: If7f2515750bb74d0c9f3baae9fe0a1fc3eeb36ef
Tucker Sylvestro [Wed, 18 Jan 2017 16:34:50 +0000 (16:34 +0000)]
svc nfc should support watches too
am:
1876583bfb
Change-Id: Ic3f0277c2c13dbd2c4f8b6ec5dbe9f9dc34ef297
Michal Karpinski [Wed, 18 Jan 2017 15:54:18 +0000 (15:54 +0000)]
Fix test DevicePolicyManagerTest#testSetRequiredStrongAuthTimeout_DeviceOwner
1) Started returning the default value for getLong() on SystemProperties mock
2) Added a test that the minimum timeout cannot be changed using a system
property on non-debuggable builds
3) Added new within range test for completeness.
4) Started using TimeUnit instead of ms constants.
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
Bug:
34317979
Change-Id: I0409451ae39e74ec3d96a098042302291ec3408f
Greg Daniel [Wed, 18 Jan 2017 16:13:00 +0000 (16:13 +0000)]
Merge "Update hwui_unit_tests to support running with Vulkan backend."
Tucker Sylvestro [Wed, 14 Dec 2016 19:01:14 +0000 (14:01 -0500)]
svc nfc should support watches too
Check for both FEATURE_NFC and FEATURE_NFC_HOST_CARD_EMULATION in the
"svc nfc" command. Watches may only have the latter, but should still
support the nfc enable/disable command.
See b/
24532713#comment7 for context.
Bug
32386425
Change-Id: I307798f00728c6b437aebfcf58115af7265e3692
TreeHugger Robot [Wed, 18 Jan 2017 15:19:39 +0000 (15:19 +0000)]
Merge "Handle multiprocess flag in WebView update service."
TreeHugger Robot [Wed, 18 Jan 2017 14:56:45 +0000 (14:56 +0000)]
Merge "Don't play notification audio in vibrate mode"
Greg Daniel [Wed, 4 Jan 2017 19:45:56 +0000 (14:45 -0500)]
Update hwui_unit_tests to support running with Vulkan backend.
Added Macros for RENDERTHREAD_TESTS which run these tests using specific backends.
RENDERTHREAD_TESTS - Runs OpenGL, SkiaGL, and SkiaVulkan
RENDERTHREAD_SKIA_TESTS - Runs SkiaGL and SkiaVulkan
RENDERTHREAD_OPENGL_TESTS - Runs OpenGL
Test: manual running of hwui_unit_tests
Change-Id: Ia7420ee7a38803a15e2d58394d14b38cae8208d3
Tamas Berghammer [Wed, 18 Jan 2017 12:57:56 +0000 (12:57 +0000)]
Merge "Update package names to work with the proto3 compiler" into nyc-mr1-dev-plus-aosp
TreeHugger Robot [Wed, 18 Jan 2017 12:17:42 +0000 (12:17 +0000)]
Merge changes I01e81b9c,I532c2d74
* changes:
Add a listener when task snapshots change
When app dies, destroy snapshot
Kenny Guy [Tue, 17 Jan 2017 23:33:41 +0000 (23:33 +0000)]
Fix issue with saving admins before finishing loading.
Saving device policy managers settings to clear out
password stats was happening before initializing mAdminList
so could wipe active admins.
Test: manual - flash with N2G05C add google account with dmagent flash wth this fix, check dmagent is still an active admin, reboot check admin is still active.
Test: runtest -c com.android.server.devicepolicy.DevicePolicyManagerTest frameworks-services
Bug:
34277435
Change-Id: I13660b47f30e9aba001eb13f2e457c3b3f36da3e
(cherry picked from commit
adbda7474cc1968b66e9948aee566dc346e71340)
Paul Duffin [Wed, 18 Jan 2017 11:45:21 +0000 (11:45 +0000)]
Merge "Add legacy-android-test target containing android.test classes" am:
c20518139a am:
78af448c30 am:
2ac0e2a186
am:
93a897b3db
Change-Id: Id481b8b89ef6b180ba0099f214a5681e41851af3
Paul Duffin [Wed, 18 Jan 2017 11:39:39 +0000 (11:39 +0000)]
Merge "Add legacy-android-test target containing android.test classes" am:
c20518139a am:
78af448c30
am:
2ac0e2a186
Change-Id: I965734e5064fccf08ae676047078632e7a95f3c7
Paul Duffin [Wed, 18 Jan 2017 11:34:39 +0000 (11:34 +0000)]
Merge "Add legacy-android-test target containing android.test classes" am:
c20518139a
am:
78af448c30
Change-Id: I272502ca8504683f5feb4abf345a2665e99da057
Paul Duffin [Wed, 18 Jan 2017 11:30:04 +0000 (11:30 +0000)]
Merge "Add legacy-android-test target containing android.test classes"
am:
c20518139a
Change-Id: I0c591f26a7fe4ebbb89a7fb6ad6b5bb846756c99
Paul Duffin [Wed, 18 Jan 2017 11:19:57 +0000 (11:19 +0000)]
Merge "Add legacy-android-test target containing android.test classes"
Pavel Grafov [Wed, 18 Jan 2017 11:15:20 +0000 (11:15 +0000)]
Merge "Make ENSURE_VERIFY_APPS global even when set by PO."
Lorenzo Colitti [Wed, 18 Jan 2017 10:51:20 +0000 (10:51 +0000)]
Merge changes from topic 'net-update-mr2-dev-plus-aosp' into nyc-mr2-dev-plus-aosp
am:
5db17efcf6
Change-Id: Iba75e1bdc9ebf526be228bd9efa4e3bf86271eed
Hugo Benichi [Wed, 18 Jan 2017 10:51:11 +0000 (10:51 +0000)]
DO NOT MERGE: Add IP conn metrics to dumpsys and bug reports
am:
7a61361724 -s ours
Change-Id: I6aab263cf5efb7d5a9e1e68dc97c57099c7a9cf8
Lorenzo Colitti [Wed, 18 Jan 2017 10:50:13 +0000 (10:50 +0000)]
DO NOT MERGE: Add missing dependency.
am:
d9409d3b60 -s ours
Change-Id: Id8bb3a632968f12ffd7bf5988f81cf85953ae08f
Tony Mak [Wed, 18 Jan 2017 10:49:08 +0000 (10:49 +0000)]
DO NOT MERGE: Show notification for always-on app VPN
am:
b31b83377b -s ours
Change-Id: I8af0a0746154d5774b0fb841616b57ce65a36707
Stephen Chen [Wed, 18 Jan 2017 10:48:16 +0000 (10:48 +0000)]
DO NOT MERGE: Implement metered tracking for NetworkStats summary queries.
am:
c926b7399a -s ours
Change-Id: I970aed286a5bcc69d2ee69ea23b53af36dc2bbea
Hugo Benichi [Wed, 18 Jan 2017 10:47:07 +0000 (10:47 +0000)]
DO NOT MERGE: ConnectivityServiceTest: fix testAvoidBadWifiSettings
am:
bccd8ad00a -s ours
Change-Id: Ifdac8feb994342d18a0795a676da558445867b1f
Hugo Benichi [Wed, 18 Jan 2017 10:46:07 +0000 (10:46 +0000)]
DO NOT MERGE: Fix ConnectivityServiceTest testRequestBenchmark
am:
de7002ef0d -s ours
Change-Id: Iccb849a88e017c3189b2c374a98c44dc58085861
Jeff Sharkey [Wed, 18 Jan 2017 10:45:17 +0000 (10:45 +0000)]
DO NOT MERGE: Switch over to new "time.android.com" NTP pool.
am:
389b853bc8 -s ours
Change-Id: Iaffba4104fa3f64747cc7b57bdedf8979a08578e
Stephen Chen [Wed, 18 Jan 2017 10:44:12 +0000 (10:44 +0000)]
DO NOT MERGE: Define API for metering network stats buckets.
am:
1fee3a64b7 -s ours
Change-Id: I03a015bbc76c762d48688b1c66562bbd599d4265
Felipe Leme [Wed, 18 Jan 2017 10:43:14 +0000 (10:43 +0000)]
DO NOT MERGE: Refactored NetworkStatsServiceTest to use Mockito instead of EasyMock.
am:
d445c55538 -s ours
Change-Id: I4c92c8bfe7cd19839a86a63e5afb3b3868a63825
Felipe Leme [Wed, 18 Jan 2017 10:42:03 +0000 (10:42 +0000)]
DO NOT MERGE: Use @Ignore to explicitly disable a @Test method.
am:
c97d8b7464 -s ours
Change-Id: I6e6fea2d375c40e53fee1877abeb06a9e6d2e218
Felipe Leme [Wed, 18 Jan 2017 10:41:08 +0000 (10:41 +0000)]
DO NOT MERGE: Fixed NetworkStatsServiceTest and converted it to JUnit4.
am:
fe46a2f868 -s ours
Change-Id: I72964aed5f8f27120300948d57e4083bb81f06ec
Hugo Benichi [Wed, 18 Jan 2017 10:40:14 +0000 (10:40 +0000)]
DO NOT MERGE: ConnectivityThread: use lazy holder idiom
am:
0f1f54d4d1 -s ours
Change-Id: I8af8bbe0b13b73d4c394c182d299a57c7d8b5736
Hugo Benichi [Wed, 18 Jan 2017 10:38:59 +0000 (10:38 +0000)]
DO NOT MERGE: ConnectivityManager: use ConnectivityThread looper
am:
e804d3773c -s ours
Change-Id: I12d27fd45f1182719df8c538e734419b640977e8
Hugo Benichi [Wed, 18 Jan 2017 10:37:50 +0000 (10:37 +0000)]
DO NOT MERGE: ConnectivityManager: a simpler CallbackHandler
am:
791ee32a62 -s ours
Change-Id: Ie2413170190809b0a95749f6788fb54b0a9bafd7
Philip P. Moltmann [Wed, 18 Jan 2017 10:37:37 +0000 (10:37 +0000)]
DO NOT MERGE: Indicate the NsdServiceInfo attributes are only filled in for a resolved service.
am:
81deef84fb -s ours
Change-Id: I7d66e82b940bd88c7e5da0d4a4f2008f14d98a2e
Jeremy Klein [Wed, 18 Jan 2017 10:37:31 +0000 (10:37 +0000)]
DO NOT MERGE: Add a null check for the OnStartTetheringCallback.
am:
27089aadfb -s ours
Change-Id: I62e8648a232f8c9ec1fe97270b654078a59e3cb9
Etan Cohen [Wed, 18 Jan 2017 10:37:25 +0000 (10:37 +0000)]
DO NOT MERGE: [CS] Remove timeout event after first available
am:
4fde167490 -s ours
Change-Id: I84244312fb5314ac1d177571ff1a3fdd070480ef
Hugo Benichi [Wed, 18 Jan 2017 10:37:18 +0000 (10:37 +0000)]
DO NOT MERGE: ApfTest: tag tests with @SmallTest or @MediumTest
am:
1e04e9ee49 -s ours
Change-Id: I4eeba34dcdb0d0ffc414e2fe01596408b87624ed
Lorenzo Colitti [Wed, 18 Jan 2017 10:37:12 +0000 (10:37 +0000)]
DO NOT MERGE: Unbreak TetherInterfaceStateMachineTest.
am:
144223318c -s ours
Change-Id: Ie27a544873f3336ef3078798482857a538cc1c89
Lorenzo Colitti [Wed, 18 Jan 2017 10:37:05 +0000 (10:37 +0000)]
DO NOT MERGE: Move the connectivity tests to frameworks/base/tests/net.
am:
2fbc934cd9 -s ours
Change-Id: I255b736255c6f165f1600fe064e86bbd33bfe810
Lorenzo Colitti [Wed, 18 Jan 2017 10:37:00 +0000 (10:37 +0000)]
DO NOT MERGE: De-guava BroadcastInterceptingContext and move it to testutils.
am:
073e5e94ad -s ours
Change-Id: If776d54cd1138a9266268f43833f6c329cd6285d
Lorenzo Colitti [Wed, 18 Jan 2017 10:36:56 +0000 (10:36 +0000)]
DO NOT MERGE: Move FakeSettingsProvider to a common location.
am:
9997f1489a -s ours
Change-Id: I896ce2cf8abf50e5189f609a4f810296817695c9
Hugo Benichi [Wed, 18 Jan 2017 10:36:52 +0000 (10:36 +0000)]
DO NOT MERGE: ConnectivityServiceTest: mark flaky test as such
am:
86e2765777 -s ours
Change-Id: Ifd485f77ada20a0773e791816e811fdf22442a92
Hugo Benichi [Wed, 18 Jan 2017 10:36:48 +0000 (10:36 +0000)]
DO NOT MERGE: Add fuzzing tests to ApfFilter RA processing
am:
17586f7f1f -s ours
Change-Id: I9fda7a9806c45a7e0f322af937a7b25bbdb8b571
Erik Kline [Wed, 18 Jan 2017 10:36:44 +0000 (10:36 +0000)]
DO NOT MERGE: Support timeouts for requestNetwork() invocations.
am:
e9e251fcfb -s ours
Change-Id: Ife31e9372728e888ccf175f0a38577e17c3fc468
Pierre Imai [Wed, 18 Jan 2017 10:36:39 +0000 (10:36 +0000)]
DO NOT MERGE: Silence the obnoxious MTU 0 error message that occur when no MTU is specified for a given network.
am:
db5814ed3d -s ours
Change-Id: I3fa3801e54b06ea4e51f1e0d3577a309f1b970ab
Lorenzo Colitti [Wed, 18 Jan 2017 10:29:51 +0000 (10:29 +0000)]
Merge changes from topic 'net-update-mr2-dev-plus-aosp' into nyc-mr2-dev-plus-aosp
* changes:
DO NOT MERGE: Add IP conn metrics to dumpsys and bug reports
DO NOT MERGE: Add missing dependency.
DO NOT MERGE: Show notification for always-on app VPN
DO NOT MERGE: Implement metered tracking for NetworkStats summary queries.
DO NOT MERGE: ConnectivityServiceTest: fix testAvoidBadWifiSettings
DO NOT MERGE: Fix ConnectivityServiceTest testRequestBenchmark
DO NOT MERGE: Switch over to new "time.android.com" NTP pool.
DO NOT MERGE: Define API for metering network stats buckets.
DO NOT MERGE: Refactored NetworkStatsServiceTest to use Mockito instead of EasyMock.
DO NOT MERGE: Use @Ignore to explicitly disable a @Test method.
DO NOT MERGE: Fixed NetworkStatsServiceTest and converted it to JUnit4.
DO NOT MERGE: ConnectivityThread: use lazy holder idiom
DO NOT MERGE: ConnectivityManager: use ConnectivityThread looper
DO NOT MERGE: ConnectivityManager: a simpler CallbackHandler
DO NOT MERGE: Indicate the NsdServiceInfo attributes are only filled in for a resolved service.
DO NOT MERGE: Add a null check for the OnStartTetheringCallback.
DO NOT MERGE: [CS] Remove timeout event after first available
DO NOT MERGE: ApfTest: tag tests with @SmallTest or @MediumTest
DO NOT MERGE: Unbreak TetherInterfaceStateMachineTest.
DO NOT MERGE: Move the connectivity tests to frameworks/base/tests/net.
DO NOT MERGE: De-guava BroadcastInterceptingContext and move it to testutils.
DO NOT MERGE: Move FakeSettingsProvider to a common location.
DO NOT MERGE: ConnectivityServiceTest: mark flaky test as such
DO NOT MERGE: Add fuzzing tests to ApfFilter RA processing
DO NOT MERGE: Support timeouts for requestNetwork() invocations.
DO NOT MERGE: Silence the obnoxious MTU 0 error message that occur when no MTU is specified for a given network.
Narayan Kamath [Wed, 18 Jan 2017 10:09:12 +0000 (10:09 +0000)]
Merge "API: Unhide MethodHandles API (java.lang.invoke)." am:
71b1d50531 am:
ec667adb56 am:
aa90336510
am:
fc9c93c2dd
Change-Id: I5db4fe68e1f1e160097503d69312bf2a24a45f2b
Hugo Benichi [Wed, 19 Oct 2016 04:48:40 +0000 (13:48 +0900)]
DO NOT MERGE: Add IP conn metrics to dumpsys and bug reports
Test: manually created a bug report and inspected content.
(cherry picked from commit
51d14cb60793a9a073b8a29ff7875bb518cd7d54)
(cherry picked from commit
5635c270a1bda538181daa260902a59030f084e6)
Change-Id: I612b4ab9431633758d3a7048966c267d20cdfcbe
Lorenzo Colitti [Fri, 9 Dec 2016 05:19:57 +0000 (14:19 +0900)]
DO NOT MERGE: Add missing dependency.
(cherry picked from commit
744b02069d7589dc192b19fac6c3e7d62d02e88a)
Change-Id: I3030cc7a718e99ab129fc14174b6d917b9b8e7fb
Tony Mak [Thu, 30 Jun 2016 10:19:20 +0000 (11:19 +0100)]
DO NOT MERGE: Show notification for always-on app VPN
This is the same notification as the one shown during legacy lockdown
mode, sans the 'reset' button.
The notification is only shown during times when VPN has not yet
established or has failed, for example during boot or after a crash.
Bug:
29123115
(cherry picked from commit
1a405fe300950d6ceae2166fd074b596d8110dbe)
(cherry picked from commit
de7f7d195eec64802b7b6eee819c699f1a7d6951)
Change-Id: I42b4b24e25175bb7628b46a79431d2592644803c
Stephen Chen [Fri, 21 Oct 2016 19:44:26 +0000 (12:44 -0700)]
DO NOT MERGE: Implement metered tracking for NetworkStats summary queries.
Dependent on ag/
1550196 where API is defined.
Bug:
31015360
Bug:
26545374
Test: runtest --path
frameworks/base/core/tests/coretests/src/android/net/NetworkStatsTest.java,
other test classes.
(cherry picked from commit
25147878974f82f875062e99cdee85dd33f3f078)
(cherry picked from commit
963e8ddf6d5ea3bc34216fa03fe24402bf13940a)
Change-Id: I79e401fc4159264a075febba82bd8c295b8e677f
Hugo Benichi [Tue, 15 Nov 2016 04:42:34 +0000 (13:42 +0900)]
DO NOT MERGE: ConnectivityServiceTest: fix testAvoidBadWifiSettings
This patch introduces an assertEventuallyThat helper function in
ConnectivityServiceTest which given a boolean function retries until the
function returns true or until a maximum retry time is reached.
This function is used to fix flakyness of testAvoidBadWifiSetting where
the Message posted by reevaluate() could reach the Handler's
MessageQueue after waitForIdle takes effect, resulting in the test to
fail.
Instead of fixing the flakyness by introdcing hard sleep times,
assertEventuallyThat is used to reduce the overall test time.
With this change the test has been observed to pass with 100% success
rate over 50000 invocations.
Test: $ runtest frameworks-net
Bug:
32561414
(cherry picked from commit
99c8294ef0c7a720364abb5884063e0a9d1bb5fe)
(cherry picked from commit
53d83d51424a496978d2ff2d86845a2284515712)
Change-Id: I432f90a699dadfef37a5d0a69e25050753340964
Hugo Benichi [Tue, 15 Nov 2016 02:25:52 +0000 (11:25 +0900)]
DO NOT MERGE: Fix ConnectivityServiceTest testRequestBenchmark
This patch fixes flakyness of testRequestBenchmark by adjusting time
limit for callback registration from 100ms to 180ms, and time limits for
onAvailable and onLost triggers from 30ms to 40ms.
With these timeouts the test succeeds 100% over 5000 iterations.
When using 150ms for registration timeout, running the test 5000 times
fails 2 times.
When using 30ms for onLost timeout, running the test 5000 times fails
1 times.
In addition, this patch also cleans testRequestBenchmark and uses the
more stable SystemClock.elapsedRealtime() for duration measurements.
Test: $ runtest frameworks-net
Bug:
32561414
(cherry picked from commit
38be57b438a0c1754091f045317db2049304e16f)
(cherry picked from commit
cbf8ff83a8b342e6ebeaa83794dace3c6d0b1488)
Change-Id: I3caf10025f203156a297c0b522f24768a18accc9
Jeff Sharkey [Fri, 2 Dec 2016 19:17:21 +0000 (12:17 -0700)]
DO NOT MERGE: Switch over to new "time.android.com" NTP pool.
Also add logging to measure success/failure details.
Test: builds, boots, and NTP fix obtained
Bug:
32969463
(cherry picked from commit
d3f689bf14a05de735b5cc92dcf20e7226c78690)
(cherry picked from commit
dda938a698a17b2943bbe78f6631a26dedabf28a)
Change-Id: I67e4f54f8f2ec69b6522fbbe06ef196b1084f44a
Stephen Chen [Tue, 18 Oct 2016 23:41:47 +0000 (16:41 -0700)]
DO NOT MERGE: Define API for metering network stats buckets.
This is a continuation of b/
26545374, since now we can also set the
metered bit with NetworkScorer. The tracking of metered state changes
will be implemented in a seperate CL.
Bug:
31015360
Bug:
26545374
Test: N/A
(cherry picked from commit
9ac251d1169639c7b955d63b21e80cbc5c394090)
(cherry picked from commit
dadf6caf9f2a8c360203a3f141a8c1366159ec4d)
Change-Id: I01ebb270c5bf7f2383e8923cce72545ca1bee118
Felipe Leme [Thu, 18 Aug 2016 23:20:01 +0000 (16:20 -0700)]
DO NOT MERGE: Refactored NetworkStatsServiceTest to use Mockito instead of EasyMock.
Test: m -j32 FrameworksServicesTests && adb install -r -g ${ANDROID_PRODUCT_OUT}/data/app/FrameworksServicesTests/FrameworksServicesTests.apk && adb shell am instrument -e class "com.android.server.net.NetworkStatsServiceTest" -w "com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner"
BUG:
30943463
(cherry picked from commit
b8f946dc4b24998f14e28573e452ab13ed533347)
(cherry picked from commit
e4c029918f32f9dacc7e6a1e8102b71f3ca1018c)
Change-Id: I93cdfc8753dcded141732c0587783d1fa2085f5a
Felipe Leme [Mon, 22 Aug 2016 15:50:43 +0000 (08:50 -0700)]
DO NOT MERGE: Use @Ignore to explicitly disable a @Test method.
BUG:
30839080
BUG:
31007021
(cherry picked from commit
fc7d7a359f800d7320d29055ef3b4b75157aaf13)
(cherry picked from commit
2026ca147b6460807b19c997600315806ecb3197)
Change-Id: I45efc93b40e526467c97d0735289db1404ccd22d
Felipe Leme [Thu, 18 Aug 2016 22:31:45 +0000 (15:31 -0700)]
DO NOT MERGE: Fixed NetworkStatsServiceTest and converted it to JUnit4.
Most tests were failing because due to a null NetworkCapabilities.
Example:
1) testNetworkStatsWifi(com.android.server.net.NetworkStatsServiceTest)
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkCapabilities.hasCapability(int)' on a null object reference
at
com.android.server.net.NetworkStatsService.updateIfacesLocked(NetworkStatsService.java:983)
BUG:
30839080
(cherry picked from commit
574f370c6da52eeffe747248d68ef044617c7bcf)
(cherry picked from commit
77cba4bdf6de8aec02efe0da7e84f17603912b21)
Change-Id: I6eee96178ade6adfc1406e06d5376206ca2420e5
Hugo Benichi [Thu, 13 Oct 2016 07:48:42 +0000 (16:48 +0900)]
DO NOT MERGE: ConnectivityThread: use lazy holder idiom
This patch changes the way that the ConnectivityThread is lazily
instantiated by using the "lazy initialization holder class idiom".
The first code point that tries to obtain a reference to the unique
ConnectivityThread instance will trigger the creation of the Singleton
class, which will guarantee a thread-safe initialization of the static
INSTANCE field inside Singleton according to the language specs.
This is the Item #71 of Effective Java.
The unique static instance of ConnectivityThread is not stored directly
inside ConnectivityThread class but is stored in a static nested class.
This is to avoid triggering the creation of that unique instance when
Zygote does class preloading at phone startup. Otherwise this would lead
to Zygote creating a new OS thread during preloading, which is a fatal
error.
Test: frameworks-wifi tests pass
Bug:
26749700
Bug:
28537383
Bug:
32130437
(cherry picked from commit
c4fe5d373caa9f53686e4d58e61394dd40558957)
(cherry picked from commit
ce765b7a51d9452aaa32e43bedeefb7ad200df52)
Change-Id: Ic9a31809ef19e618246f9aa17f5df29bd65f8510
Hugo Benichi [Thu, 7 Jul 2016 01:15:56 +0000 (10:15 +0900)]
DO NOT MERGE: ConnectivityManager: use ConnectivityThread looper
This patch removes the static singleton looper used by
ConnectivityManager and instead uses the common ConnectivityThread.
This allows to removes the static atomic counter used to track
the number of registered NetworkCallback in ConnectivityManager, because
the looper is not turned off anymore when no callbacks are registered.
Also an overloaded version of sendRequestForNetwork is added taking as a
new parameter a Handler. This will allow to overload various callback
and request related API calls with user provided Handlers.
Test: ConnectivityServiceTest passes
Bug:
26749700
Bug:
28537383
Bug:
32130437
(cherry picked from commit
7724cdd8b90006c852644d06cf6c8a28450c71c6)
(cherry picked from commit
1853f78d768dc44efdc8576302b382ff81a0ffac)
Change-Id: If5c1e46ca6c4a09ef526cbe09654c5f55ef8d6ce
Hugo Benichi [Wed, 6 Jul 2016 13:53:17 +0000 (22:53 +0900)]
DO NOT MERGE: ConnectivityManager: a simpler CallbackHandler
This patch simplifies CallbackHandler in the following way:
- CallbackHandler directly uses the static references to
sNetworkCallback and sCallbackRefCount. This allows to remove
instance fields in CallbackHandler.
- CallbackHandler does not have a reference to ConnectivityManager
anymore
- CallbackHandler.getObject() is now generic in a type-safe way.
Test: ConnectivityServiceTest passes
Bug:
28537383
Bug:
32130437
(cherry picked from commit
d42650faaa33ec6274278c65a6042228555ddd4f)
(cherry picked from commit
4983e55853db9f9d1cc5720970c439b976480c52)
Change-Id: I4d0b2441b6af76bc56b19218210a2a381532a3c4
Philip P. Moltmann [Mon, 18 Apr 2016 23:23:06 +0000 (16:23 -0700)]
DO NOT MERGE: Indicate the NsdServiceInfo attributes are only filled in for a resolved service.
Fixes:
28530428
(cherry picked from commit
7d5da4b044183826ac8388c8bdb94ac979a81797)
(cherry picked from commit
29154b000f1dfa6d7bd6a12359f439770463ce3e)
Change-Id: Ib8f8da947af804c8b203928e57ed6a8aedbf0684
Jeremy Klein [Sun, 13 Mar 2016 00:29:54 +0000 (16:29 -0800)]
DO NOT MERGE: Add a null check for the OnStartTetheringCallback.
This avoids a NullPointerException when trying to call the callback
and gives a more readable error message.
(cherry picked from commit
5f277e1667b49976a77c9fa79b9a04d775f3b49e)
(cherry picked from commit
c8e4cc8e9919260dac5f2f8a76b693e8a29bfcc1)
Change-Id: Ia5f328c4b25aa6624dc3c8493eb0c7bbab99904c
Etan Cohen [Thu, 27 Oct 2016 22:05:50 +0000 (15:05 -0700)]
DO NOT MERGE: [CS] Remove timeout event after first available
Guarantees that timeouts are only delivered if a network never
becomes available. Once a network is available the timeout is
canceled.
Bug:
31402633
Test: all timeout related unit tests pass (new one added)
(cherry picked from commit
681fcda5896fd6c94f8a543ef9983c0a0644e87e)
(cherry picked from commit
bf3b1bad15f45033d409669ac20e4b4e597065fd)
Change-Id: I0cf1a2b7d25bc9912e03fca30621809a9071396c
Hugo Benichi [Wed, 2 Nov 2016 04:43:22 +0000 (13:43 +0900)]
DO NOT MERGE: ApfTest: tag tests with @SmallTest or @MediumTest
Test methods not tagged with @{Small,Medium,Large}Test will not appear
in the Android Platform Continuous Testing dashboard.
Test methods tagged with @LargeTest will not be run in the Android
Platform Continuous Testing dashboard.
Test: ApfTest passes ($runtest frameworks-net)
Bug:
31479480
(cherry picked from commit
4195c28347cc100954f83c3c92b4dde4673f8608)
(cherry picked from commit
5d2654124e9e77dbda102a4435595c552cbc8e36)
Change-Id: Id718e8a02f8db96ff8babac3ec54192148f7bbbd
Lorenzo Colitti [Fri, 28 Oct 2016 08:45:55 +0000 (17:45 +0900)]
DO NOT MERGE: Unbreak TetherInterfaceStateMachineTest.
This was broken by the implementation of IPv6 tethering, which
relies on various private classes which end up calling unmockable
final classes like NetworkInterface.
Making everything public like this is almost certainly not the
best way of fixing this test, but on the other hand there is
value to the test continuing to pass.
Test: runtest frameworks-net # Everything passes.
Test: IPv6 tethering continues to work.
(cherry picked from commit
7e0eeca8ba4063d0d35dda9a8dfcc612e45efb87)
(cherry picked from commit
5bce5a16b17498981253d7a2d1a490667cd71798)
Change-Id: I3f399188f77fe3e5249443dcb61018a22c29d857
Lorenzo Colitti [Fri, 28 Oct 2016 03:48:36 +0000 (12:48 +0900)]
DO NOT MERGE: Move the connectivity tests to frameworks/base/tests/net.
This will give us a good place to put all the networking tests.
Fix:
31479480
Test: adb shell am instrument -w -e notClass com.android.server.connectivity.tethering.TetherInterfaceStateMachineTest 'com.android.frameworks.tests.net/android.support.test.runner.AndroidJUnitRunner' # PASS
(cherry picked from commit
ecc986d430f4b8158f177ed97d2edb741f11ff71)
Change-Id: I4c417c2ba0747d2085169e47ae4a99e93c4d8814
Lorenzo Colitti [Fri, 28 Oct 2016 03:56:03 +0000 (12:56 +0900)]
DO NOT MERGE: De-guava BroadcastInterceptingContext and move it to testutils.
Removing the static dependency on guava reduces test compile time
by about 20 seconds on a Z840, thus substantially speeding up the
compile/test cycle.
Make FutureIntent public instead of package-private because it is
used directly by NetworkPolicyManagementServiceTest, which as of
this CL is now in a different package.
(cherry picked from commit
281a17c9580de5c9898be7d9654d428801976511)
Test: runtest frameworks-services -c com.android.server.ConnectivityServiceTest # PASS
Test: runtest frameworks-services -c com.android.server.NetworkPolicyManagerServiceTest # PASS
Test: runtest frameworks-services -c com.android.server.net.NetworkStatsServiceTest # PASS
Test: runtest frameworks-services -c com.android.server.NetworkManagementServiceTest # Already failing.
Bug:
31479480
(cherry picked from commit
3c295b59f5767904656235db48692906148ab631)
Change-Id: I8a95d4618dced81f173d2b38b9c1dfe3860b348a
Lorenzo Colitti [Fri, 28 Oct 2016 03:37:38 +0000 (12:37 +0900)]
DO NOT MERGE: Move FakeSettingsProvider to a common location.
(cherry picked from commit
7df1a82802cdf842d07a86a80383c7d5ea7ae53a)
Test: runtest frameworks-util -c com.android.internal.util.test.FakeSettingsProviderTest
Test: runtest frameworks-services -c com.android.server.ConnectivityServiceTest
Test: runtest frameworks-services -c com.android.server.retaildemo.PreloadAppsInstallerTest
Test: runtest frameworks-services -c com.android.server.retaildemo.RetailDemoModeServiceTest
Bug:
31479480
(cherry picked from commit
b8df76e413d0b8235d0bd71adf8f368f00391fcb)
Change-Id: Ib82b162f354b8cbb521bc0783556f3225b4d12ac
Hugo Benichi [Mon, 17 Oct 2016 06:54:51 +0000 (15:54 +0900)]
DO NOT MERGE: ConnectivityServiceTest: mark flaky test as such
This patch extracts into its own independent test a test sub-block looking
for a race condition when not waiting on handlers to become idle:
there is no way to prevent the race from not happening when looking for
it this way. This makes the test flakky.
This new independent test is tagged with @FlakkyTest(tolerance = 3).
Test: ConnectivityServiceTest passes, with higher probability.
Bug:
31479480
(cherry picked from commit
c8c1027762d66c12c9c153ccbb8f80acdee8571c)
Change-Id: I32632bb763585c23f1de5bb1811a384a35bf9f64
Hugo Benichi [Thu, 6 Oct 2016 06:19:36 +0000 (15:19 +0900)]
DO NOT MERGE: Add fuzzing tests to ApfFilter RA processing
Test: added new unit tests
(cherry picked from commit
8acea76a2b7555b3bd5ca1170cca9d09e979fafc)
Change-Id: I4e6633984075d87c4e22466bc881629436359f7f
Erik Kline [Wed, 25 Nov 2015 03:49:38 +0000 (12:49 +0900)]
DO NOT MERGE: Support timeouts for requestNetwork() invocations.
(cherry-pick of
06c3ef1367e850746eef0a5462bdce8674d74c30)
(cherry picked from commit
57faba9ec73fbb311d5ca1df3278aee9728589d5)
Bug:
21414325
(cherry picked from commit
3841a48d0a093bbbd6ffe6338170e1e2dbc11997)
Change-Id: I640c43315a071ecbf881e5ce898164915e0b787f
Narayan Kamath [Wed, 18 Jan 2017 10:04:10 +0000 (10:04 +0000)]
Merge "API: Unhide MethodHandles API (java.lang.invoke)." am:
71b1d50531 am:
ec667adb56
am:
aa90336510
Change-Id: I1e0f760ea4ddc5cac238c17a8cf2e53b40706af9