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

Commit 058652c2 authored by Julia Reynolds's avatar Julia Reynolds Committed by Android (Google) Code Review
Browse files

Merge "Remove the ability to set a preferred setup activity." into mnc-dev

parents 0fcf4161 cedd53ad
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -5790,7 +5790,6 @@ package android.app.admin {
    method public void setPermissionPolicy(android.content.ComponentName, int);
    method public boolean setPermittedAccessibilityServices(android.content.ComponentName, java.util.List<java.lang.String>);
    method public boolean setPermittedInputMethods(android.content.ComponentName, java.util.List<java.lang.String>);
    method public void setPreferredSetupActivity(android.content.ComponentName, android.content.ComponentName);
    method public void setProfileEnabled(android.content.ComponentName);
    method public void setProfileName(android.content.ComponentName, java.lang.String);
    method public void setRecommendedGlobalProxy(android.content.ComponentName, android.net.ProxyInfo);
+0 −1
Original line number Diff line number Diff line
@@ -5900,7 +5900,6 @@ package android.app.admin {
    method public void setPermissionPolicy(android.content.ComponentName, int);
    method public boolean setPermittedAccessibilityServices(android.content.ComponentName, java.util.List<java.lang.String>);
    method public boolean setPermittedInputMethods(android.content.ComponentName, java.util.List<java.lang.String>);
    method public void setPreferredSetupActivity(android.content.ComponentName, android.content.ComponentName);
    method public void setProfileEnabled(android.content.ComponentName);
    method public void setProfileName(android.content.ComponentName, java.lang.String);
    method public void setRecommendedGlobalProxy(android.content.ComponentName, android.net.ProxyInfo);
+0 −23
Original line number Diff line number Diff line
@@ -2534,15 +2534,6 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
            return true;
        }

        case UPDATE_PREFERRED_SETUP_ACTIVITY_TRANSACTION: {
            data.enforceInterface(IActivityManager.descriptor);
            ComponentName preferredActivity = ComponentName.readFromParcel(data);
            int userId = data.readInt();
            updatePreferredSetupActivity(preferredActivity, userId);
            reply.writeNoException();
            return true;
        }

        case GET_PACKAGE_PROCESS_STATE_TRANSACTION: {
            data.enforceInterface(IActivityManager.descriptor);
            String pkg = data.readString();
@@ -5867,20 +5858,6 @@ class ActivityManagerProxy implements IActivityManager
        reply.recycle();
    }

    @Override
    public void updatePreferredSetupActivity(ComponentName preferredActivity, int userId)
            throws RemoteException {
        Parcel data = Parcel.obtain();
        Parcel reply = Parcel.obtain();
        data.writeInterfaceToken(IActivityManager.descriptor);
        ComponentName.writeToParcel(preferredActivity, data);
        data.writeInt(userId);
        mRemote.transact(UPDATE_PREFERRED_SETUP_ACTIVITY_TRANSACTION, data, reply, 0);
        reply.readException();
        data.recycle();
        reply.recycle();
    }

    @Override
    public int getPackageProcessState(String packageName) throws RemoteException {
        Parcel data = Parcel.obtain();
+3 −6
Original line number Diff line number Diff line
@@ -502,8 +502,6 @@ public interface IActivityManager extends IInterface {
            throws RemoteException;
    public void updateLockTaskPackages(int userId, String[] packages) throws RemoteException;
    public void updateDeviceOwner(String packageName) throws RemoteException;
    public void updatePreferredSetupActivity(ComponentName preferredActivity, int userId)
            throws RemoteException;

    public int getPackageProcessState(String packageName) throws RemoteException;

@@ -850,8 +848,7 @@ public interface IActivityManager extends IInterface {
    int GET_PACKAGE_PROCESS_STATE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+293;
    int SHOW_LOCK_TASK_ESCAPE_MESSAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+294;
    int UPDATE_DEVICE_OWNER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+295;
    int UPDATE_PREFERRED_SETUP_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+296;
    int KEYGUARD_GOING_AWAY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+297;
    int REGISTER_UID_OBSERVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+298;
    int UNREGISTER_UID_OBSERVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+299;
    int KEYGUARD_GOING_AWAY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+296;
    int REGISTER_UID_OBSERVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+297;
    int UNREGISTER_UID_OBSERVER_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+298;
}
+0 −18
Original line number Diff line number Diff line
@@ -4403,24 +4403,6 @@ public class DevicePolicyManager {
        }
    }

    /**
     * Called by a device initializer to set the activity to be launched on device boot or after a
     * user switch during user setup. This activity will be started regardless of the priority of
     * other 'home' activities. Once user setup is complete, the preferred setup activity will be
     * ignored.
     *
     * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
     * @param activity The Activity to be started by default during user setup.
     */
    public void setPreferredSetupActivity(@NonNull ComponentName admin,
            @NonNull ComponentName activity) {
        try {
            mService.setPreferredSetupActivity(admin, activity);
        } catch (RemoteException re) {
            Log.w(TAG, "Failed talking with device policy service", re);
        }
    }

    /**
     * Called by profile or device owners to set the default response for future runtime permission
     * requests by applications. The policy can allow for normal operation which prompts the
Loading