Loading quickstep/recents_ui_overrides/src/com/android/quickstep/ImageActionsApi.java +4 −3 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import androidx.annotation.UiThread; import com.android.launcher3.BuildConfig; import com.android.quickstep.util.ImageActionUtils; import com.android.systemui.shared.recents.model.Task; import java.util.function.Supplier; Loading Loading @@ -85,11 +86,11 @@ public class ImageActionsApi { * @param screenshotBounds the location of where the bitmap was laid out on the screen in * screen coordinates. * @param visibleInsets that are used to draw the screenshot within the bounds. * @param taskId of the task that the screenshot was taken of. * @param task of the task that the screenshot was taken of. */ public void saveScreenshot(Bitmap screenshot, Rect screenshotBounds, Insets visibleInsets, int taskId) { Insets visibleInsets, Task.TaskKey task) { ImageActionUtils.saveScreenshot(mSystemUiProxy, screenshot, screenshotBounds, visibleInsets, taskId); task); } } quickstep/recents_ui_overrides/src/com/android/quickstep/TaskOverlayFactory.java +1 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ public class TaskOverlayFactory implements ResourceBasedOverride { public void onScreenshot() { if (isAllowedByPolicy) { imageApi.saveScreenshot(mThumbnailView.getThumbnail(), getTaskSnapshotBounds(), getTaskSnapshotInsets(), task.key.id); getTaskSnapshotBounds(), getTaskSnapshotInsets(), task.key); } else { showBlockedByPolicyMessage(); } Loading quickstep/src/com/android/quickstep/SystemUiProxy.java +14 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.view.MotionEvent; import com.android.launcher3.util.MainThreadInitializedObject; import com.android.systemui.shared.recents.IPinnedStackAnimationListener; import com.android.systemui.shared.recents.ISystemUiProxy; import com.android.systemui.shared.recents.model.Task; /** * Holds the reference to SystemUI. Loading Loading @@ -344,4 +345,17 @@ public class SystemUiProxy implements ISystemUiProxy { } } } @Override public void handleImageBundleAsScreenshot(Bundle screenImageBundle, Rect locationInScreen, Insets visibleInsets, Task.TaskKey task) { if (mSystemUiProxy != null) { try { mSystemUiProxy.handleImageBundleAsScreenshot(screenImageBundle, locationInScreen, visibleInsets, task); } catch (RemoteException e) { Log.w(TAG, "Failed call handleImageBundleAsScreenshot"); } } } } quickstep/src/com/android/quickstep/util/ImageActionUtils.java +5 −2 Original line number Diff line number Diff line Loading @@ -39,6 +39,8 @@ import androidx.core.content.FileProvider; import com.android.launcher3.BuildConfig; import com.android.quickstep.SystemUiProxy; import com.android.systemui.shared.recents.model.Task; import com.android.systemui.shared.recents.utilities.BitmapUtil; import java.io.File; import java.io.FileOutputStream; Loading @@ -59,8 +61,9 @@ public class ImageActionUtils { */ public static void saveScreenshot(SystemUiProxy systemUiProxy, Bitmap screenshot, Rect screenshotBounds, Insets visibleInsets, int taskId) { systemUiProxy.handleImageAsScreenshot(screenshot, screenshotBounds, visibleInsets, taskId); Insets visibleInsets, Task.TaskKey task) { systemUiProxy.handleImageBundleAsScreenshot(BitmapUtil.hardwareBitmapToBundle(screenshot), screenshotBounds, visibleInsets, task); } /** Loading Loading
quickstep/recents_ui_overrides/src/com/android/quickstep/ImageActionsApi.java +4 −3 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import androidx.annotation.UiThread; import com.android.launcher3.BuildConfig; import com.android.quickstep.util.ImageActionUtils; import com.android.systemui.shared.recents.model.Task; import java.util.function.Supplier; Loading Loading @@ -85,11 +86,11 @@ public class ImageActionsApi { * @param screenshotBounds the location of where the bitmap was laid out on the screen in * screen coordinates. * @param visibleInsets that are used to draw the screenshot within the bounds. * @param taskId of the task that the screenshot was taken of. * @param task of the task that the screenshot was taken of. */ public void saveScreenshot(Bitmap screenshot, Rect screenshotBounds, Insets visibleInsets, int taskId) { Insets visibleInsets, Task.TaskKey task) { ImageActionUtils.saveScreenshot(mSystemUiProxy, screenshot, screenshotBounds, visibleInsets, taskId); task); } }
quickstep/recents_ui_overrides/src/com/android/quickstep/TaskOverlayFactory.java +1 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ public class TaskOverlayFactory implements ResourceBasedOverride { public void onScreenshot() { if (isAllowedByPolicy) { imageApi.saveScreenshot(mThumbnailView.getThumbnail(), getTaskSnapshotBounds(), getTaskSnapshotInsets(), task.key.id); getTaskSnapshotBounds(), getTaskSnapshotInsets(), task.key); } else { showBlockedByPolicyMessage(); } Loading
quickstep/src/com/android/quickstep/SystemUiProxy.java +14 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import android.view.MotionEvent; import com.android.launcher3.util.MainThreadInitializedObject; import com.android.systemui.shared.recents.IPinnedStackAnimationListener; import com.android.systemui.shared.recents.ISystemUiProxy; import com.android.systemui.shared.recents.model.Task; /** * Holds the reference to SystemUI. Loading Loading @@ -344,4 +345,17 @@ public class SystemUiProxy implements ISystemUiProxy { } } } @Override public void handleImageBundleAsScreenshot(Bundle screenImageBundle, Rect locationInScreen, Insets visibleInsets, Task.TaskKey task) { if (mSystemUiProxy != null) { try { mSystemUiProxy.handleImageBundleAsScreenshot(screenImageBundle, locationInScreen, visibleInsets, task); } catch (RemoteException e) { Log.w(TAG, "Failed call handleImageBundleAsScreenshot"); } } } }
quickstep/src/com/android/quickstep/util/ImageActionUtils.java +5 −2 Original line number Diff line number Diff line Loading @@ -39,6 +39,8 @@ import androidx.core.content.FileProvider; import com.android.launcher3.BuildConfig; import com.android.quickstep.SystemUiProxy; import com.android.systemui.shared.recents.model.Task; import com.android.systemui.shared.recents.utilities.BitmapUtil; import java.io.File; import java.io.FileOutputStream; Loading @@ -59,8 +61,9 @@ public class ImageActionUtils { */ public static void saveScreenshot(SystemUiProxy systemUiProxy, Bitmap screenshot, Rect screenshotBounds, Insets visibleInsets, int taskId) { systemUiProxy.handleImageAsScreenshot(screenshot, screenshotBounds, visibleInsets, taskId); Insets visibleInsets, Task.TaskKey task) { systemUiProxy.handleImageBundleAsScreenshot(BitmapUtil.hardwareBitmapToBundle(screenshot), screenshotBounds, visibleInsets, task); } /** Loading