Remove SystemUI exclusion for sandboxing
SystemUI was excluded from being returned an activity window's bounds if the activity is eligible for size compat mode. SystemUI was identified by the permissions check for INTERNAL_SYSTEM_WINDOW. After confirming with SystemUI, this is no longer necessary. Note that SystemUI has been returned DisplayArea bounds from the display APIs for a few months now, with no ill effects. Bug: 187491004 Test: atest com.android.server.wm.SizeCompatTests Change-Id: Id2812cb389bb854ee02c11968fb960c9f044b175
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.android.server.wm;
|
||||
|
||||
import static android.Manifest.permission.INTERNAL_SYSTEM_WINDOW;
|
||||
import static android.app.ActivityManager.LOCK_TASK_MODE_NONE;
|
||||
import static android.app.ActivityManager.PROCESS_STATE_IMPORTANT_FOREGROUND;
|
||||
import static android.app.ActivityOptions.ANIM_CLIP_REVEAL;
|
||||
@@ -90,7 +89,6 @@ import static android.content.pm.ActivityInfo.SIZE_CHANGES_SUPPORTED_OVERRIDE;
|
||||
import static android.content.pm.ActivityInfo.SIZE_CHANGES_UNSUPPORTED_OVERRIDE;
|
||||
import static android.content.pm.ActivityInfo.isFixedOrientationLandscape;
|
||||
import static android.content.pm.ActivityInfo.isFixedOrientationPortrait;
|
||||
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
|
||||
import static android.content.res.Configuration.ASSETS_SEQ_UNDEFINED;
|
||||
import static android.content.res.Configuration.EMPTY;
|
||||
import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
|
||||
@@ -281,7 +279,6 @@ import android.os.SystemClock;
|
||||
import android.os.Trace;
|
||||
import android.os.UserHandle;
|
||||
import android.os.storage.StorageManager;
|
||||
import android.permission.PermissionManager;
|
||||
import android.service.dreams.DreamActivity;
|
||||
import android.service.dreams.DreamManagerInternal;
|
||||
import android.service.voice.IVoiceInteractionSession;
|
||||
@@ -7343,11 +7340,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
|
||||
@Override
|
||||
public boolean providesMaxBounds() {
|
||||
// System and SystemUI should always be able to access the physical display bounds,
|
||||
// so do not provide it with the overridden maximum bounds.
|
||||
// TODO(b/179179513) check WindowState#mOwnerCanAddInternalSystemWindow instead
|
||||
if (getUid() == SYSTEM_UID || PermissionManager.checkPermission(INTERNAL_SYSTEM_WINDOW,
|
||||
getPid(), info.applicationInfo.uid) == PERMISSION_GRANTED) {
|
||||
// System should always be able to access the DisplayArea bounds, so do not provide it with
|
||||
// compat max window bounds.
|
||||
if (getUid() == SYSTEM_UID) {
|
||||
return false;
|
||||
}
|
||||
// Do not sandbox to activity window bounds if the feature is disabled.
|
||||
|
||||
Reference in New Issue
Block a user