Merge "Add a test api for checking if system supports TaskSnapshot" into sc-dev am: ad6ad26441

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14206607

Change-Id: I3bd71a6dc3dffe25af09a5f076b46834fd6f6030
This commit is contained in:
TreeHugger Robot
2021-04-16 23:49:21 +00:00
committed by Automerger Merge Worker
6 changed files with 29 additions and 1 deletions

View File

@@ -858,4 +858,6 @@ interface IWindowManager
void unregisterCrossWindowBlurEnabledListener(ICrossWindowBlurEnabledListener listener);
void setForceCrossWindowBlurDisabled(boolean disable);
boolean isTaskSnapshotSupported();
}

View File

@@ -4568,4 +4568,13 @@ public interface WindowManager extends ViewManager {
default void holdLock(IBinder token, int durationMs) {
throw new UnsupportedOperationException();
}
/**
* Used for testing to check if the system supports TaskSnapshot mechanism.
* @hide
*/
@TestApi
default boolean isTaskSnapshotSupported() {
return false;
}
}

View File

@@ -335,4 +335,13 @@ public final class WindowManagerImpl implements WindowManager {
} catch (RemoteException e) {
}
}
@Override
public boolean isTaskSnapshotSupported() {
try {
return WindowManagerGlobal.getWindowManagerService().isTaskSnapshotSupported();
} catch (RemoteException e) {
}
return false;
}
}