Loading core/java/android/app/ActivityTaskManager.java +14 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.annotation.SystemService; import android.annotation.TestApi; import android.compat.annotation.UnsupportedAppUsage; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.res.Configuration; import android.content.res.Resources; Loading Loading @@ -482,6 +483,19 @@ public class ActivityTaskManager { } } /** * @return Whether the app could be universal resizeable (assuming it's on a large screen and * ignoring possible overrides) * @hide */ public boolean canBeUniversalResizeable(@NonNull ApplicationInfo appInfo) { try { return getService().canBeUniversalResizeable(appInfo); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Detaches the navigation bar from the app it was attached to during a transition. * @hide Loading core/java/android/app/IActivityTaskManager.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -158,6 +158,12 @@ interface IActivityTaskManager { void reportAssistContextExtras(in IBinder assistToken, in Bundle extras, in AssistStructure structure, in AssistContent content, in Uri referrer); /** * @return whether the app could be universal resizeable (assuming it's on a large screen and * ignoring possible overrides) */ boolean canBeUniversalResizeable(in ApplicationInfo appInfo); void setFocusedRootTask(int taskId); ActivityTaskManager.RootTaskInfo getFocusedRootTaskInfo(); Rect getTaskBounds(int taskId); Loading services/core/java/com/android/server/wm/ActivityRecord.java +2 −2 Original line number Diff line number Diff line Loading @@ -3231,8 +3231,8 @@ final class ActivityRecord extends WindowToken { * Returns {@code true} if the fixed orientation, aspect ratio, resizability of the application * can be ignored. */ static boolean canBeUniversalResizeable(ApplicationInfo appInfo, WindowManagerService wms, boolean isLargeScreen, boolean forActivity) { static boolean canBeUniversalResizeable(@NonNull ApplicationInfo appInfo, WindowManagerService wms, boolean isLargeScreen, boolean forActivity) { if (appInfo.category == ApplicationInfo.CATEGORY_GAME) { return false; } Loading services/core/java/com/android/server/wm/ActivityTaskManagerService.java +10 −0 Original line number Diff line number Diff line Loading @@ -2154,6 +2154,16 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { } } /** * @return ehether the application could be universal resizeable on a large screen, * ignoring any overrides */ @Override public boolean canBeUniversalResizeable(@NonNull ApplicationInfo appInfo) { return ActivityRecord.canBeUniversalResizeable(appInfo, mWindowManager, /* isLargeScreen */ true, /* forActivity */ false); } @Override public void removeAllVisibleRecentTasks() { mAmInternal.enforceCallingPermission(REMOVE_TASKS, "removeAllVisibleRecentTasks()"); Loading Loading
core/java/android/app/ActivityTaskManager.java +14 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.annotation.SystemService; import android.annotation.TestApi; import android.compat.annotation.UnsupportedAppUsage; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.res.Configuration; import android.content.res.Resources; Loading Loading @@ -482,6 +483,19 @@ public class ActivityTaskManager { } } /** * @return Whether the app could be universal resizeable (assuming it's on a large screen and * ignoring possible overrides) * @hide */ public boolean canBeUniversalResizeable(@NonNull ApplicationInfo appInfo) { try { return getService().canBeUniversalResizeable(appInfo); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** * Detaches the navigation bar from the app it was attached to during a transition. * @hide Loading
core/java/android/app/IActivityTaskManager.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -158,6 +158,12 @@ interface IActivityTaskManager { void reportAssistContextExtras(in IBinder assistToken, in Bundle extras, in AssistStructure structure, in AssistContent content, in Uri referrer); /** * @return whether the app could be universal resizeable (assuming it's on a large screen and * ignoring possible overrides) */ boolean canBeUniversalResizeable(in ApplicationInfo appInfo); void setFocusedRootTask(int taskId); ActivityTaskManager.RootTaskInfo getFocusedRootTaskInfo(); Rect getTaskBounds(int taskId); Loading
services/core/java/com/android/server/wm/ActivityRecord.java +2 −2 Original line number Diff line number Diff line Loading @@ -3231,8 +3231,8 @@ final class ActivityRecord extends WindowToken { * Returns {@code true} if the fixed orientation, aspect ratio, resizability of the application * can be ignored. */ static boolean canBeUniversalResizeable(ApplicationInfo appInfo, WindowManagerService wms, boolean isLargeScreen, boolean forActivity) { static boolean canBeUniversalResizeable(@NonNull ApplicationInfo appInfo, WindowManagerService wms, boolean isLargeScreen, boolean forActivity) { if (appInfo.category == ApplicationInfo.CATEGORY_GAME) { return false; } Loading
services/core/java/com/android/server/wm/ActivityTaskManagerService.java +10 −0 Original line number Diff line number Diff line Loading @@ -2154,6 +2154,16 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub { } } /** * @return ehether the application could be universal resizeable on a large screen, * ignoring any overrides */ @Override public boolean canBeUniversalResizeable(@NonNull ApplicationInfo appInfo) { return ActivityRecord.canBeUniversalResizeable(appInfo, mWindowManager, /* isLargeScreen */ true, /* forActivity */ false); } @Override public void removeAllVisibleRecentTasks() { mAmInternal.enforceCallingPermission(REMOVE_TASKS, "removeAllVisibleRecentTasks()"); Loading