Merge "Keyguard: Don't show when booting to cryptkeeper" into oc-mr1-dev
This commit is contained in:
@@ -38,6 +38,7 @@ import android.content.ComponentName;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
|
import android.content.pm.IPackageManager;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.pm.ResolveInfo;
|
import android.content.pm.ResolveInfo;
|
||||||
import android.database.ContentObserver;
|
import android.database.ContentObserver;
|
||||||
@@ -52,6 +53,7 @@ import android.os.Handler;
|
|||||||
import android.os.IRemoteCallback;
|
import android.os.IRemoteCallback;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
|
import android.os.ServiceManager;
|
||||||
import android.os.Trace;
|
import android.os.Trace;
|
||||||
import android.os.UserHandle;
|
import android.os.UserHandle;
|
||||||
import android.os.UserManager;
|
import android.os.UserManager;
|
||||||
@@ -157,6 +159,21 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
|
|||||||
private static final ComponentName FALLBACK_HOME_COMPONENT = new ComponentName(
|
private static final ComponentName FALLBACK_HOME_COMPONENT = new ComponentName(
|
||||||
"com.android.settings", "com.android.settings.FallbackHome");
|
"com.android.settings", "com.android.settings.FallbackHome");
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If true, the system is in the half-boot-to-decryption-screen state.
|
||||||
|
* Prudently disable lockscreen.
|
||||||
|
*/
|
||||||
|
public static final boolean CORE_APPS_ONLY;
|
||||||
|
static {
|
||||||
|
try {
|
||||||
|
CORE_APPS_ONLY = IPackageManager.Stub.asInterface(
|
||||||
|
ServiceManager.getService("package")).isOnlyCoreApps();
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
throw e.rethrowFromSystemServer();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static KeyguardUpdateMonitor sInstance;
|
private static KeyguardUpdateMonitor sInstance;
|
||||||
|
|
||||||
private final Context mContext;
|
private final Context mContext;
|
||||||
|
|||||||
@@ -1228,6 +1228,12 @@ public class KeyguardViewMediator extends SystemUI {
|
|||||||
* Enable the keyguard if the settings are appropriate.
|
* Enable the keyguard if the settings are appropriate.
|
||||||
*/
|
*/
|
||||||
private void doKeyguardLocked(Bundle options) {
|
private void doKeyguardLocked(Bundle options) {
|
||||||
|
if (KeyguardUpdateMonitor.CORE_APPS_ONLY) {
|
||||||
|
// Don't show keyguard during half-booted cryptkeeper stage.
|
||||||
|
if (DEBUG) Log.d(TAG, "doKeyguard: not showing because booting to cryptkeeper");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// if another app is disabling us, don't show
|
// if another app is disabling us, don't show
|
||||||
if (!mExternallyEnabled) {
|
if (!mExternallyEnabled) {
|
||||||
if (DEBUG) Log.d(TAG, "doKeyguard: not showing because externally disabled");
|
if (DEBUG) Log.d(TAG, "doKeyguard: not showing because externally disabled");
|
||||||
|
|||||||
Reference in New Issue
Block a user