Otherwise it may cause deadlocks, for instance if
updateUserRestrictionsInternalLR is called with AMS lock held.
Bug: 28888422
Change-Id: I455c7392f206ff0bb6c99ec5c4a531921a115070
Cancel a job before re-scheduling it to avoid
the situation where a job could still be in
JobScheduler's pending queue.
Retry a sync even if it has specified the
do_not_retry extra if the sync failed due
to SyncAlreadyInProgress.
Bug: 27532761
Change-Id: Ia5d2b31fa4e44560a3f170a2bdbf53151bff7a20
- Don't ensure configuration for top running activity that is in the
stopped state if the configuration change while the device is sleeping
as we don't want to relaunch activities in this state.
- Don't make activities visible while the device is sleeping and the
activity isn't in voice interaction mode. Making it visible can also
lead to the activity been relaunched due to configuration changing.
Note the the right configuration will be applied to the activity the next
time we try to make it visible. The re-launch will happen then.
Bug: 28518380
Change-Id: Ic22193db645dec358065cb05e7f1afc6fc8ac49f
If task was requested to move to adjacent stack with mLaunchStackId set
and FLAG_ACTIVITY_LAUNCH_ADJACENT not set - we don't move it from its
current stack. If the task was covered with other task(s) it wouldn't
be brought to front.
This CL checks if mLaunchStackId is provided and is a valid stack for this
task, then we move it to front of current stack as a safer option.
Bug: 29103549
Change-Id: I3065960f082cfbf9a5b43c6e83b5cebe3dd69df6
Added a new section from Dirk, with a couple of gotchas for people
updating from API level ≤22 to 24.
See first comment for doc stage location.
Change-Id: I237e9efac75b9c1e0fbeecf362dbc0de7c958c60
Remove MANAGE_USERS permission from shell and whitelist it for
some specific functionality.
Bug: 29189712
Change-Id: Ifb37448c091af91991964511e3efb1bb4dea1ff3
Just in case a userid was not properly cleaned
when the user was removed, make sure it is
cleaned up when a new user takes up the same
userid. This prevents inconsistent lockscreen
state and avoids a crash in Settings when trying
to set a password for the new user.
Fixes: 29412112
Change-Id: Ic4f0efbb97786b0290c74325b28c9d74825e9e53
A package can be uninstalled for the system user but still be installed
on the device. Currently, we do not use such a package as WebView
implementation which means we fall back to using the fallback WebView
package.
However, if the fallback package is not valid (because it needs to be
updated first) loading WebView will fail.
With this change we fetch allow the fetching of information from
packages that are uninstalled for the system user so that we can still
load WebView when the only valid WebView provider is uninstalled for the
system user.
Also listen to package additions/changes/removals for all users -
otherwise we won't notice when a package becomes replaced if it was
already uninstalled for the system user.
Bug: 29321185
Change-Id: Ia23c4493844877aea1b4eab7e666fd37540c4f97
Before calling a method ending with LPw, we need to have the mPackages lock.
Make sure we do that.
Also, ditch the iterator for traversing an ArraySet.
Bug: 29356333
Change-Id: I67df971f2961b577f31153cef46fb153458d6965
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
...as active for idle maintenance
Nor jobs of whitelisted apps.
Now they don't.
Also remove the no longer used "active download" tracking code.
Change-Id: I553197801f6eabaf15716f3201dd65257a0d4e94