257551 Commits

Author SHA1 Message Date
Michael Kwan
4308eaa477 Fix swipe-to-dismiss to properly react to swipe gestures.
am: 8a9b27773b

Change-Id: I2b25052c22b5f50f95d0365eff4e3b2e27625b7f
2016-12-15 21:16:05 +00:00
Phil Weaver
718f403b50 Add null check to a11y interrupt.
am: 74f9e1b867

Change-Id: I8bb63b88a12ab6f8dfae42918ab9fdf4b1a457b5
2016-12-15 19:04:59 +00:00
Michal Karpinski
92cd0ce92d DO NOT MERGE Make NetworkLogger.mIsLoggingEnabled an AtomicBoolean
Fixes a potential race condition - when enabling/disabling the logging
some events might have been lost.

Bug: 29748723
Change-Id: I8a436d525393b2314805e287eddcea26d4ec073b
2016-12-15 12:54:36 +00:00
TreeHugger Robot
c75ab85cd2 Merge "Have IpManager track L2-L4 signaling traffic required for IP connectivity." into nyc-mr2-dev 2016-12-15 10:03:46 +00:00
Erik Kline
473355f96b Have IpManager track L2-L4 signaling traffic required for IP connectivity.
Test: as follows
    - built and flashed
    - observed logcat
    - observed "dumpsys wifi ipmanager"
    - runtest BlockingSocketReaderTest passes
    - runtest ConnectivityPacketSummaryTest passes
Bug: 21859053
Bug: 26101306
Bug: 31742572
Bug: 31707128
Bug: 33531488

Change-Id: Ibecaf809dcc1813924b25749e8ba8eb2d4bdf114
2016-12-15 17:16:48 +09:00
Phil Weaver
74f9e1b867 Add null check to a11y interrupt.
Also adding same robustness to interrupt that we have for
sending a11y events.

Bug: 32507871

Test: Ran a11y CTS. Verified manually with sample app
that sends interrupt and accessibility service that
crashes when started. That case used to crash the
app, and doesn't anymore.
Change-Id: I5cf05dcbb54ea23ae876cb3258dd206c55dce775
(cherry picked from commit 867ad35d9c676b5ba2047b0fc9a4006737e5c4aa)
2016-12-15 08:06:15 +00:00
Bill Yi
1e0cc808ab Import translations. DO NOT MERGE
Change-Id: I5a8c801eacef878f41a988ed655e6fa367909033
Auto-generated-cl: translation import
2016-12-14 18:56:18 -08:00
Julius D'souza
7af83d0e5a fix case issues with mGoingIdleWakeLock in DeviceIdleController am: e6f8cb29ec -s ours am: 7a69e8f3d8 am: af0b547fc7 am: 20081c4e71 am: 8cc9f081aa
am: 1838237435

Change-Id: I1db5fee4adb196ff725815c3e4182f7e661e6d26
2016-12-14 19:24:01 +00:00
Julius D'souza
1838237435 fix case issues with mGoingIdleWakeLock in DeviceIdleController am: e6f8cb29ec -s ours am: 7a69e8f3d8 am: af0b547fc7 am: 20081c4e71
am: 8cc9f081aa

Change-Id: I39ecaf420d8bc4390c737fd378fd0e32202e2d8c
2016-12-14 19:18:04 +00:00
Julius D'souza
8cc9f081aa fix case issues with mGoingIdleWakeLock in DeviceIdleController am: e6f8cb29ec -s ours am: 7a69e8f3d8 am: af0b547fc7
am: 20081c4e71

Change-Id: I5e461a835cf64ba69894da2c5493a9d8a1ebcbcf
2016-12-14 19:11:59 +00:00
Julius D'souza
20081c4e71 fix case issues with mGoingIdleWakeLock in DeviceIdleController am: e6f8cb29ec -s ours am: 7a69e8f3d8
am: af0b547fc7

Change-Id: I23ef765ebbd2dde2110946fcc46c6b61e11733f2
2016-12-14 19:06:29 +00:00
Julius D'souza
af0b547fc7 fix case issues with mGoingIdleWakeLock in DeviceIdleController am: e6f8cb29ec -s ours
am: 7a69e8f3d8

Change-Id: I581e1cd6ef0dec7042802b29dd76db8ffc02cec3
2016-12-14 19:00:38 +00:00
Julius D'souza
7a69e8f3d8 fix case issues with mGoingIdleWakeLock in DeviceIdleController
am: e6f8cb29ec  -s ours

Change-Id: Ia7bdba0fd3d52bb2d7c33f81d376336563f3a5cb
2016-12-14 18:54:02 +00:00
Julius D'souza
e6f8cb29ec fix case issues with mGoingIdleWakeLock in DeviceIdleController
Bug: 31900521

Change-Id: I9484b10f0e6b99dfaf11266bb275a31d7ff3868c
2016-12-14 10:31:12 -08:00
Julius D'souza
a481fd31cf DO NOT MERGE ANYWHERE: Hold a wake lock while DeviceIdleController is going idle. am: f9f39cc4a8 -s ours am: 589f83e686 -s ours am: 495aa09cc6 -s ours am: 10a9005003 -s ours am: 03c946e06b -s ours
am: c2aed112a7  -s ours

Change-Id: Icf2354559cf4c0cac6d61d89378b00e9831e9e14
2016-12-14 18:15:47 +00:00
Philip P. Moltmann
61b0f84005 Merge changes from topic 'backportSharedpreferencesSpeedUp' into nyc-mr2-dev
* changes:
  Do not write if apply() did not change the file.
  Only persist last Shared Preferences state
2016-12-14 18:13:34 +00:00
Julius D'souza
c2aed112a7 DO NOT MERGE ANYWHERE: Hold a wake lock while DeviceIdleController is going idle. am: f9f39cc4a8 -s ours am: 589f83e686 -s ours am: 495aa09cc6 -s ours am: 10a9005003 -s ours
am: 03c946e06b  -s ours

Change-Id: I75323469d9e15ea3b8652bb5f972d0e14a06cc7a
2016-12-14 18:09:25 +00:00
Julius D'souza
03c946e06b DO NOT MERGE ANYWHERE: Hold a wake lock while DeviceIdleController is going idle. am: f9f39cc4a8 -s ours am: 589f83e686 -s ours am: 495aa09cc6 -s ours
am: 10a9005003  -s ours

Change-Id: I7a1d2d5b60b27765b2381e6d85fd3f8e967a40e1
2016-12-14 18:03:26 +00:00
Julius D'souza
10a9005003 DO NOT MERGE ANYWHERE: Hold a wake lock while DeviceIdleController is going idle. am: f9f39cc4a8 -s ours am: 589f83e686 -s ours
am: 495aa09cc6  -s ours

Change-Id: I0f1a50fac9a6fc8a5c21b890aaa3aea5ea2aca74
2016-12-14 17:56:53 +00:00
Julius D'souza
495aa09cc6 DO NOT MERGE ANYWHERE: Hold a wake lock while DeviceIdleController is going idle. am: f9f39cc4a8 -s ours
am: 589f83e686  -s ours

Change-Id: I76a619ed9824174735d0a86c55fe13a3d6e90ec5
2016-12-14 17:51:28 +00:00
Julius D'souza
589f83e686 DO NOT MERGE ANYWHERE: Hold a wake lock while DeviceIdleController is going idle.
am: f9f39cc4a8  -s ours

Change-Id: Ibd0b18a9e833afcc85845f4db57a927e80739cc2
2016-12-14 17:44:27 +00:00
TreeHugger Robot
c8059fb94c Merge "More correct startup and shutdown procedures." into nyc-mr2-dev 2016-12-14 11:33:38 +00:00
Michal Karpinski
d9eb4fce7d Merge changes from topic 'network-logging-nyc-mr2-dev' into nyc-mr2-dev
* changes:
  DO NOT MERGE Fixes in comments for NetworkEvent, DnsEvent and ConnectEvent
  DO NOT MERGE Fix Lint errors for network logging API
  DO NOT MERGE Logging when the new batch of network logs broadcast is sent to DO
  DO NOT MERGE Disable DO single user features when clearDeviceOwner() is called regardless of the amount of users
  DO NOT MERGE Fix disabling DO single user features when clearDeviceOwner() is called
  DO NOT MERGE [DPM] Minor code fixes in NetworkLoggingHandler
  DO NOT MERGE [DPM] DO uses batch token to retrieve network logs, and can retrieve the same batch many times
  DO NOT MERGE [DPM] Management and retrieval of network logs
  DO NOT MERGE [DPM] DO can start network logging and listen for events
2016-12-14 10:44:23 +00:00
Erik Kline
6c0782f1ae More correct startup and shutdown procedures.
During IpManager startup, anything sending messages to the state machine
must not begin doing so until after the state machine has been started.
Reorder the constructor accordingly.

During shutdown, AvoidBadWifiTracker needs to unregister the registered
BroadcastReceiver and might as well also unregister the ContentObserver.

Bug: 33388922
Change-Id: I58e07f7ccddaab160c153bcfb69fd45f50bb8710
2016-12-14 18:53:26 +09:00
TreeHugger Robot
3661a6f91b Merge "Fix VR interaction with screen on/off/lockscreen." into nyc-mr2-dev 2016-12-14 08:22:33 +00:00
Lorenzo Colitti
5625d486b9 Merge "Display "Sign into network" in settings when on a captive portal." into nyc-mr2-dev 2016-12-14 04:48:41 +00:00
Julius D'souza
f9f39cc4a8 DO NOT MERGE ANYWHERE: Hold a wake lock while DeviceIdleController
is going idle.

The inputs to DeviceIdleController (alarm manager, sensors)
hold wake locks while they call it.  But then the real work
happens in a handler which is outside of the wakelock, so
listeners don't get a chance to run right away, which in
the case of NetworkPolicyManager means the device is in a
higher power state than it should be.

It's not clear that this will 100% fix the bug, because
NetworkPolicyManagerService also has its own internal
Handler, and isn't holding its own wakelock for this,
but this change allows NPMS to be fixed if it really
needed to be.

Bug: 31900521
Change-Id: I706045aa189147824c9214c57abc13993aee9a5b
2016-12-13 18:28:31 -08:00
Ruben Brunk
040484cf90 Fix VR interaction with screen on/off/lockscreen.
- Add mechanism to prevent VR mode from being enabled.
- Disable VR mode while screen is off, or user is in lockscreen,
  and re-enable when this is no longer the case.

Merged-In: Ia0a7fe8d443a24dce9395053cfe3d1c5847a88f2

Bug: 31665197
Change-Id: Ia0a7fe8d443a24dce9395053cfe3d1c5847a88f2
2016-12-13 17:32:21 -08:00
Michael Kwan
8a9b27773b Fix swipe-to-dismiss to properly react to swipe gestures.
Test: manual test
Bug: 33588580
Change-Id: If8d03f90a25e989e254e3a21bafef4e76bab5d7b
2016-12-13 17:10:12 -08:00
Philip P. Moltmann
ea10cc0fbb Do not write if apply() did not change the file.
Bug: 33385963
Test: SharedPreferences CTS tests
Change-Id: I39955f8fbcdaa54faa539a3c503e12cb00808136
2016-12-14 01:00:37 +00:00
Philip P. Moltmann
31d6889f4c Only persist last Shared Preferences state
If multiple async shared preferences writes are queued, all but the
last one can be ignored as they will be overwritten by the last one
anyway.

For commit() we need to make sure that we have at least persisted the
state of the commit.

Generation counts are 64 bit, hence they never overflow.

Test: Produced a lot of SharedPreferences.Editor.apply and did not see
excessive writes anymore, ran SharedPreferences CTS tests
Bug: 33385963
Change-Id: I3968ed4b71befee6eeb90bea1666a0bb646544f6
2016-12-14 00:56:03 +00:00
TreeHugger Robot
3a39fe6bed Merge "Keyguard: Don't lock if SIM is NOT_READY" into nyc-mr2-dev 2016-12-14 00:55:41 +00:00
Ruben Brunk
f755dfb89e Merge "Prevent crash on uninstall." into nyc-mr2-dev 2016-12-14 00:24:41 +00:00
Adrian Roos
e92de95261 Keyguard: Don't lock if SIM is NOT_READY
Fixes an issue with MVNOs where the lockscreen
would show in response to a virtual SIM switch.

Now we no longer lock with NOT_READY.

Change-Id: I520200311a5ae3218f1743b1fc9a568c39933ebf
Fixes: 33386149
Bug: 30997251
Test: Set up secure lockscreen, insert Fi SIM, dial *#*#346398#*#*, verify screen does not lock, eject SIM, verify screen locks.
2016-12-13 14:53:49 -08:00
Robert Carr
0bfaa461c6 [DO NOT MERGE] Prevent crash from early Toast surface destruction.
To understand this change it's first helpful to review Toasts.
The ViewRoot is constructed on the client side, but it's added,
to a window token controlled by the NotificationManagerService.
When we call NotificationManagerService#cancelToast, the system
will remove this window token. With the window token removed,
the WindowManager needs to destroy the surface to prevent orphaned
windows. If we destroy the Surface before removing the toast on the
client side however, we've never asked the ViewRoot to stop rendering
and we could have a crash. To solve this we just have to ensure we call
removeView before cancelToast.

Bug: 31547288
Bug: 30150688
Change-Id: I96672b0ac07ff18e9f51348f2ed42913c5a5226f
2016-12-13 21:11:10 +00:00
Ben Lin
ab58b5a3dd DO NOT MERGE Using Activity#setTitle to have TalkBack announce root
traversal.

Bug: 32260739
Bug: 28275570
Change-Id: Ie3711e8ccbf588838a3f21346f317243516382bd
2016-12-13 11:32:05 -08:00
Ben Lin
52a9e0e1dd Merge "DO NOT MERGE ANYWHERE Revert "Using Activity#setTitle to have TalkBack announce root traversal."" into nyc-mr2-dev 2016-12-13 19:09:43 +00:00
Ben Lin
98e58262d2 DO NOT MERGE ANYWHERE Revert "Using Activity#setTitle to have TalkBack announce root traversal."
This reverts commit 4c80659e99b182492a4719560180079d23c1b338.

Change-Id: Id5fa68f37170e61e2e63fdb3a60e8a3db79c81fa
2016-12-13 19:06:51 +00:00
Michal Karpinski
e3639a0a07 DO NOT MERGE Fixes in comments for NetworkEvent, DnsEvent and ConnectEvent
Test: the APIs will be tested by CTS when unhidden
Bug: 29748723

(cherry picked from commit da9d3ad3ac40555cd9e491c864bedf3c24f6289c)

Change-Id: Iaff05eb6d4a2fd12e0271c703d694ecfc0dc9a17
2016-12-13 17:25:49 +00:00
Michal Karpinski
0c4ec00f85 DO NOT MERGE Fix Lint errors for network logging API
Bug: 29748723

(cherry picked from commit 0879eb41ca8c642c8b7391391f6316fe8f5e5906)

Change-Id: I187aa5b96c283323edb6a1ebe5005d70e19bf563
2016-12-13 17:25:24 +00:00
Michal Karpinski
c4e7c32063 DO NOT MERGE Logging when the new batch of network logs broadcast is sent to DO
Test: this only adds a log message
Bug: 29748723

(cherry picked from commit bcf1c58ec25f275fa25f8aab1c265da868e64e29)

Change-Id: Iad57528c60f35d4820a2f0196cccc92f7c4d3830
2016-12-13 17:24:55 +00:00
Michal Karpinski
504fa62f9e DO NOT MERGE Disable DO single user features when clearDeviceOwner() is called
regardless of the amount of users

Bug: 32901196
Bug: 29748723
Change-Id: Ie419b5e496e23656cbe5436942d9aba402bfe68e
2016-12-13 17:24:17 +00:00
Michal Karpinski
5c64223da4 DO NOT MERGE Fix disabling DO single user features when clearDeviceOwner() is called
We should disable those features before the DO is actually cleared.

Bug: 32901196
Bug: 29748723

(cherry picked from commit c44e67961170ddfb668372dc6e9ce6b391e3740f)

Change-Id: I74679abc26753585f302f3d52bca81fe21e2e668
2016-12-13 17:23:42 +00:00
Michal Karpinski
896b9db8ed DO NOT MERGE [DPM] Minor code fixes in NetworkLoggingHandler
Added a comment and renamed field to follow mConvention.

Test: will be CTS tested once APIs unhidden
Bug: 29748723

(cherry picked from commit aabe96db87838501d3abeb96c25a4b1c50b9c12c)

Change-Id: I7ef118723d13ce1d313c3c56299c2dca2411eee6
2016-12-13 17:22:53 +00:00
Michal Karpinski
bbf352a2c1 DO NOT MERGE [DPM] DO uses batch token to retrieve network logs, and can retrieve
the same batch many times

This allows DO to:
a) know that some logs were dropped (by trying with token and not
getting anything)
b) know how many logs were there in each batch (useful especially
for the dropped ones)
c) retry batch retrieval if it failed

Test: will be CTS tested once APIs unhidden
Bug: 29748723

(cherry picked from commit a9ff206af26871695bfce54969428b8ad03e31e6)

Change-Id: Iac10e61cdf3b100719a9c029ff897bd5ef5c8e2f
2016-12-13 17:22:07 +00:00
Michal Karpinski
4c47adef60 DO NOT MERGE [DPM] Management and retrieval of network logs
This CL follows up on ag/1530343 and adds:
1) Various network events.
2) Retrieval method in DPM and APIs in DeviceAdminReceiver.
3) Extension of NetworkLogger and it's NetworkLoggingHandler.

Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/NetworkEventTest.java
Bug: 29748723
Change-Id: I42a1a477e7c75c109a3982f809c22732b814e8b2
2016-12-13 17:19:22 +00:00
Michal Karpinski
c3abd34cfe DO NOT MERGE [DPM] DO can start network logging and listen for events
This CL adds:
1) Setter and getter in DPM to manipulate logging switch (retrieval
method to come in a subsequent CL(s)).
2) A way for DPM to register to listen for events.
3) Skeleton of NetworkLogger class (more to come in subsequent CL(s)).

Bug: 29748723
Change-Id: I5c04662ccc6febd2ba294b0eaca1ed1da9c16e47
2016-12-13 17:15:38 +00:00
Ivan Podogov
c5700918aa Merge changes from topic 'f-radio-toggle' into cw-f-dev
am: e5592abb83

Change-Id: I7b7052c0402a73bda44db5970f96b6d7226361fc
2016-12-13 16:02:45 +00:00
Svetoslav Ganov
e07563cc96 Add WiFi toggle prompts - framework
am: 82737b42a6

Change-Id: Ia8958b54d04fff971b96fc6d29771eb94fd9b17e
2016-12-13 16:02:23 +00:00
Svetoslav Ganov
d23dc17754 Add Bluetooth toggle prompts - framework
am: b1e2da7c24

Change-Id: I29c038d23488c504c838a85bd97c255b84919aab
2016-12-13 16:01:39 +00:00