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

Commit 36e6fecf authored by Ivan Chiang's avatar Ivan Chiang
Browse files

Use noteOpNoThrow instead of checkOpNoThrow in AssistDataRequester

To audit data access and verify the uid and package are consistent,
use noteOpNoThrow instead of checkOpNoThrow.

Bug: 187439908
Test: atest AssistDataRequesterTest
Test: atest CtsVoiceInteractionTestCases
Test: atest CtsAssistTestCases
Change-Id: Ib48040b5b55be09958da4398f4d663908573568c
parent 26f403a2
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@ Lcom/android/ims/internal/uce/options/IOptionsService$Stub;-><init>()V
Lcom/android/ims/internal/uce/presence/IPresenceService$Stub;-><init>()V
Lcom/android/ims/internal/uce/uceservice/IUceListener$Stub;-><init>()V
Lcom/android/ims/internal/uce/uceservice/IUceService$Stub;-><init>()V
Lcom/android/internal/app/IVoiceInteractionManagerService$Stub$Proxy;->showSessionFromSession(Landroid/os/IBinder;Landroid/os/Bundle;I)Z
Lcom/android/internal/appwidget/IAppWidgetService$Stub;->TRANSACTION_bindAppWidgetId:I
Lcom/android/internal/telephony/ITelephony$Stub;->DESCRIPTOR:Ljava/lang/String;
Lcom/android/internal/telephony/ITelephony$Stub;->TRANSACTION_dial:I
+1 −1
Original line number Diff line number Diff line
@@ -230,7 +230,7 @@ interface IActivityTaskManager {
            in IBinder activityToken, int flags);
    boolean isAssistDataAllowedOnCurrentActivity();
    boolean requestAssistDataForTask(in IAssistDataReceiver receiver, int taskId,
            in String callingPackageName);
            in String callingPackageName, String callingAttributionTag);

    /**
     * Notify the system that the keyguard is going away.
+6 −2
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.service.voice;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.os.Bundle;
import android.os.IBinder;
@@ -32,9 +33,12 @@ public abstract class VoiceInteractionManagerInternal {
     * Start a new voice interaction session when requested from within an activity
     * by Activity.startLocalVoiceInteraction()
     * @param callingActivity The binder token representing the calling activity.
     * @param options 
     * @param attributionTag The attribution tag of the calling context or {@code null} for default
     *                       attribution
     * @param options A Bundle of private arguments to the current voice interaction service
     */
    public abstract void startLocalVoiceInteraction(IBinder callingActivity, Bundle options);
    public abstract void startLocalVoiceInteraction(@NonNull IBinder callingActivity,
            @Nullable String attributionTag, @NonNull Bundle options);

    /**
     * Returns whether the currently selected voice interaction service supports local voice
+1 −1
Original line number Diff line number Diff line
@@ -242,7 +242,7 @@ public class VoiceInteractionService extends Service {
            throw new IllegalStateException("Not available until onReady() is called");
        }
        try {
            mSystemService.showSession(args, flags);
            mSystemService.showSession(args, flags, getAttributionTag());
        } catch (RemoteException e) {
        }
    }
+2 −1
Original line number Diff line number Diff line
@@ -1384,7 +1384,8 @@ public class VoiceInteractionSession implements KeyEvent.Callback, ComponentCall
            throw new IllegalStateException("Can't call before onCreate()");
        }
        try {
            mSystemService.showSessionFromSession(mToken, args, flags);
            mSystemService.showSessionFromSession(mToken, args, flags,
                    mContext.getAttributionTag());
        } catch (RemoteException e) {
        }
    }
Loading