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

Commit 5974b4df authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Android (Google) Code Review
Browse files

Merge changes from topic 'keyguard_refactor'

* changes:
  The big keyguard transition refactor (6/n)
  The big keyguard transition refactor (5/n)
  The big keyguard transition refactor (4/n)
  The big keyguard transition refactor (3/n)
  The big keyguard transition refactor (2/n)
  The big keyguard transition refactor (1/n)
parents ce55e843 8d786931
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.app;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.content.ComponentName;
import android.content.IIntentSender;
import android.content.Intent;
@@ -179,4 +180,13 @@ public abstract class ActivityManagerInternal {
     * (-1).
     */
    public abstract int getUidProcessState(int uid);

    /**
     * Called when Keyguard flags might have changed.
     *
     * @param callback Callback to run after activity visibilities have been reevaluated. This can
     *                 be used from window manager so that when the callback is called, it's
     *                 guaranteed that all apps have their visibility updated accordingly.
     */
    public abstract void notifyKeyguardFlagsChanged(@Nullable Runnable callback);
}
+2 −21
Original line number Diff line number Diff line
@@ -1555,8 +1555,7 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
        case SET_LOCK_SCREEN_SHOWN_TRANSACTION: {
            data.enforceInterface(IActivityManager.descriptor);
            final boolean showing = data.readInt() != 0;
            final boolean occluded = data.readInt() != 0;
            setLockScreenShown(showing, occluded);
            setLockScreenShown(showing);
            reply.writeNoException();
            return true;
        }
@@ -2337,13 +2336,6 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
            return true;
        }

        case KEYGUARD_WAITING_FOR_ACTIVITY_DRAWN_TRANSACTION: {
            data.enforceInterface(IActivityManager.descriptor);
            keyguardWaitingForActivityDrawn();
            reply.writeNoException();
            return true;
        }

        case KEYGUARD_GOING_AWAY_TRANSACTION: {
            data.enforceInterface(IActivityManager.descriptor);
            keyguardGoingAway(data.readInt());
@@ -5035,13 +5027,12 @@ class ActivityManagerProxy implements IActivityManager
        reply.recycle();
        return pfd;
    }
    public void setLockScreenShown(boolean showing, boolean occluded) throws RemoteException
    public void setLockScreenShown(boolean showing) throws RemoteException
    {
        Parcel data = Parcel.obtain();
        Parcel reply = Parcel.obtain();
        data.writeInterfaceToken(IActivityManager.descriptor);
        data.writeInt(showing ? 1 : 0);
        data.writeInt(occluded ? 1 : 0);
        mRemote.transact(SET_LOCK_SCREEN_SHOWN_TRANSACTION, data, reply, 0);
        reply.readException();
        data.recycle();
@@ -6060,16 +6051,6 @@ class ActivityManagerProxy implements IActivityManager
        reply.recycle();
    }

    public void keyguardWaitingForActivityDrawn() throws RemoteException {
        Parcel data = Parcel.obtain();
        Parcel reply = Parcel.obtain();
        data.writeInterfaceToken(IActivityManager.descriptor);
        mRemote.transact(KEYGUARD_WAITING_FOR_ACTIVITY_DRAWN_TRANSACTION, data, reply, 0);
        reply.readException();
        data.recycle();
        reply.recycle();
    }

    public void keyguardGoingAway(int flags)
            throws RemoteException {
        Parcel data = Parcel.obtain();
+1 −5
Original line number Diff line number Diff line
@@ -357,8 +357,7 @@ public interface IActivityManager extends IInterface {
    public void killPackageDependents(final String packageName, int userId) throws RemoteException;
    public void forceStopPackage(final String packageName, int userId) throws RemoteException;

    // Note: probably don't want to allow applications access to these.
    public void setLockScreenShown(boolean showing, boolean occluded) throws RemoteException;
    public void setLockScreenShown(boolean showing) throws RemoteException;

    public void unhandledBack() throws RemoteException;
    public ParcelFileDescriptor openContentUri(Uri uri) throws RemoteException;
@@ -518,8 +517,6 @@ public interface IActivityManager extends IInterface {

    public void showBootMessage(CharSequence msg, boolean always) throws RemoteException;

    public void keyguardWaitingForActivityDrawn() throws RemoteException;

    /**
     * Notify the system that the keyguard is going away.
     *
@@ -1017,7 +1014,6 @@ public interface IActivityManager extends IInterface {
    int NOTIFY_LAUNCH_TASK_BEHIND_COMPLETE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+228;
    int START_ACTIVITY_FROM_RECENTS_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 229;
    int NOTIFY_ENTER_ANIMATION_COMPLETE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+230;
    int KEYGUARD_WAITING_FOR_ACTIVITY_DRAWN_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+231;
    int START_ACTIVITY_AS_CALLER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+232;
    int ADD_APP_TASK_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+233;
    int GET_APP_TASK_THUMBNAIL_SIZE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+234;
+0 −10
Original line number Diff line number Diff line
@@ -213,16 +213,6 @@ interface IWindowManager
    void dismissKeyguard();
    void keyguardGoingAway(int flags);

    /**
     * Called to tell WindowManager whether the keyguard is animating in. While this property
     * is true, WindowManager won't assume that the keyguard is opaque (eg. WindowAnimator won't
     * force-hide windows just because keyguard is visible and WallpaperController won't occlude
     * app windows with the system wallpaper.
     *
     * <p>Requires CONTROL_KEYGUARD permission</p>
     */
    void setKeyguardAnimatingIn(boolean animating);

    // Requires INTERACT_ACROSS_USERS_FULL permission
    void setSwitchingUser(boolean switching);

+0 −7
Original line number Diff line number Diff line
@@ -598,13 +598,6 @@ public interface WindowManager extends ViewManager {
         */
        public static final int TYPE_MAGNIFICATION_OVERLAY = FIRST_SYSTEM_WINDOW+27;

        /**
         * Window type: keyguard scrim window. Shows if keyguard needs to be restarted.
         * In multiuser systems shows on all users' windows.
         * @hide
         */
        public static final int TYPE_KEYGUARD_SCRIM           = FIRST_SYSTEM_WINDOW+29;

        /**
         * Window type: Window for Presentation on top of private
         * virtual display.
Loading