Loading core/java/android/view/ViewRootImpl.java +7 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,7 @@ import android.os.SystemProperties; import android.os.Trace; import android.os.UserHandle; import android.sysprop.DisplayProperties; import android.text.TextUtils; import android.util.AndroidRuntimeException; import android.util.DisplayMetrics; import android.util.EventLog; Loading Loading @@ -10739,6 +10740,12 @@ public final class ViewRootImpl implements ViewParent, * {@link OnBackInvokedCallback} to be called to the server. */ private void registerBackCallbackOnWindow() { if (OnBackInvokedDispatcher.DEBUG) { Log.d(OnBackInvokedDispatcher.TAG, TextUtils.formatSimple( "ViewRootImpl.registerBackCallbackOnWindow. Callback:%s Package:%s " + "IWindow:%s Session:%s", mOnBackInvokedDispatcher, mBasePackageName, mWindow, mWindowSession)); } mOnBackInvokedDispatcher.attachToWindow(mWindowSession, mWindow); } Loading core/java/android/window/BackNavigationInfo.java +96 −3 Original line number Diff line number Diff line Loading @@ -81,7 +81,9 @@ public final class BackNavigationInfo implements Parcelable { TYPE_DIALOG_CLOSE, TYPE_RETURN_TO_HOME, TYPE_CROSS_ACTIVITY, TYPE_CROSS_TASK}) TYPE_CROSS_TASK, TYPE_CALLBACK }) @interface BackTargetType { } Loading Loading @@ -121,8 +123,8 @@ public final class BackNavigationInfo implements Parcelable { @Nullable SurfaceControl screenshotSurface, @Nullable HardwareBuffer screenshotBuffer, @Nullable WindowConfiguration taskWindowConfiguration, @NonNull RemoteCallback onBackNavigationDone, @NonNull IOnBackInvokedCallback onBackInvokedCallback) { @Nullable RemoteCallback onBackNavigationDone, @Nullable IOnBackInvokedCallback onBackInvokedCallback) { mType = type; mDepartingAnimationTarget = departingAnimationTarget; mScreenshotSurface = screenshotSurface; Loading Loading @@ -278,7 +280,98 @@ public final class BackNavigationInfo implements Parcelable { return "TYPE_CROSS_ACTIVITY"; case TYPE_CROSS_TASK: return "TYPE_CROSS_TASK"; case TYPE_CALLBACK: return "TYPE_CALLBACK"; } return String.valueOf(type); } /** * @hide */ @SuppressWarnings("UnusedReturnValue") // Builder pattern public static class Builder { private int mType = TYPE_UNDEFINED; @Nullable private RemoteAnimationTarget mDepartingAnimationTarget = null; @Nullable private SurfaceControl mScreenshotSurface = null; @Nullable private HardwareBuffer mScreenshotBuffer = null; @Nullable private WindowConfiguration mTaskWindowConfiguration = null; @Nullable private RemoteCallback mOnBackNavigationDone = null; @Nullable private IOnBackInvokedCallback mOnBackInvokedCallback = null; /** * @see BackNavigationInfo#getType() */ public Builder setType(@BackTargetType int type) { mType = type; return this; } /** * @see BackNavigationInfo#getDepartingAnimationTarget */ public Builder setDepartingAnimationTarget( @Nullable RemoteAnimationTarget departingAnimationTarget) { mDepartingAnimationTarget = departingAnimationTarget; return this; } /** * @see BackNavigationInfo#getScreenshotSurface */ public Builder setScreenshotSurface(@Nullable SurfaceControl screenshotSurface) { mScreenshotSurface = screenshotSurface; return this; } /** * @see BackNavigationInfo#getScreenshotHardwareBuffer() */ public Builder setScreenshotBuffer(@Nullable HardwareBuffer screenshotBuffer) { mScreenshotBuffer = screenshotBuffer; return this; } /** * @see BackNavigationInfo#getTaskWindowConfiguration */ public Builder setTaskWindowConfiguration( @Nullable WindowConfiguration taskWindowConfiguration) { mTaskWindowConfiguration = taskWindowConfiguration; return this; } /** * @see BackNavigationInfo#onBackNavigationFinished(boolean) */ public Builder setOnBackNavigationDone(@Nullable RemoteCallback onBackNavigationDone) { mOnBackNavigationDone = onBackNavigationDone; return this; } /** * @see BackNavigationInfo#getOnBackInvokedCallback */ public Builder setOnBackInvokedCallback( @Nullable IOnBackInvokedCallback onBackInvokedCallback) { mOnBackInvokedCallback = onBackInvokedCallback; return this; } /** * Builds and returns an instance of {@link BackNavigationInfo} */ public BackNavigationInfo build() { return new BackNavigationInfo(mType, mDepartingAnimationTarget, mScreenshotSurface, mScreenshotBuffer, mTaskWindowConfiguration, mOnBackNavigationDone, mOnBackInvokedCallback); } } } core/java/android/window/ProxyOnBackInvokedDispatcher.java +5 −5 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ public class ProxyOnBackInvokedDispatcher implements OnBackInvokedDispatcher { public void unregisterOnBackInvokedCallback( @NonNull OnBackInvokedCallback callback) { if (DEBUG) { Log.v(TAG, String.format("Pending unregister %s. Actual=%s", callback, Log.v(TAG, String.format("Proxy unregister %s. Actual=%s", callback, mActualDispatcherOwner)); } synchronized (mLock) { Loading Loading @@ -109,8 +109,8 @@ public class ProxyOnBackInvokedDispatcher implements OnBackInvokedDispatcher { OnBackInvokedDispatcher dispatcher = mActualDispatcherOwner.getOnBackInvokedDispatcher(); if (DEBUG) { Log.v(TAG, String.format("Pending transferring %d callbacks to %s", mCallbacks.size(), dispatcher)); Log.v(TAG, String.format("Proxy: transferring %d pending callbacks to %s", mCallbacks.size(), dispatcher)); } for (Pair<OnBackInvokedCallback, Integer> callbackPair : mCallbacks) { int priority = callbackPair.second; Loading Loading @@ -144,7 +144,7 @@ public class ProxyOnBackInvokedDispatcher implements OnBackInvokedDispatcher { */ public void reset() { if (DEBUG) { Log.v(TAG, "Pending reset callbacks"); Log.v(TAG, "Proxy: reset callbacks"); } synchronized (mLock) { mCallbacks.clear(); Loading @@ -165,7 +165,7 @@ public class ProxyOnBackInvokedDispatcher implements OnBackInvokedDispatcher { public void setActualDispatcherOwner( @Nullable OnBackInvokedDispatcherOwner actualDispatcherOwner) { if (DEBUG) { Log.v(TAG, String.format("Pending setActual %s. Current %s", Log.v(TAG, String.format("Proxy setActual %s. Current %s", actualDispatcherOwner, mActualDispatcherOwner)); } synchronized (mLock) { Loading data/etc/services.core.protolog.json +42 −12 Original line number Diff line number Diff line Loading @@ -397,6 +397,12 @@ "group": "WM_DEBUG_WINDOW_TRANSITIONS", "at": "com\/android\/server\/wm\/Transition.java" }, "-1717147904": { "message": "Current focused window is embeddedWindow. Dispatch KEYCODE_BACK.", "level": "DEBUG", "group": "WM_DEBUG_BACK_PREVIEW", "at": "com\/android\/server\/wm\/BackNavigationController.java" }, "-1715268616": { "message": "Last window, removing starting window %s", "level": "VERBOSE", Loading Loading @@ -1087,6 +1093,12 @@ "group": "WM_DEBUG_STATES", "at": "com\/android\/server\/wm\/ActivityRecord.java" }, "-1010850753": { "message": "No focused window, defaulting to top task's window", "level": "WARN", "group": "WM_DEBUG_BACK_PREVIEW", "at": "com\/android\/server\/wm\/BackNavigationController.java" }, "-1009117329": { "message": "isFetchingAppTransitionSpecs=true", "level": "VERBOSE", Loading @@ -1105,6 +1117,12 @@ "group": "WM_DEBUG_STATES", "at": "com\/android\/server\/wm\/ActivityRecord.java" }, "-997565097": { "message": "Focused window found using getFocusedWindowToken", "level": "DEBUG", "group": "WM_DEBUG_BACK_PREVIEW", "at": "com\/android\/server\/wm\/BackNavigationController.java" }, "-993378225": { "message": "finishDrawingLocked: mDrawState=COMMIT_DRAW_PENDING %s in %s", "level": "VERBOSE", Loading Loading @@ -1327,6 +1345,12 @@ "group": "WM_DEBUG_FOCUS_LIGHT", "at": "com\/android\/server\/wm\/ActivityRecord.java" }, "-767349300": { "message": "%s: Setting back callback %s. Client IWindow %s", "level": "DEBUG", "group": "WM_DEBUG_BACK_PREVIEW", "at": "com\/android\/server\/wm\/WindowState.java" }, "-766059044": { "message": "Display id=%d selected orientation %s (%d), got rotation %s (%d)", "level": "VERBOSE", Loading Loading @@ -1669,12 +1693,6 @@ "group": "WM_DEBUG_STATES", "at": "com\/android\/server\/wm\/RootWindowContainer.java" }, "-432881038": { "message": "startBackNavigation task=%s, topRunningActivity=%s, applicationBackCallback=%s, systemBackCallback=%s", "level": "DEBUG", "group": "WM_DEBUG_BACK_PREVIEW", "at": "com\/android\/server\/wm\/BackNavigationController.java" }, "-415865166": { "message": "findFocusedWindow: Found new focus @ %s", "level": "VERBOSE", Loading Loading @@ -1885,12 +1903,6 @@ "group": "WM_DEBUG_SYNC_ENGINE", "at": "com\/android\/server\/wm\/BLASTSyncEngine.java" }, "-228813488": { "message": "%s: Setting back callback %s", "level": "DEBUG", "group": "WM_DEBUG_BACK_PREVIEW", "at": "com\/android\/server\/wm\/WindowState.java" }, "-208825711": { "message": "shouldWaitAnimatingExit: isWallpaperTarget: %s", "level": "DEBUG", Loading Loading @@ -2359,6 +2371,12 @@ "group": "WM_DEBUG_REMOTE_ANIMATIONS", "at": "com\/android\/server\/wm\/RemoteAnimationController.java" }, "250620778": { "message": "startBackNavigation task=%s, topRunningActivity=%s, applicationBackCallback=%s, systemBackCallback=%s, currentFocus=%s", "level": "DEBUG", "group": "WM_DEBUG_BACK_PREVIEW", "at": "com\/android\/server\/wm\/BackNavigationController.java" }, "251812577": { "message": "Register display organizer=%s uid=%d", "level": "VERBOSE", Loading Loading @@ -2677,6 +2695,12 @@ "group": "WM_SHOW_TRANSACTIONS", "at": "com\/android\/server\/wm\/WindowContainerThumbnail.java" }, "531891870": { "message": "Previous Destination is Activity:%s Task:%s removedContainer:%s, backType=%s", "level": "DEBUG", "group": "WM_DEBUG_BACK_PREVIEW", "at": "com\/android\/server\/wm\/BackNavigationController.java" }, "535103992": { "message": "Wallpaper may change! Adjusting", "level": "VERBOSE", Loading Loading @@ -2911,6 +2935,12 @@ "group": "WM_DEBUG_LOCKTASK", "at": "com\/android\/server\/wm\/ActivityTaskManagerService.java" }, "716528224": { "message": "Focused window found using wmService.getFocusedWindowLocked()", "level": "DEBUG", "group": "WM_DEBUG_BACK_PREVIEW", "at": "com\/android\/server\/wm\/BackNavigationController.java" }, "726205185": { "message": "Moving to DESTROYED: %s (destroy skipped)", "level": "VERBOSE", Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/back/BackAnimationControllerTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import com.android.wm.shell.TestShellExecutor; import com.android.wm.shell.common.ShellExecutor; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; Loading Loading @@ -109,6 +110,7 @@ public class BackAnimationControllerTest { } @Test @Ignore("b/207481538") public void crossActivity_screenshotAttachedAndVisible() { SurfaceControl screenshotSurface = new SurfaceControl(); HardwareBuffer hardwareBuffer = mock(HardwareBuffer.class); Loading Loading
core/java/android/view/ViewRootImpl.java +7 −0 Original line number Diff line number Diff line Loading @@ -149,6 +149,7 @@ import android.os.SystemProperties; import android.os.Trace; import android.os.UserHandle; import android.sysprop.DisplayProperties; import android.text.TextUtils; import android.util.AndroidRuntimeException; import android.util.DisplayMetrics; import android.util.EventLog; Loading Loading @@ -10739,6 +10740,12 @@ public final class ViewRootImpl implements ViewParent, * {@link OnBackInvokedCallback} to be called to the server. */ private void registerBackCallbackOnWindow() { if (OnBackInvokedDispatcher.DEBUG) { Log.d(OnBackInvokedDispatcher.TAG, TextUtils.formatSimple( "ViewRootImpl.registerBackCallbackOnWindow. Callback:%s Package:%s " + "IWindow:%s Session:%s", mOnBackInvokedDispatcher, mBasePackageName, mWindow, mWindowSession)); } mOnBackInvokedDispatcher.attachToWindow(mWindowSession, mWindow); } Loading
core/java/android/window/BackNavigationInfo.java +96 −3 Original line number Diff line number Diff line Loading @@ -81,7 +81,9 @@ public final class BackNavigationInfo implements Parcelable { TYPE_DIALOG_CLOSE, TYPE_RETURN_TO_HOME, TYPE_CROSS_ACTIVITY, TYPE_CROSS_TASK}) TYPE_CROSS_TASK, TYPE_CALLBACK }) @interface BackTargetType { } Loading Loading @@ -121,8 +123,8 @@ public final class BackNavigationInfo implements Parcelable { @Nullable SurfaceControl screenshotSurface, @Nullable HardwareBuffer screenshotBuffer, @Nullable WindowConfiguration taskWindowConfiguration, @NonNull RemoteCallback onBackNavigationDone, @NonNull IOnBackInvokedCallback onBackInvokedCallback) { @Nullable RemoteCallback onBackNavigationDone, @Nullable IOnBackInvokedCallback onBackInvokedCallback) { mType = type; mDepartingAnimationTarget = departingAnimationTarget; mScreenshotSurface = screenshotSurface; Loading Loading @@ -278,7 +280,98 @@ public final class BackNavigationInfo implements Parcelable { return "TYPE_CROSS_ACTIVITY"; case TYPE_CROSS_TASK: return "TYPE_CROSS_TASK"; case TYPE_CALLBACK: return "TYPE_CALLBACK"; } return String.valueOf(type); } /** * @hide */ @SuppressWarnings("UnusedReturnValue") // Builder pattern public static class Builder { private int mType = TYPE_UNDEFINED; @Nullable private RemoteAnimationTarget mDepartingAnimationTarget = null; @Nullable private SurfaceControl mScreenshotSurface = null; @Nullable private HardwareBuffer mScreenshotBuffer = null; @Nullable private WindowConfiguration mTaskWindowConfiguration = null; @Nullable private RemoteCallback mOnBackNavigationDone = null; @Nullable private IOnBackInvokedCallback mOnBackInvokedCallback = null; /** * @see BackNavigationInfo#getType() */ public Builder setType(@BackTargetType int type) { mType = type; return this; } /** * @see BackNavigationInfo#getDepartingAnimationTarget */ public Builder setDepartingAnimationTarget( @Nullable RemoteAnimationTarget departingAnimationTarget) { mDepartingAnimationTarget = departingAnimationTarget; return this; } /** * @see BackNavigationInfo#getScreenshotSurface */ public Builder setScreenshotSurface(@Nullable SurfaceControl screenshotSurface) { mScreenshotSurface = screenshotSurface; return this; } /** * @see BackNavigationInfo#getScreenshotHardwareBuffer() */ public Builder setScreenshotBuffer(@Nullable HardwareBuffer screenshotBuffer) { mScreenshotBuffer = screenshotBuffer; return this; } /** * @see BackNavigationInfo#getTaskWindowConfiguration */ public Builder setTaskWindowConfiguration( @Nullable WindowConfiguration taskWindowConfiguration) { mTaskWindowConfiguration = taskWindowConfiguration; return this; } /** * @see BackNavigationInfo#onBackNavigationFinished(boolean) */ public Builder setOnBackNavigationDone(@Nullable RemoteCallback onBackNavigationDone) { mOnBackNavigationDone = onBackNavigationDone; return this; } /** * @see BackNavigationInfo#getOnBackInvokedCallback */ public Builder setOnBackInvokedCallback( @Nullable IOnBackInvokedCallback onBackInvokedCallback) { mOnBackInvokedCallback = onBackInvokedCallback; return this; } /** * Builds and returns an instance of {@link BackNavigationInfo} */ public BackNavigationInfo build() { return new BackNavigationInfo(mType, mDepartingAnimationTarget, mScreenshotSurface, mScreenshotBuffer, mTaskWindowConfiguration, mOnBackNavigationDone, mOnBackInvokedCallback); } } }
core/java/android/window/ProxyOnBackInvokedDispatcher.java +5 −5 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ public class ProxyOnBackInvokedDispatcher implements OnBackInvokedDispatcher { public void unregisterOnBackInvokedCallback( @NonNull OnBackInvokedCallback callback) { if (DEBUG) { Log.v(TAG, String.format("Pending unregister %s. Actual=%s", callback, Log.v(TAG, String.format("Proxy unregister %s. Actual=%s", callback, mActualDispatcherOwner)); } synchronized (mLock) { Loading Loading @@ -109,8 +109,8 @@ public class ProxyOnBackInvokedDispatcher implements OnBackInvokedDispatcher { OnBackInvokedDispatcher dispatcher = mActualDispatcherOwner.getOnBackInvokedDispatcher(); if (DEBUG) { Log.v(TAG, String.format("Pending transferring %d callbacks to %s", mCallbacks.size(), dispatcher)); Log.v(TAG, String.format("Proxy: transferring %d pending callbacks to %s", mCallbacks.size(), dispatcher)); } for (Pair<OnBackInvokedCallback, Integer> callbackPair : mCallbacks) { int priority = callbackPair.second; Loading Loading @@ -144,7 +144,7 @@ public class ProxyOnBackInvokedDispatcher implements OnBackInvokedDispatcher { */ public void reset() { if (DEBUG) { Log.v(TAG, "Pending reset callbacks"); Log.v(TAG, "Proxy: reset callbacks"); } synchronized (mLock) { mCallbacks.clear(); Loading @@ -165,7 +165,7 @@ public class ProxyOnBackInvokedDispatcher implements OnBackInvokedDispatcher { public void setActualDispatcherOwner( @Nullable OnBackInvokedDispatcherOwner actualDispatcherOwner) { if (DEBUG) { Log.v(TAG, String.format("Pending setActual %s. Current %s", Log.v(TAG, String.format("Proxy setActual %s. Current %s", actualDispatcherOwner, mActualDispatcherOwner)); } synchronized (mLock) { Loading
data/etc/services.core.protolog.json +42 −12 Original line number Diff line number Diff line Loading @@ -397,6 +397,12 @@ "group": "WM_DEBUG_WINDOW_TRANSITIONS", "at": "com\/android\/server\/wm\/Transition.java" }, "-1717147904": { "message": "Current focused window is embeddedWindow. Dispatch KEYCODE_BACK.", "level": "DEBUG", "group": "WM_DEBUG_BACK_PREVIEW", "at": "com\/android\/server\/wm\/BackNavigationController.java" }, "-1715268616": { "message": "Last window, removing starting window %s", "level": "VERBOSE", Loading Loading @@ -1087,6 +1093,12 @@ "group": "WM_DEBUG_STATES", "at": "com\/android\/server\/wm\/ActivityRecord.java" }, "-1010850753": { "message": "No focused window, defaulting to top task's window", "level": "WARN", "group": "WM_DEBUG_BACK_PREVIEW", "at": "com\/android\/server\/wm\/BackNavigationController.java" }, "-1009117329": { "message": "isFetchingAppTransitionSpecs=true", "level": "VERBOSE", Loading @@ -1105,6 +1117,12 @@ "group": "WM_DEBUG_STATES", "at": "com\/android\/server\/wm\/ActivityRecord.java" }, "-997565097": { "message": "Focused window found using getFocusedWindowToken", "level": "DEBUG", "group": "WM_DEBUG_BACK_PREVIEW", "at": "com\/android\/server\/wm\/BackNavigationController.java" }, "-993378225": { "message": "finishDrawingLocked: mDrawState=COMMIT_DRAW_PENDING %s in %s", "level": "VERBOSE", Loading Loading @@ -1327,6 +1345,12 @@ "group": "WM_DEBUG_FOCUS_LIGHT", "at": "com\/android\/server\/wm\/ActivityRecord.java" }, "-767349300": { "message": "%s: Setting back callback %s. Client IWindow %s", "level": "DEBUG", "group": "WM_DEBUG_BACK_PREVIEW", "at": "com\/android\/server\/wm\/WindowState.java" }, "-766059044": { "message": "Display id=%d selected orientation %s (%d), got rotation %s (%d)", "level": "VERBOSE", Loading Loading @@ -1669,12 +1693,6 @@ "group": "WM_DEBUG_STATES", "at": "com\/android\/server\/wm\/RootWindowContainer.java" }, "-432881038": { "message": "startBackNavigation task=%s, topRunningActivity=%s, applicationBackCallback=%s, systemBackCallback=%s", "level": "DEBUG", "group": "WM_DEBUG_BACK_PREVIEW", "at": "com\/android\/server\/wm\/BackNavigationController.java" }, "-415865166": { "message": "findFocusedWindow: Found new focus @ %s", "level": "VERBOSE", Loading Loading @@ -1885,12 +1903,6 @@ "group": "WM_DEBUG_SYNC_ENGINE", "at": "com\/android\/server\/wm\/BLASTSyncEngine.java" }, "-228813488": { "message": "%s: Setting back callback %s", "level": "DEBUG", "group": "WM_DEBUG_BACK_PREVIEW", "at": "com\/android\/server\/wm\/WindowState.java" }, "-208825711": { "message": "shouldWaitAnimatingExit: isWallpaperTarget: %s", "level": "DEBUG", Loading Loading @@ -2359,6 +2371,12 @@ "group": "WM_DEBUG_REMOTE_ANIMATIONS", "at": "com\/android\/server\/wm\/RemoteAnimationController.java" }, "250620778": { "message": "startBackNavigation task=%s, topRunningActivity=%s, applicationBackCallback=%s, systemBackCallback=%s, currentFocus=%s", "level": "DEBUG", "group": "WM_DEBUG_BACK_PREVIEW", "at": "com\/android\/server\/wm\/BackNavigationController.java" }, "251812577": { "message": "Register display organizer=%s uid=%d", "level": "VERBOSE", Loading Loading @@ -2677,6 +2695,12 @@ "group": "WM_SHOW_TRANSACTIONS", "at": "com\/android\/server\/wm\/WindowContainerThumbnail.java" }, "531891870": { "message": "Previous Destination is Activity:%s Task:%s removedContainer:%s, backType=%s", "level": "DEBUG", "group": "WM_DEBUG_BACK_PREVIEW", "at": "com\/android\/server\/wm\/BackNavigationController.java" }, "535103992": { "message": "Wallpaper may change! Adjusting", "level": "VERBOSE", Loading Loading @@ -2911,6 +2935,12 @@ "group": "WM_DEBUG_LOCKTASK", "at": "com\/android\/server\/wm\/ActivityTaskManagerService.java" }, "716528224": { "message": "Focused window found using wmService.getFocusedWindowLocked()", "level": "DEBUG", "group": "WM_DEBUG_BACK_PREVIEW", "at": "com\/android\/server\/wm\/BackNavigationController.java" }, "726205185": { "message": "Moving to DESTROYED: %s (destroy skipped)", "level": "VERBOSE", Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/back/BackAnimationControllerTest.java +2 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import com.android.wm.shell.TestShellExecutor; import com.android.wm.shell.common.ShellExecutor; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; Loading Loading @@ -109,6 +110,7 @@ public class BackAnimationControllerTest { } @Test @Ignore("b/207481538") public void crossActivity_screenshotAttachedAndVisible() { SurfaceControl screenshotSurface = new SurfaceControl(); HardwareBuffer hardwareBuffer = mock(HardwareBuffer.class); Loading