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

Commit b2f02129 authored by Xin Li's avatar Xin Li
Browse files

Merge sc-v2-dev-plus-aosp-without-vendor@8433047

Bug: 226662282
Merged-In: I6541f7d49cb932c85374bf9acf777038b888e873
Change-Id: I95df36a778a7fa9ea52fe0bba2332534d6288032
parents 33c901fa e42c779e
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import static android.net.NetworkCapabilities.NET_ENTERPRISE_ID_1;
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;
@@ -167,6 +168,27 @@ 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) {
        Objects.requireNonNull(managedProfileUser, "managedProfileUser can't be null");
        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,
+3 −0
Original line number Diff line number Diff line
@@ -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;
@@ -98,6 +99,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);

+1 −0
Original line number Diff line number Diff line
@@ -549,6 +549,7 @@ public final class Parcel {
     */
    public final void recycle() {
        if (DEBUG_RECYCLE) mStack = null;
        mClassCookies = null;
        freeBuffer();

        if (mOwnsNativeParcelObject) {
+1 −1
Original line number Diff line number Diff line
@@ -306,7 +306,7 @@ interface IWindowSession {
    */
    void grantInputChannel(int displayId, in SurfaceControl surface, in IWindow window,
            in IBinder hostInputToken, int flags, int privateFlags, int type,
            out InputChannel outInputChannel);
            in IBinder focusGrantToken, out InputChannel outInputChannel);

    /**
     * Update the flags on an input channel associated with a particular surface.
+8 −0
Original line number Diff line number Diff line
@@ -245,6 +245,7 @@ public final class SurfaceControl implements Parcelable {
            @SurfaceControl.BufferTransform int transformHint);
    private static native int nativeGetTransformHint(long nativeObject);
    private static native int nativeGetLayerId(long nativeObject);
    private static native void nativeSanitize(long transactionObject);

    /**
     * Transforms that can be applied to buffers as they are displayed to a window.
@@ -3543,6 +3544,13 @@ public final class SurfaceControl implements Parcelable {
            return this;
        }

        /**
         * @hide
         */
        public void sanitize() {
            nativeSanitize(mNativeObject);
        }

        /**
         * Merge the other transaction into this transaction, clearing the
         * other transaction as if it had been applied.
Loading