Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +18 −0 Original line number Diff line number Diff line Loading @@ -228,6 +228,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab private final Context mContext; private final boolean mIsPrimaryUser; private final boolean mIsAutomotive; private final StatusBarStateController mStatusBarStateController; HashMap<Integer, SimData> mSimDatas = new HashMap<>(); HashMap<Integer, ServiceState> mServiceStates = new HashMap<Integer, ServiceState>(); Loading Loading @@ -1770,6 +1771,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mFaceManager.addLockoutResetCallback(mFaceLockoutResetCallback); } mIsAutomotive = isAutomotive(); ActivityManagerWrapper.getInstance().registerTaskStackListener(mTaskStackListener); mUserManager = context.getSystemService(UserManager.class); mIsPrimaryUser = mUserManager.isPrimaryUser(); Loading Loading @@ -2484,6 +2487,14 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab .addCategory(Intent.CATEGORY_HOME); ResolveInfo resolveInfo = mContext.getPackageManager().resolveActivity(homeIntent, 0 /* flags */); // TODO(b/160971249): Replace in the future by resolving activity as user. if (resolveInfo == null && mIsAutomotive) { Log.w(TAG, "resolveNeedsSlowUnlockTransition: returning false since activity " + "could not be resolved."); return false; } return FALLBACK_HOME_COMPONENT.equals(resolveInfo.getComponentInfo().getComponentName()); } Loading Loading @@ -2554,6 +2565,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab return false; } private boolean isAutomotive() { return mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE); } /** * Remove the given observer's callback. * Loading Loading @@ -2990,5 +3005,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab pw.println(" " + time + " " + model.toString()); } } if (mIsAutomotive) { pw.println(" Running on Automotive build"); } } } Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +18 −0 Original line number Diff line number Diff line Loading @@ -228,6 +228,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab private final Context mContext; private final boolean mIsPrimaryUser; private final boolean mIsAutomotive; private final StatusBarStateController mStatusBarStateController; HashMap<Integer, SimData> mSimDatas = new HashMap<>(); HashMap<Integer, ServiceState> mServiceStates = new HashMap<Integer, ServiceState>(); Loading Loading @@ -1770,6 +1771,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab mFaceManager.addLockoutResetCallback(mFaceLockoutResetCallback); } mIsAutomotive = isAutomotive(); ActivityManagerWrapper.getInstance().registerTaskStackListener(mTaskStackListener); mUserManager = context.getSystemService(UserManager.class); mIsPrimaryUser = mUserManager.isPrimaryUser(); Loading Loading @@ -2484,6 +2487,14 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab .addCategory(Intent.CATEGORY_HOME); ResolveInfo resolveInfo = mContext.getPackageManager().resolveActivity(homeIntent, 0 /* flags */); // TODO(b/160971249): Replace in the future by resolving activity as user. if (resolveInfo == null && mIsAutomotive) { Log.w(TAG, "resolveNeedsSlowUnlockTransition: returning false since activity " + "could not be resolved."); return false; } return FALLBACK_HOME_COMPONENT.equals(resolveInfo.getComponentInfo().getComponentName()); } Loading Loading @@ -2554,6 +2565,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab return false; } private boolean isAutomotive() { return mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE); } /** * Remove the given observer's callback. * Loading Loading @@ -2990,5 +3005,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab pw.println(" " + time + " " + model.toString()); } } if (mIsAutomotive) { pw.println(" Running on Automotive build"); } } }