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

Commit cae1b44c authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9107440 from 4b73f2a5 to tm-qpr1-release

Change-Id: Ia3da812899b021a7a111354907bd1c69c79ef190
parents 14d2fd32 4b73f2a5
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -86,6 +86,14 @@ public abstract class HotwordDetectionService extends Service {
     */
    public static final int MAXIMUM_NUMBER_OF_INITIALIZATION_STATUS_CUSTOM_ERROR = 2;

    /**
     * Feature flag for Attention Service.
     *
     * TODO(b/247920386): Add TestApi annotation
     * @hide
     */
    public static final boolean ENABLE_PROXIMITY_RESULT = false;

    /**
     * Indicates that the updated status is successful.
     */
+23 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import static com.android.wm.shell.common.ExecutorUtils.executeRemoteCallWithTas
import android.app.ActivityManager;
import android.app.ActivityTaskManager;
import android.app.TaskInfo;
import android.content.ComponentName;
import android.content.Context;
import android.os.RemoteException;
import android.util.Slog;
@@ -327,6 +328,28 @@ public class RecentTasksController implements TaskStackListenerCallback,
        return recentTasks;
    }

    /**
     * Find the background task that match the given component.
     */
    @Nullable
    public ActivityManager.RecentTaskInfo findTaskInBackground(ComponentName componentName) {
        if (componentName == null) {
            return null;
        }
        List<ActivityManager.RecentTaskInfo> tasks = getRawRecentTasks(Integer.MAX_VALUE,
                ActivityManager.RECENT_IGNORE_UNAVAILABLE, ActivityManager.getCurrentUser());
        for (int i = 0; i < tasks.size(); i++) {
            final ActivityManager.RecentTaskInfo task = tasks.get(i);
            if (task.isVisible) {
                continue;
            }
            if (componentName.equals(task.baseIntent.getComponent())) {
                return task;
            }
        }
        return null;
    }

    public void dump(@NonNull PrintWriter pw, String prefix) {
        final String innerPrefix = prefix + "  ";
        pw.println(prefix + TAG);
+12 −1
Original line number Diff line number Diff line
@@ -385,6 +385,9 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
            }
            @Override
            public void onAnimationCancelled(boolean isKeyguardOccluded) {
                final WindowContainerTransaction evictWct = new WindowContainerTransaction();
                mStageCoordinator.prepareEvictInvisibleChildTasks(evictWct);
                mSyncQueue.queue(evictWct);
            }
        };
        options = mStageCoordinator.resolveStartStage(STAGE_TYPE_UNDEFINED, position, options,
@@ -472,8 +475,16 @@ public class SplitScreenController implements DragAndDropPolicy.Starter,
        fillInIntent.addFlags(FLAG_ACTIVITY_NO_USER_ACTION);

        // Flag with MULTIPLE_TASK if this is launching the same activity into both sides of the
        // split.
        // split and there is no reusable background task.
        if (shouldAddMultipleTaskFlag(intent.getIntent(), position)) {
            final ActivityManager.RecentTaskInfo taskInfo = mRecentTasksOptional.isPresent()
                    ? mRecentTasksOptional.get().findTaskInBackground(
                            intent.getIntent().getComponent())
                    : null;
            if (taskInfo != null) {
                startTask(taskInfo.taskId, position, options);
                return;
            }
            fillInIntent.addFlags(FLAG_ACTIVITY_MULTIPLE_TASK);
            ProtoLog.v(ShellProtoLogGroup.WM_SHELL_SPLIT_SCREEN, "Adding MULTIPLE_TASK");
        }
+1 −2
Original line number Diff line number Diff line
@@ -57,11 +57,10 @@ data class KeyguardFaceListenModel(
    val faceLockedOut: Boolean,
    val fpLockedOut: Boolean,
    val goingToSleep: Boolean,
    val keyguardAwakeExcludingBouncerShowing: Boolean,
    val keyguardAwake: Boolean,
    val keyguardGoingAway: Boolean,
    val listeningForFaceAssistant: Boolean,
    val occludingAppRequestingFaceAuth: Boolean,
    val onlyFaceEnrolled: Boolean,
    val primaryUser: Boolean,
    val scanningAllowedByStrongAuth: Boolean,
    val secureCameraLaunched: Boolean,
+5 −15
Original line number Diff line number Diff line
@@ -2593,11 +2593,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
        }

        final boolean statusBarShadeLocked = mStatusBarState == StatusBarState.SHADE_LOCKED;
        // mKeyguardIsVisible is true even when the bouncer is shown, we don't want to run face auth
        // on bouncer if both fp and fingerprint are enrolled.
        final boolean awakeKeyguardExcludingBouncerShowing = mKeyguardIsVisible
                && mDeviceInteractive && !mGoingToSleep
                && !statusBarShadeLocked && !mBouncerFullyShown;
        final boolean awakeKeyguard = mKeyguardIsVisible && mDeviceInteractive && !mGoingToSleep
                && !statusBarShadeLocked;
        final int user = getCurrentUser();
        final int strongAuth = mStrongAuthTracker.getStrongAuthForUser(user);
        final boolean isLockDown =
@@ -2637,16 +2634,15 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
        final boolean faceDisabledForUser = isFaceDisabled(user);
        final boolean biometricEnabledForUser = mBiometricEnabledForUser.get(user);
        final boolean shouldListenForFaceAssistant = shouldListenForFaceAssistant();
        final boolean onlyFaceEnrolled = isOnlyFaceEnrolled();
        final boolean fpOrFaceIsLockedOut = isFaceLockedOut() || fpLockedout;

        // Only listen if this KeyguardUpdateMonitor belongs to the primary user. There is an
        // instance of KeyguardUpdateMonitor for each user but KeyguardUpdateMonitor is user-aware.
        final boolean shouldListen =
                ((mBouncerFullyShown && !mGoingToSleep && onlyFaceEnrolled)
                (mBouncerFullyShown && !mGoingToSleep
                        || mAuthInterruptActive
                        || mOccludingAppRequestingFace
                        || awakeKeyguardExcludingBouncerShowing
                        || awakeKeyguard
                        || shouldListenForFaceAssistant
                        || mAuthController.isUdfpsFingerDown()
                        || mUdfpsBouncerShowing)
@@ -2672,11 +2668,10 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
                    isFaceLockedOut(),
                    fpLockedout,
                    mGoingToSleep,
                    awakeKeyguardExcludingBouncerShowing,
                    awakeKeyguard,
                    mKeyguardGoingAway,
                    shouldListenForFaceAssistant,
                    mOccludingAppRequestingFace,
                    onlyFaceEnrolled,
                    mIsPrimaryUser,
                    strongAuthAllowsScanning,
                    mSecureCameraLaunched,
@@ -2686,11 +2681,6 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
        return shouldListen;
    }

    private boolean isOnlyFaceEnrolled() {
        return isFaceEnrolled()
                && !getCachedIsUnlockWithFingerprintPossible(sCurrentUser);
    }

    private void maybeLogListenerModelData(KeyguardListenModel model) {
        mLogger.logKeyguardListenerModel(model);

Loading