OSDN Git Service

Allow stopping user to access AppWidgetService API
authorTony Mak <tonymak@google.com>
Thu, 16 Jun 2016 13:57:00 +0000 (14:57 +0100)
committerTony Mak <tonymak@google.com>
Thu, 16 Jun 2016 13:57:00 +0000 (14:57 +0100)
commit63966b3e120fe8a0fff729a9508341d53f9daafc
treec7ed41677ec574db9625bdf61a95fc70041b1a87
parent627bca6e80ce7539273f084b4f1694d7433e2791
Allow stopping user to access AppWidgetService API

We now have isUserRunning && isUserKeyUnlockedisUserUnlocked instead of
having isUserUnlockingOrUnlocked. The difference is
we now allow stopping unlocked user to access the API.

Testing:
Write a simple widget which keep calling AppWidgetManager API in a loop.

1. In non-FBE mode, place the widget to launcher.
   Turn off work mode. No crash is observed.
2. Repeat 1 in FBE mode with separated work challenge.
3. Repeat 1 in FBE mode with no separated work challenge
4. Repeat 2 and reboot the device. Unlock work profile, widget is shown
5. Repeat 3, reboot device, widget is shown after rebot

Change-Id: I2fa9f602dcb0befff41fc6b145e9855e82d8d7a8
Fix: 29264823
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java