Calling requestQuietMode with peindingIntent to match PS settings with

PS state

Bug: 314910049, 312399293
Test: Manually verified

Change-Id: Iebdd09d4c6f319d50b8c0f118de0ddb2eaeb95d6
This commit is contained in:
josephpv
2023-12-07 16:03:13 +00:00
parent 0bdf8e9c1a
commit 16c32a5e2c
2 changed files with 58 additions and 19 deletions

View File

@@ -25,6 +25,7 @@ import android.app.IActivityManager;
import android.app.KeyguardManager;
import android.content.Context;
import android.content.Intent;
import android.content.IntentSender;
import android.content.pm.UserInfo;
import android.os.Flags;
import android.os.RemoteException;
@@ -241,6 +242,17 @@ public class PrivateSpaceMaintainer {
return false;
}
/**
* Checks if private space exists and requests to disable quiet mode.
*
* @param intentSender target to start when the user is unlocked
*/
public synchronized void unlockPrivateSpace(IntentSender intentSender) {
if (mUserHandle != null) {
mUserManager.requestQuietModeEnabled(false, mUserHandle, intentSender);
}
}
/** Returns true if private space exists and is running, otherwise returns false */
@VisibleForTesting
synchronized boolean isPrivateProfileRunning() {