Loading core/java/android/app/admin/DevicePolicyManager.java +21 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.app.admin; import static com.android.internal.util.function.pooled.PooledLambda.obtainMessage; import android.Manifest.permission; import android.accounts.Account; import android.annotation.CallbackExecutor; import android.annotation.ColorInt; import android.annotation.IntDef; Loading Loading @@ -151,6 +152,26 @@ public class DevicePolicyManager { this(context, service, false); } /** * Called when a managed profile has been provisioned. * * @throws SecurityException if the caller does not hold * {@link android.Manifest.permission#MANAGE_PROFILE_AND_DEVICE_OWNERS}. * @hide */ @RequiresPermission(android.Manifest.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS) public void finalizeWorkProfileProvisioning( @NonNull UserHandle managedProfileUser, @Nullable Account migratedAccount) { if (mService == null) { throw new IllegalStateException("Could not find DevicePolicyManagerService"); } try { mService.finalizeWorkProfileProvisioning(managedProfileUser, migratedAccount); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** @hide */ @VisibleForTesting protected DevicePolicyManager(Context context, IDevicePolicyManager service, Loading core/java/android/app/admin/IDevicePolicyManager.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.app.admin; import android.accounts.Account; import android.app.admin.NetworkEvent; import android.app.IApplicationThread; import android.app.IServiceConnection; Loading Loading @@ -87,6 +88,8 @@ interface IDevicePolicyManager { int getCurrentFailedPasswordAttempts(int userHandle, boolean parent); int getProfileWithMinimumFailedPasswordsForWipe(int userHandle, boolean parent); void finalizeWorkProfileProvisioning(in UserHandle managedProfileUser, in Account migratedAccount); void setMaximumFailedPasswordsForWipe(in ComponentName admin, int num, boolean parent); int getMaximumFailedPasswordsForWipe(in ComponentName admin, int userHandle, boolean parent); Loading core/java/android/hardware/location/GeofenceHardwareRequestParcelable.java +3 −6 Original line number Diff line number Diff line Loading @@ -16,9 +16,9 @@ package android.hardware.location; import android.os.BadParcelableException; import android.os.Parcel; import android.os.Parcelable; import android.util.Log; /** * Geofence Hardware Request used for internal location services communication. Loading Loading @@ -140,10 +140,7 @@ public final class GeofenceHardwareRequestParcelable implements Parcelable { public GeofenceHardwareRequestParcelable createFromParcel(Parcel parcel) { int geofenceType = parcel.readInt(); if (geofenceType != GeofenceHardwareRequest.GEOFENCE_TYPE_CIRCLE) { Log.e( "GeofenceHardwareRequest", String.format("Invalid Geofence type: %d", geofenceType)); return null; throw new BadParcelableException("Invalid Geofence type: " + geofenceType); } GeofenceHardwareRequest request = GeofenceHardwareRequest.createCircularGeofence( Loading core/java/android/service/gatekeeper/GateKeeperResponse.java +1 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ public final class GateKeeperResponse implements Parcelable { dest.writeInt(mTimeout); } else if (mResponseCode == RESPONSE_OK) { dest.writeInt(mShouldReEnroll ? 1 : 0); if (mPayload != null) { if (mPayload != null && mPayload.length > 0) { dest.writeInt(mPayload.length); dest.writeByteArray(mPayload); } else { Loading core/res/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ <protected-broadcast android:name="android.intent.action.USER_ACTIVITY_NOTIFICATION" /> <protected-broadcast android:name="android.intent.action.MY_PACKAGE_SUSPENDED" /> <protected-broadcast android:name="android.intent.action.MY_PACKAGE_UNSUSPENDED" /> <protected-broadcast android:name="android.app.action.MANAGED_PROFILE_PROVISIONED" /> <protected-broadcast android:name="android.os.action.POWER_SAVE_MODE_CHANGED" /> <protected-broadcast android:name="android.os.action.POWER_SAVE_MODE_CHANGING" /> Loading Loading
core/java/android/app/admin/DevicePolicyManager.java +21 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.app.admin; import static com.android.internal.util.function.pooled.PooledLambda.obtainMessage; import android.Manifest.permission; import android.accounts.Account; import android.annotation.CallbackExecutor; import android.annotation.ColorInt; import android.annotation.IntDef; Loading Loading @@ -151,6 +152,26 @@ public class DevicePolicyManager { this(context, service, false); } /** * Called when a managed profile has been provisioned. * * @throws SecurityException if the caller does not hold * {@link android.Manifest.permission#MANAGE_PROFILE_AND_DEVICE_OWNERS}. * @hide */ @RequiresPermission(android.Manifest.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS) public void finalizeWorkProfileProvisioning( @NonNull UserHandle managedProfileUser, @Nullable Account migratedAccount) { if (mService == null) { throw new IllegalStateException("Could not find DevicePolicyManagerService"); } try { mService.finalizeWorkProfileProvisioning(managedProfileUser, migratedAccount); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } /** @hide */ @VisibleForTesting protected DevicePolicyManager(Context context, IDevicePolicyManager service, Loading
core/java/android/app/admin/IDevicePolicyManager.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.app.admin; import android.accounts.Account; import android.app.admin.NetworkEvent; import android.app.IApplicationThread; import android.app.IServiceConnection; Loading Loading @@ -87,6 +88,8 @@ interface IDevicePolicyManager { int getCurrentFailedPasswordAttempts(int userHandle, boolean parent); int getProfileWithMinimumFailedPasswordsForWipe(int userHandle, boolean parent); void finalizeWorkProfileProvisioning(in UserHandle managedProfileUser, in Account migratedAccount); void setMaximumFailedPasswordsForWipe(in ComponentName admin, int num, boolean parent); int getMaximumFailedPasswordsForWipe(in ComponentName admin, int userHandle, boolean parent); Loading
core/java/android/hardware/location/GeofenceHardwareRequestParcelable.java +3 −6 Original line number Diff line number Diff line Loading @@ -16,9 +16,9 @@ package android.hardware.location; import android.os.BadParcelableException; import android.os.Parcel; import android.os.Parcelable; import android.util.Log; /** * Geofence Hardware Request used for internal location services communication. Loading Loading @@ -140,10 +140,7 @@ public final class GeofenceHardwareRequestParcelable implements Parcelable { public GeofenceHardwareRequestParcelable createFromParcel(Parcel parcel) { int geofenceType = parcel.readInt(); if (geofenceType != GeofenceHardwareRequest.GEOFENCE_TYPE_CIRCLE) { Log.e( "GeofenceHardwareRequest", String.format("Invalid Geofence type: %d", geofenceType)); return null; throw new BadParcelableException("Invalid Geofence type: " + geofenceType); } GeofenceHardwareRequest request = GeofenceHardwareRequest.createCircularGeofence( Loading
core/java/android/service/gatekeeper/GateKeeperResponse.java +1 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ public final class GateKeeperResponse implements Parcelable { dest.writeInt(mTimeout); } else if (mResponseCode == RESPONSE_OK) { dest.writeInt(mShouldReEnroll ? 1 : 0); if (mPayload != null) { if (mPayload != null && mPayload.length > 0) { dest.writeInt(mPayload.length); dest.writeByteArray(mPayload); } else { Loading
core/res/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ <protected-broadcast android:name="android.intent.action.USER_ACTIVITY_NOTIFICATION" /> <protected-broadcast android:name="android.intent.action.MY_PACKAGE_SUSPENDED" /> <protected-broadcast android:name="android.intent.action.MY_PACKAGE_UNSUSPENDED" /> <protected-broadcast android:name="android.app.action.MANAGED_PROFILE_PROVISIONED" /> <protected-broadcast android:name="android.os.action.POWER_SAVE_MODE_CHANGED" /> <protected-broadcast android:name="android.os.action.POWER_SAVE_MODE_CHANGING" /> Loading