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

Commit 3101b3ad authored by Robin Lee's avatar Robin Lee Committed by Android (Google) Code Review
Browse files

Merge changes I3fd28e69,If43820b6

* changes:
  Lock work tasks from SystemUI instead of ActivityStarter
  Bounce work challenge through a WorkLockActivity
parents 48ee82ad c41f6ec8
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -95,4 +95,11 @@ oneway interface ITaskStackListener {
     * perform relevant animations before the window disappears.
     * perform relevant animations before the window disappears.
     */
     */
    void onTaskRemovalStarted(int taskId);
    void onTaskRemovalStarted(int taskId);

    /**
     * Called when the task has been put in a locked state because one or more of the
     * activities inside it belong to a managed profile user, and that user has just
     * been locked.
     */
    void onTaskProfileLocked(int taskId, int userId);
}
}
+4 −0
Original line number Original line Diff line number Diff line
@@ -74,4 +74,8 @@ public abstract class TaskStackListener extends ITaskStackListener.Stub {
    public void onActivityRequestedOrientationChanged(int taskId, int requestedOrientation)
    public void onActivityRequestedOrientationChanged(int taskId, int requestedOrientation)
            throws RemoteException {
            throws RemoteException {
    }
    }

    @Override
    public void onTaskProfileLocked(int taskId, int userId) {
    }
}
}
+15 −0
Original line number Original line Diff line number Diff line
@@ -483,6 +483,21 @@
            android:exported="true"
            android:exported="true"
            android:enabled="@bool/config_enableKeyguardService" />
            android:enabled="@bool/config_enableKeyguardService" />


        <activity android:name=".keyguard.WorkLockActivity"
                  android:label="@string/accessibility_desc_work_lock"
                  android:permission="android.permission.MANAGE_USERS"
                  android:exported="false"
                  android:launchMode="singleTop"
                  android:excludeFromRecents="true"
                  android:stateNotNeeded="true"
                  android:resumeWhilePausing="true"
                  android:theme="@android:style/Theme.Black.NoTitleBar">
            <intent-filter>
                <action android:name="android.app.action.CONFIRM_DEVICE_CREDENTIAL_WITH_USER" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

        <activity android:name=".Somnambulator"
        <activity android:name=".Somnambulator"
            android:label="@string/start_dreams"
            android:label="@string/start_dreams"
            android:icon="@mipmap/ic_launcher_dreams"
            android:icon="@mipmap/ic_launcher_dreams"
+2 −0
Original line number Original line Diff line number Diff line
@@ -460,6 +460,8 @@
    <string name="accessibility_desc_settings">Settings</string>
    <string name="accessibility_desc_settings">Settings</string>
    <!-- Content description for the recent apps panel (not shown on the screen). [CHAR LIMIT=NONE] -->
    <!-- Content description for the recent apps panel (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_desc_recent_apps">Overview.</string>
    <string name="accessibility_desc_recent_apps">Overview.</string>
    <!-- Content description for the graphic shown instead of an activity window while the activity is locked (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_desc_work_lock">Work lock screen</string>
    <!-- Content description for the close button in the zen mode panel introduction message. [CHAR LIMIT=NONE] -->
    <!-- Content description for the close button in the zen mode panel introduction message. [CHAR LIMIT=NONE] -->
    <string name="accessibility_desc_close">Close</string>
    <string name="accessibility_desc_close">Close</string>


+8 −0
Original line number Original line Diff line number Diff line
@@ -326,6 +326,12 @@ public class KeyguardViewMediator extends SystemUI {
     */
     */
    private boolean mPendingLock;
    private boolean mPendingLock;


    /**
     * Controller for showing individual "work challenge" lock screen windows inside managed profile
     * tasks when the current user has been unlocked but the profile is still locked.
     */
    private WorkLockActivityController mWorkLockController;

    private boolean mLockLater;
    private boolean mLockLater;


    private boolean mWakeAndUnlocking;
    private boolean mWakeAndUnlocking;
@@ -708,6 +714,8 @@ public class KeyguardViewMediator extends SystemUI {


        mHideAnimation = AnimationUtils.loadAnimation(mContext,
        mHideAnimation = AnimationUtils.loadAnimation(mContext,
                com.android.internal.R.anim.lock_screen_behind_enter);
                com.android.internal.R.anim.lock_screen_behind_enter);

        mWorkLockController = new WorkLockActivityController(mContext);
    }
    }


    @Override
    @Override
Loading