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

Commit aa603fd9 authored by Heemin Seog's avatar Heemin Seog Committed by Android (Google) Code Review
Browse files

Merge "Query for home intent as foreground user"

parents 60b1ab72 317db73d
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -2519,13 +2519,11 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
        if (isUserUnlocked(getCurrentUser())) {
            return false;
        }
        Intent homeIntent = new Intent(Intent.ACTION_MAIN)
                .addCategory(Intent.CATEGORY_HOME);
        ResolveInfo resolveInfo = mContext.getPackageManager().resolveActivity(homeIntent,
                0 /* flags */);
        Intent homeIntent = new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME);
        ResolveInfo resolveInfo = mContext.getPackageManager().resolveActivityAsUser(homeIntent,
                0 /* flags */, getCurrentUser());

        // TODO(b/160971249): Replace in the future by resolving activity as user.
        if (resolveInfo == null && mIsAutomotive) {
        if (resolveInfo == null) {
            Log.w(TAG, "resolveNeedsSlowUnlockTransition: returning false since activity "
                    + "could not be resolved.");
            return false;