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

Commit c109dd0a authored by Miranda Kephart's avatar Miranda Kephart
Browse files

Remove toast in power save mode

Redundant since animations are now shown even in battery saver.

Bug: 161458152
Fix: 161458152
Test: verified that both animations and the toast show up at head;
removed toast code; verified that animation still appears in both
regular and extreme battery saver mode.

Change-Id: I55ba9a72dfe2f3f9741aca9dd719283dce114bce
parent 81d4133d
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);