Only check on launcher proc state when param visible is true.
When launcher moves away from TOP, param visible is false, should skip the proc state check and move ahead to update AppOps. Bug: 151835293 Test: Manual test, open another app and move launcher away from top screen, observe AppOps is updated. Change-Id: I4b1562994d205d7e5b0327b95cf59e08b91ae048
This commit is contained in:
@@ -3647,10 +3647,12 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
|
||||
}
|
||||
|
||||
private void updateAppOpsLocked(Host host, boolean visible) {
|
||||
// The launcher must be at TOP.
|
||||
final int procState = mActivityManagerInternal.getUidProcessState(host.id.uid);
|
||||
if (procState > ActivityManager.PROCESS_STATE_TOP) {
|
||||
return;
|
||||
if (visible) {
|
||||
final int procState = mActivityManagerInternal.getUidProcessState(host.id.uid);
|
||||
if (procState > ActivityManager.PROCESS_STATE_TOP) {
|
||||
// The launcher must be at TOP.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
final List<ResolveInfo> allHomeCandidates = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user