Fixes a potential race condition - when enabling/disabling the logging
some events might have been lost.
Bug: 29748723
Change-Id: I8a436d525393b2314805e287eddcea26d4ec073b
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)
* 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
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
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
- 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
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
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.
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
Test: the APIs will be tested by CTS when unhidden
Bug: 29748723
(cherry picked from commit da9d3ad3ac40555cd9e491c864bedf3c24f6289c)
Change-Id: Iaff05eb6d4a2fd12e0271c703d694ecfc0dc9a17
Test: this only adds a log message
Bug: 29748723
(cherry picked from commit bcf1c58ec25f275fa25f8aab1c265da868e64e29)
Change-Id: Iad57528c60f35d4820a2f0196cccc92f7c4d3830
We should disable those features before the DO is actually cleared.
Bug: 32901196
Bug: 29748723
(cherry picked from commit c44e67961170ddfb668372dc6e9ce6b391e3740f)
Change-Id: I74679abc26753585f302f3d52bca81fe21e2e668
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
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
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
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