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

Commit 66e21b83 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11794304 from a577e5e5 to 24Q3-release

Change-Id: I3e97a24e09c03de88d9b0f399be256f92837bd5f
parents 89375cd4 a577e5e5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -270,6 +270,7 @@ android_ravenwood_libgroup {
    ],
    jni_libs: [
        "libandroid_runtime",
        "libravenwood_runtime",
    ],
}

+1 −0
Original line number Diff line number Diff line
@@ -872,6 +872,7 @@ package android.app {
  public static final class AppOpsManager.OpEventProxyInfo implements android.os.Parcelable {
    method public int describeContents();
    method @Nullable public String getAttributionTag();
    method @FlaggedApi("android.permission.flags.device_id_in_op_proxy_info_enabled") @Nullable public String getDeviceId();
    method @Nullable public String getPackageName();
    method @IntRange(from=0) public int getUid();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
+4 −1
Original line number Diff line number Diff line
@@ -7438,6 +7438,7 @@ public final class ActivityThread extends ClientTransactionHandler
        }
        mDdmSyncStageUpdater.next(Stage.Running);

        long timestampApplicationOnCreateNs = 0;
        try {
            // If the app is being launched for full backup or restore, bring it up in
            // a restricted environment with the base application class.
@@ -7480,8 +7481,10 @@ public final class ActivityThread extends ClientTransactionHandler
                    + data.instrumentationName + ": " + e.toString(), e);
            }
            try {
                timestampApplicationOnCreateNs = SystemClock.elapsedRealtimeNanos();
                mInstrumentation.callApplicationOnCreate(app);
            } catch (Exception e) {
                timestampApplicationOnCreateNs = 0;
                if (!mInstrumentation.onException(app, e)) {
                    throw new RuntimeException(
                      "Unable to create application " + app.getClass().getName()
@@ -7519,7 +7522,7 @@ public final class ActivityThread extends ClientTransactionHandler
        }

        try {
            mgr.finishAttachApplication(mStartSeq);
            mgr.finishAttachApplication(mStartSeq, timestampApplicationOnCreateNs);
        } catch (RemoteException ex) {
            throw ex.rethrowFromSystemServer();
        }
+33 −6
Original line number Diff line number Diff line
@@ -3457,6 +3457,8 @@ public class AppOpsManager {
        private @Nullable String mPackageName;
        /** Attribution tag of the proxy that noted the op */
        private @Nullable String mAttributionTag;
        /** Persistent device Id of the proxy that noted the op */
        private @Nullable String mDeviceId;

        /**
         * Reinit existing object with new state.
@@ -3464,14 +3466,16 @@ public class AppOpsManager {
         * @param uid UID of the proxy app that noted the op
         * @param packageName Package of the proxy that noted the op
         * @param attributionTag attribution tag of the proxy that noted the op
         * @param deviceId Persistent device Id of the proxy that noted the op
         *
         * @hide
         */
        public void reinit(@IntRange(from = 0) int uid, @Nullable String packageName,
                @Nullable String attributionTag) {
                @Nullable String attributionTag, @Nullable String deviceId) {
            mUid = Preconditions.checkArgumentNonnegative(uid);
            mPackageName = packageName;
            mAttributionTag = attributionTag;
            mDeviceId = deviceId;
        }


@@ -3505,16 +3509,33 @@ public class AppOpsManager {
                @IntRange(from = 0) int uid,
                @Nullable String packageName,
                @Nullable String attributionTag) {
            this(uid, packageName, attributionTag,
                    VirtualDeviceManager.PERSISTENT_DEVICE_ID_DEFAULT);
        }

        /**
         * Creates a new OpEventProxyInfo.
         *
         * @param uid UID of the proxy app that noted the op
         * @param packageName Package of the proxy that noted the op
         * @param attributionTag Attribution tag of the proxy that noted the op
         * @param deviceId Persistent device Id of the proxy that noted the op
         *
         * @hide
         */
        public OpEventProxyInfo(
                @IntRange(from = 0) int uid,
                @Nullable String packageName,
                @Nullable String attributionTag,
                @Nullable String deviceId) {
            this.mUid = uid;
            com.android.internal.util.AnnotationValidations.validate(
                    IntRange.class, null, mUid,
                    "from", 0);
            this.mPackageName = packageName;
            this.mAttributionTag = attributionTag;

            // onConstructed(); // You can define this method to get a callback
            this.mDeviceId = deviceId;
        }

        /**
         * Copy constructor
         *
@@ -3525,6 +3546,7 @@ public class AppOpsManager {
            mUid = orig.mUid;
            mPackageName = orig.mPackageName;
            mAttributionTag = orig.mAttributionTag;
            mDeviceId = orig.mDeviceId;
        }

        /**
@@ -3551,6 +3573,9 @@ public class AppOpsManager {
            return mAttributionTag;
        }

        @FlaggedApi(Flags.FLAG_DEVICE_ID_IN_OP_PROXY_INFO_ENABLED)
        public @Nullable String getDeviceId() { return mDeviceId; }

        @Override
        @DataClass.Generated.Member
        public void writeToParcel(@NonNull Parcel dest, int flags) {
@@ -3560,10 +3585,12 @@ public class AppOpsManager {
            byte flg = 0;
            if (mPackageName != null) flg |= 0x2;
            if (mAttributionTag != null) flg |= 0x4;
            if (mDeviceId != null) flg |= 0x8;
            dest.writeByte(flg);
            dest.writeInt(mUid);
            if (mPackageName != null) dest.writeString(mPackageName);
            if (mAttributionTag != null) dest.writeString(mAttributionTag);
            if (mDeviceId != null) dest.writeString(mDeviceId);
        }

        @Override
@@ -3581,14 +3608,14 @@ public class AppOpsManager {
            int uid = in.readInt();
            String packageName = (flg & 0x2) == 0 ? null : in.readString();
            String attributionTag = (flg & 0x4) == 0 ? null : in.readString();

            String deviceId = (flg & 0x8) == 0 ? null : in.readString();
            this.mUid = uid;
            com.android.internal.util.AnnotationValidations.validate(
                    IntRange.class, null, mUid,
                    "from", 0);
            this.mPackageName = packageName;
            this.mAttributionTag = attributionTag;

            this.mDeviceId = deviceId;
            // onConstructed(); // You can define this method to get a callback
        }

+5 −5
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ public class GrammaticalInflectionManager {
     * Sets the current grammatical gender for all privileged applications. The value will be
     * stored in an encrypted file at {@link android.os.Environment#getDataSystemCeDirectory(int)}
     *
     * @param grammaticalGender the terms of address the user preferred in system.
     * @param grammaticalGender the grammatical gender set by the user for the system.
     *
     * @see Configuration#getGrammaticalGender
     * @hide
@@ -123,12 +123,12 @@ public class GrammaticalInflectionManager {
    }

    /**
     * Get the current grammatical gender of privileged application from the encrypted file.
     * Allows privileged preloaded applications to get the system grammatical gender when set.
     *
     * @return the value of system grammatical gender only if the calling app has the permission,
     * otherwise throwing an exception.
     * @return The value of system grammatical gender only if the calling app has the
     * permission, otherwise throwing an exception.
     *
     * @throws SecurityException if the caller does not have the required permission.
     * @throws SecurityException If the caller does not have the required permission.
     *
     * @see Configuration#getGrammaticalGender
     */
Loading