Loading services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java +4 −14 Original line number Diff line number Diff line Loading @@ -393,12 +393,9 @@ public class VoiceInteractionManagerService extends SystemService { throw new SecurityException( "Caller is not the current voice interaction service"); } final int callingPid = Binder.getCallingPid(); final int callingUid = Binder.getCallingUid(); final long caller = Binder.clearCallingIdentity(); try { mImpl.showSessionLocked(callingPid, callingUid, args, flags, null /* showCallback */); mImpl.showSessionLocked(args, flags, null /* showCallback */); } finally { Binder.restoreCallingIdentity(caller); } Loading Loading @@ -432,12 +429,9 @@ public class VoiceInteractionManagerService extends SystemService { Slog.w(TAG, "showSessionFromSession without running voice interaction service"); return false; } final int callingPid = Binder.getCallingPid(); final int callingUid = Binder.getCallingUid(); final long caller = Binder.clearCallingIdentity(); try { return mImpl.showSessionLocked(callingPid, callingUid, sessionArgs, flags, null /* showCallback */); return mImpl.showSessionLocked(sessionArgs, flags, null /* showCallback */); } finally { Binder.restoreCallingIdentity(caller); } Loading Loading @@ -506,11 +500,9 @@ public class VoiceInteractionManagerService extends SystemService { Slog.w(TAG, "finish without running voice interaction service"); return; } final int callingPid = Binder.getCallingPid(); final int callingUid = Binder.getCallingUid(); final long caller = Binder.clearCallingIdentity(); try { mImpl.finishLocked(callingPid, callingUid, token); mImpl.finishLocked(token); } finally { Binder.restoreCallingIdentity(caller); } Loading Loading @@ -708,11 +700,9 @@ public class VoiceInteractionManagerService extends SystemService { + "service"); return; } final int callingPid = Binder.getCallingPid(); final int callingUid = Binder.getCallingUid(); final long caller = Binder.clearCallingIdentity(); try { mImpl.showSessionLocked(callingPid, callingUid, new Bundle() /* sessionArgs */, mImpl.showSessionLocked(new Bundle() /* sessionArgs */, VoiceInteractionService.START_SOURCE_ASSIST_GESTURE | VoiceInteractionService.START_WITH_ASSIST | VoiceInteractionService.START_WITH_SCREENSHOT, Loading services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java +4 −4 Original line number Diff line number Diff line Loading @@ -135,11 +135,11 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne mContext.registerReceiver(mBroadcastReceiver, filter, null, handler); } public boolean showSessionLocked(int callingPid, int callingUid, Bundle args, int flags, public boolean showSessionLocked(Bundle args, int flags, IVoiceInteractionSessionShowCallback showCallback) { if (mActiveSession == null) { mActiveSession = new VoiceInteractionSessionConnection(mLock, mSessionComponentName, mUser, mContext, this, callingPid, callingUid); mUser, mContext, this, mInfo.getServiceInfo().applicationInfo.uid); } return mActiveSession.showLocked(args, flags, showCallback); } Loading Loading @@ -196,7 +196,7 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne } } public void finishLocked(int callingPid, int callingUid, IBinder token) { public void finishLocked(IBinder token) { if (mActiveSession == null || token != mActiveSession.mToken) { Slog.w(TAG, "finish does not match active session"); return; Loading Loading @@ -267,7 +267,7 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne @Override public void sessionConnectionGone(VoiceInteractionSessionConnection connection) { synchronized (mLock) { finishLocked(connection.mCallingPid, connection.mCallingUid, connection.mToken); finishLocked(connection.mToken); } } } services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java +1 −3 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ final class VoiceInteractionSessionConnection implements ServiceConnection { final int mUser; final Context mContext; final Callback mCallback; final int mCallingPid; final int mCallingUid; final IActivityManager mAm; final IWindowManager mIWindowManager; Loading Loading @@ -139,13 +138,12 @@ final class VoiceInteractionSessionConnection implements ServiceConnection { }; public VoiceInteractionSessionConnection(Object lock, ComponentName component, int user, Context context, Callback callback, int callingPid, int callingUid) { Context context, Callback callback, int callingUid) { mLock = lock; mSessionComponentName = component; mUser = user; mContext = context; mCallback = callback; mCallingPid = callingPid; mCallingUid = callingUid; mAm = ActivityManagerNative.getDefault(); mIWindowManager = IWindowManager.Stub.asInterface( Loading Loading
services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java +4 −14 Original line number Diff line number Diff line Loading @@ -393,12 +393,9 @@ public class VoiceInteractionManagerService extends SystemService { throw new SecurityException( "Caller is not the current voice interaction service"); } final int callingPid = Binder.getCallingPid(); final int callingUid = Binder.getCallingUid(); final long caller = Binder.clearCallingIdentity(); try { mImpl.showSessionLocked(callingPid, callingUid, args, flags, null /* showCallback */); mImpl.showSessionLocked(args, flags, null /* showCallback */); } finally { Binder.restoreCallingIdentity(caller); } Loading Loading @@ -432,12 +429,9 @@ public class VoiceInteractionManagerService extends SystemService { Slog.w(TAG, "showSessionFromSession without running voice interaction service"); return false; } final int callingPid = Binder.getCallingPid(); final int callingUid = Binder.getCallingUid(); final long caller = Binder.clearCallingIdentity(); try { return mImpl.showSessionLocked(callingPid, callingUid, sessionArgs, flags, null /* showCallback */); return mImpl.showSessionLocked(sessionArgs, flags, null /* showCallback */); } finally { Binder.restoreCallingIdentity(caller); } Loading Loading @@ -506,11 +500,9 @@ public class VoiceInteractionManagerService extends SystemService { Slog.w(TAG, "finish without running voice interaction service"); return; } final int callingPid = Binder.getCallingPid(); final int callingUid = Binder.getCallingUid(); final long caller = Binder.clearCallingIdentity(); try { mImpl.finishLocked(callingPid, callingUid, token); mImpl.finishLocked(token); } finally { Binder.restoreCallingIdentity(caller); } Loading Loading @@ -708,11 +700,9 @@ public class VoiceInteractionManagerService extends SystemService { + "service"); return; } final int callingPid = Binder.getCallingPid(); final int callingUid = Binder.getCallingUid(); final long caller = Binder.clearCallingIdentity(); try { mImpl.showSessionLocked(callingPid, callingUid, new Bundle() /* sessionArgs */, mImpl.showSessionLocked(new Bundle() /* sessionArgs */, VoiceInteractionService.START_SOURCE_ASSIST_GESTURE | VoiceInteractionService.START_WITH_ASSIST | VoiceInteractionService.START_WITH_SCREENSHOT, Loading
services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerServiceImpl.java +4 −4 Original line number Diff line number Diff line Loading @@ -135,11 +135,11 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne mContext.registerReceiver(mBroadcastReceiver, filter, null, handler); } public boolean showSessionLocked(int callingPid, int callingUid, Bundle args, int flags, public boolean showSessionLocked(Bundle args, int flags, IVoiceInteractionSessionShowCallback showCallback) { if (mActiveSession == null) { mActiveSession = new VoiceInteractionSessionConnection(mLock, mSessionComponentName, mUser, mContext, this, callingPid, callingUid); mUser, mContext, this, mInfo.getServiceInfo().applicationInfo.uid); } return mActiveSession.showLocked(args, flags, showCallback); } Loading Loading @@ -196,7 +196,7 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne } } public void finishLocked(int callingPid, int callingUid, IBinder token) { public void finishLocked(IBinder token) { if (mActiveSession == null || token != mActiveSession.mToken) { Slog.w(TAG, "finish does not match active session"); return; Loading Loading @@ -267,7 +267,7 @@ class VoiceInteractionManagerServiceImpl implements VoiceInteractionSessionConne @Override public void sessionConnectionGone(VoiceInteractionSessionConnection connection) { synchronized (mLock) { finishLocked(connection.mCallingPid, connection.mCallingUid, connection.mToken); finishLocked(connection.mToken); } } }
services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionSessionConnection.java +1 −3 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ final class VoiceInteractionSessionConnection implements ServiceConnection { final int mUser; final Context mContext; final Callback mCallback; final int mCallingPid; final int mCallingUid; final IActivityManager mAm; final IWindowManager mIWindowManager; Loading Loading @@ -139,13 +138,12 @@ final class VoiceInteractionSessionConnection implements ServiceConnection { }; public VoiceInteractionSessionConnection(Object lock, ComponentName component, int user, Context context, Callback callback, int callingPid, int callingUid) { Context context, Callback callback, int callingUid) { mLock = lock; mSessionComponentName = component; mUser = user; mContext = context; mCallback = callback; mCallingPid = callingPid; mCallingUid = callingUid; mAm = ActivityManagerNative.getDefault(); mIWindowManager = IWindowManager.Stub.asInterface( Loading