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

Commit 248ed38a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Turn off quiet mode in the background, allowing the dialog to dismiss...

Merge "Turn off quiet mode in the background, allowing the dialog to dismiss quicker." into rvc-dev am: 63458fb6 am: f978d167 am: 5f20fc8f am: e559e16c

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

Change-Id: I066cb13cc16652694ba0cd9749d6aafce2d03722
parents 692d3d7b e559e16c
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -26,6 +26,8 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentSender;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.UserHandle;
import android.os.UserManager;
import android.util.Log;
@@ -97,7 +99,10 @@ public class UnlaunchableAppActivity extends Activity
    @Override
    public void onClick(DialogInterface dialog, int which) {
        if (mReason == UNLAUNCHABLE_REASON_QUIET_MODE && which == DialogInterface.BUTTON_POSITIVE) {
            UserManager.get(this).requestQuietModeEnabled(false, UserHandle.of(mUserId), mTarget);
            UserManager userManager = UserManager.get(this);
            new Handler(Looper.getMainLooper()).post(
                    () -> userManager.requestQuietModeEnabled(
                            /* enableQuietMode= */ false, UserHandle.of(mUserId), mTarget));
        }
    }