summaryrefslogtreecommitdiff
path: root/services/voiceinteraction
diff options
context:
space:
mode:
authorPhilip P. Moltmann <moltmann@google.com>2020-02-10 16:14:12 +0000
committerPhilip P. Moltmann <moltmann@google.com>2020-02-10 16:14:12 +0000
commite7421e92d947b09ca3cb9e6dfb66bbb27b9ed114 (patch)
treedae8c7d89b00c42abf37cba47fe92a2a67611543 /services/voiceinteraction
parent9c5226fe363245e454d715cc4009ac9a80de5b6a (diff)
Revert "Activity start: Send featureId from context->AppOpsManager"
Revert "Adjust monkey to changed internal APIs" Revert "Test featureId is correctly used in startActivity" Revert submission 10111030-activityStarter_featureId Reason for revert: presubmit test breakage Reverted Changes: Ic7056b492: Activity start: Send featureId from context->AppOp... I8e2a07da7: Adjust monkey to changed internal APIs I7a6af6fb1: Test featureId is correctly used in startActivity Change-Id: I48c55a962c990b22ea49e923baa7c73b121d179b
Diffstat (limited to 'services/voiceinteraction')
-rw-r--r--services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java14
-rw-r--r--services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java18
2 files changed, 15 insertions, 17 deletions
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
index 8378d8ed9f68..d5eec332cda0 100644
--- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
+++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java
@@ -747,8 +747,7 @@ public class VoiceInteractionManagerService extends SystemService {
}
@Override
- public int startVoiceActivity(IBinder token, Intent intent, String resolvedType,
- String callingFeatureId) {
+ public int startVoiceActivity(IBinder token, Intent intent, String resolvedType) {
synchronized (this) {
if (mImpl == null) {
Slog.w(TAG, "startVoiceActivity without running voice interaction service");
@@ -758,8 +757,8 @@ public class VoiceInteractionManagerService extends SystemService {
final int callingUid = Binder.getCallingUid();
final long caller = Binder.clearCallingIdentity();
try {
- return mImpl.startVoiceActivityLocked(callingFeatureId, callingPid, callingUid,
- token, intent, resolvedType);
+ return mImpl.startVoiceActivityLocked(callingPid, callingUid, token,
+ intent, resolvedType);
} finally {
Binder.restoreCallingIdentity(caller);
}
@@ -767,8 +766,7 @@ public class VoiceInteractionManagerService extends SystemService {
}
@Override
- public int startAssistantActivity(IBinder token, Intent intent, String resolvedType,
- String callingFeatureId) {
+ public int startAssistantActivity(IBinder token, Intent intent, String resolvedType) {
synchronized (this) {
if (mImpl == null) {
Slog.w(TAG, "startAssistantActivity without running voice interaction service");
@@ -778,8 +776,8 @@ public class VoiceInteractionManagerService extends SystemService {
final int callingUid = Binder.getCallingUid();
final long caller = Binder.clearCallingIdentity();
try {
- return mImpl.startAssistantActivityLocked(callingFeatureId, callingPid,
- callingUid, token, intent, resolvedType);
+ return mImpl.startAssistantActivityLocked(callingPid, callingUid, token,
+ intent, resolvedType);
} finally {
Binder.restoreCallingIdentity(caller);
}
diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
index a62b03ca82e4..a1210cfce26d 100644
--- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
+++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java
@@ -216,8 +216,8 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne
return true;
}
- public int startVoiceActivityLocked(@Nullable String callingFeatureId, int callingPid,
- int callingUid, IBinder token, Intent intent, String resolvedType) {
+ public int startVoiceActivityLocked(int callingPid, int callingUid, IBinder token,
+ Intent intent, String resolvedType) {
try {
if (mActiveSession == null || token != mActiveSession.mToken) {
Slog.w(TAG, "startVoiceActivity does not match active session");
@@ -230,16 +230,16 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne
intent = new Intent(intent);
intent.addCategory(Intent.CATEGORY_VOICE);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
- return mAtm.startVoiceActivity(mComponent.getPackageName(), callingFeatureId,
- callingPid, callingUid, intent, resolvedType, mActiveSession.mSession,
- mActiveSession.mInteractor, 0, null, null, mUser);
+ return mAtm.startVoiceActivity(mComponent.getPackageName(), callingPid, callingUid,
+ intent, resolvedType, mActiveSession.mSession, mActiveSession.mInteractor,
+ 0, null, null, mUser);
} catch (RemoteException e) {
throw new IllegalStateException("Unexpected remote error", e);
}
}
- public int startAssistantActivityLocked(@Nullable String callingFeatureId, int callingPid,
- int callingUid, IBinder token, Intent intent, String resolvedType) {
+ public int startAssistantActivityLocked(int callingPid, int callingUid, IBinder token,
+ Intent intent, String resolvedType) {
try {
if (mActiveSession == null || token != mActiveSession.mToken) {
Slog.w(TAG, "startAssistantActivity does not match active session");
@@ -253,8 +253,8 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
final ActivityOptions options = ActivityOptions.makeBasic();
options.setLaunchActivityType(ACTIVITY_TYPE_ASSISTANT);
- return mAtm.startAssistantActivity(mComponent.getPackageName(), callingFeatureId,
- callingPid, callingUid, intent, resolvedType, options.toBundle(), mUser);
+ return mAtm.startAssistantActivity(mComponent.getPackageName(), callingPid, callingUid,
+ intent, resolvedType, options.toBundle(), mUser);
} catch (RemoteException e) {
throw new IllegalStateException("Unexpected remote error", e);
}