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

Commit fae8f25d authored by sandeepbandaru's avatar sandeepbandaru Committed by Sandeep Bandaru
Browse files

writeString8 is a hidden API and is not working on Auto targets

- Changing to writeString default usage.
- Added permission checks for resetTemporaryServices which was missed previously.

Bug: 330012130
Test: cts

Change-Id: Ife9aecad4f81eae6590f3c13053e757d0dc9e4de
parent 36a9cd9c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -137,8 +137,8 @@ public final class Feature implements Parcelable {
        if (mModelName != null) flg |= 0x4;
        dest.writeByte(flg);
        dest.writeInt(mId);
        if (mName != null) dest.writeString8(mName);
        if (mModelName != null) dest.writeString8(mModelName);
        if (mName != null) dest.writeString(mName);
        if (mModelName != null) dest.writeString(mModelName);
        dest.writeInt(mType);
        dest.writeInt(mVariant);
        dest.writeTypedObject(mFeatureParams, flags);
+4 −0
Original line number Diff line number Diff line
@@ -662,7 +662,11 @@ public class OnDeviceIntelligenceManagerService extends SystemService {
        }
    }

    @RequiresPermission(Manifest.permission.USE_ON_DEVICE_INTELLIGENCE)
    public void resetTemporaryServices() {
        enforceShellOnly(Binder.getCallingUid(), "resetTemporaryServices");
        mContext.enforceCallingPermission(
                Manifest.permission.USE_ON_DEVICE_INTELLIGENCE, TAG);
        synchronized (mLock) {
            if (mTemporaryHandler != null) {
                mTemporaryHandler.removeMessages(MSG_RESET_TEMPORARY_SERVICE);