From 5f560d056243638a83a4e7770035fdb66004c9d7 Mon Sep 17 00:00:00 2001 From: Jorim Jaggi Date: Thu, 30 Apr 2015 11:49:29 -0700 Subject: [PATCH] Rename supportsAssistGesture to supportsAssist Bug: 20642759 Change-Id: Idddc786980244cc94570d04fd414540bbad60448 --- api/current.txt | 2 +- api/system-current.txt | 2 +- .../service/voice/VoiceInteractionServiceInfo.java | 10 +++++----- .../internal/app/IVoiceInteractionManagerService.aidl | 2 +- core/res/res/values/attrs.xml | 4 ++-- core/res/res/values/public.xml | 2 +- .../android/systemui/assist/AssistGestureManager.java | 2 +- .../VoiceInteractionManagerService.java | 4 ++-- tests/Assist/res/xml/interaction_service.xml | 2 +- tests/VoiceInteraction/res/xml/interaction_service.xml | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/api/current.txt b/api/current.txt index be011123e549a..b70f5d7ed392f 100644 --- a/api/current.txt +++ b/api/current.txt @@ -1188,7 +1188,7 @@ package android { field public static final int summaryColumn = 16843426; // 0x10102a2 field public static final int summaryOff = 16843248; // 0x10101f0 field public static final int summaryOn = 16843247; // 0x10101ef - field public static final int supportsAssistGesture = 16844011; // 0x10104eb + field public static final int supportsAssist = 16844011; // 0x10104eb field public static final int supportsRtl = 16843695; // 0x10103af field public static final int supportsSwitchingToNextInputMethod = 16843755; // 0x10103eb field public static final int supportsUploading = 16843419; // 0x101029b diff --git a/api/system-current.txt b/api/system-current.txt index c4f96afed3553..f3935fc8cc404 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -1263,7 +1263,7 @@ package android { field public static final int summaryColumn = 16843426; // 0x10102a2 field public static final int summaryOff = 16843248; // 0x10101f0 field public static final int summaryOn = 16843247; // 0x10101ef - field public static final int supportsAssistGesture = 16844011; // 0x10104eb + field public static final int supportsAssist = 16844011; // 0x10104eb field public static final int supportsRtl = 16843695; // 0x10103af field public static final int supportsSwitchingToNextInputMethod = 16843755; // 0x10103eb field public static final int supportsUploading = 16843419; // 0x101029b diff --git a/core/java/android/service/voice/VoiceInteractionServiceInfo.java b/core/java/android/service/voice/VoiceInteractionServiceInfo.java index 4bc97c9cbcb5d..997d58673da39 100644 --- a/core/java/android/service/voice/VoiceInteractionServiceInfo.java +++ b/core/java/android/service/voice/VoiceInteractionServiceInfo.java @@ -43,7 +43,7 @@ public class VoiceInteractionServiceInfo { private String mSessionService; private String mRecognitionService; private String mSettingsActivity; - private boolean mSupportsAssistGesture; + private boolean mSupportsAssist; public VoiceInteractionServiceInfo(PackageManager pm, ComponentName comp) throws PackageManager.NameNotFoundException { @@ -95,8 +95,8 @@ public class VoiceInteractionServiceInfo { com.android.internal.R.styleable.VoiceInteractionService_recognitionService); mSettingsActivity = array.getString( com.android.internal.R.styleable.VoiceInteractionService_settingsActivity); - mSupportsAssistGesture = array.getBoolean( - com.android.internal.R.styleable.VoiceInteractionService_supportsAssistGesture, + mSupportsAssist = array.getBoolean( + com.android.internal.R.styleable.VoiceInteractionService_supportsAssist, false); array.recycle(); if (mSessionService == null) { @@ -145,7 +145,7 @@ public class VoiceInteractionServiceInfo { return mSettingsActivity; } - public boolean getSupportsAssistGesture() { - return mSupportsAssistGesture; + public boolean getSupportsAssist() { + return mSupportsAssist; } } diff --git a/core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl b/core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl index d149c5b9d497e..4c6db24e40435 100644 --- a/core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl +++ b/core/java/com/android/internal/app/IVoiceInteractionManagerService.aidl @@ -105,5 +105,5 @@ interface IVoiceInteractionManagerService { * Indicates whether the currently active voice interaction service is capable of handling the * assist gesture. */ - boolean activeServiceSupportsAssistGesture(); + boolean activeServiceSupportsAssist(); } diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 702f7201acc35..8bcbca10d0891 100644 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -7305,8 +7305,8 @@ - + assist action. --> + diff --git a/packages/SystemUI/src/com/android/systemui/assist/AssistGestureManager.java b/packages/SystemUI/src/com/android/systemui/assist/AssistGestureManager.java index 36be3555e4865..d9f2324b8e81e 100644 --- a/packages/SystemUI/src/com/android/systemui/assist/AssistGestureManager.java +++ b/packages/SystemUI/src/com/android/systemui/assist/AssistGestureManager.java @@ -196,7 +196,7 @@ public class AssistGestureManager { private boolean getVoiceInteractorSupportsAssistGesture() { try { - return mVoiceInteractionManagerService.activeServiceSupportsAssistGesture(); + return mVoiceInteractionManagerService.activeServiceSupportsAssist(); } catch (RemoteException e) { Log.w(TAG, "Failed to call activeServiceSupportsAssistGesture", e); return false; diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java index 81c5e6afbea55..56b2fa53d37b2 100644 --- a/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java +++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/VoiceInteractionManagerService.java @@ -734,10 +734,10 @@ public class VoiceInteractionManagerService extends SystemService { } @Override - public boolean activeServiceSupportsAssistGesture() { + public boolean activeServiceSupportsAssist() { enforceCallingPermission(Manifest.permission.ACCESS_VOICE_INTERACTION_SERVICE); synchronized (this) { - return mImpl != null && mImpl.mInfo.getSupportsAssistGesture(); + return mImpl != null && mImpl.mInfo.getSupportsAssist(); } } diff --git a/tests/Assist/res/xml/interaction_service.xml b/tests/Assist/res/xml/interaction_service.xml index 2fd50aae105fd..f56156e53fb2e 100644 --- a/tests/Assist/res/xml/interaction_service.xml +++ b/tests/Assist/res/xml/interaction_service.xml @@ -18,4 +18,4 @@ + android:supportsAssist="true"/> diff --git a/tests/VoiceInteraction/res/xml/interaction_service.xml b/tests/VoiceInteraction/res/xml/interaction_service.xml index 789493a7f22c8..c015ad232faec 100644 --- a/tests/VoiceInteraction/res/xml/interaction_service.xml +++ b/tests/VoiceInteraction/res/xml/interaction_service.xml @@ -21,4 +21,4 @@ android:sessionService="com.android.test.voiceinteraction.MainInteractionSessionService" android:recognitionService="com.android.test.voiceinteraction.MainRecognitionService" android:settingsActivity="com.android.test.voiceinteraction.SettingsActivity" - android:supportsAssistGesture="true" /> + android:supportsAssist="true" />