Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a7fd66f authored by Miranda Kephart's avatar Miranda Kephart Committed by Automerger Merge Worker
Browse files

Merge "Remove toast in power save mode" into rvc-qpr-dev am: ccb263c9 am: af761d6d

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

Change-Id: I57fc15412d126735c8ec4ee5a0cfb10f9a348313
parents f2b86b78 af761d6d
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -57,7 +57,6 @@ import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.os.PowerManager;
import android.os.RemoteException;
import android.provider.Settings;
import android.util.DisplayMetrics;
@@ -648,14 +647,6 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
     */
    private void startAnimation(final Consumer<Uri> finisher, Rect screenRect, Insets screenInsets,
            boolean showFlash) {

        // If power save is on, show a toast so there is some visual indication that a
        // screenshot has been taken.
        PowerManager powerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
        if (powerManager.isPowerSaveMode()) {
            Toast.makeText(mContext, R.string.screenshot_saved_title, Toast.LENGTH_SHORT).show();
        }

        mScreenshotHandler.post(() -> {
            if (!mScreenshotLayout.isAttachedToWindow()) {
                mWindowManager.addView(mScreenshotLayout, mWindowLayoutParams);