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:
@@ -858,4 +858,6 @@ interface IWindowManager
|
||||
void unregisterCrossWindowBlurEnabledListener(ICrossWindowBlurEnabledListener listener);
|
||||
|
||||
void setForceCrossWindowBlurDisabled(boolean disable);
|
||||
|
||||
boolean isTaskSnapshotSupported();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user