diff options
author | Selim Cinek <cinek@google.com> | 2015-04-24 16:46:13 -0700 |
---|---|---|
committer | Selim Cinek <cinek@google.com> | 2015-05-05 14:52:52 -0700 |
commit | e70d6535237d2e6f03adcd0bdc11e45ea714dc97 (patch) | |
tree | 342b22ff5e17567563e008f2b684bfcd3ba3f932 /packages/SystemUI/src/com/android/systemui/assist | |
parent | 08e474ca24c024be29ed8a593cbd2748abde44ce (diff) | |
download | frameworks_base-e70d6535237d2e6f03adcd0bdc11e45ea714dc97.zip frameworks_base-e70d6535237d2e6f03adcd0bdc11e45ea714dc97.tar.gz frameworks_base-e70d6535237d2e6f03adcd0bdc11e45ea714dc97.tar.bz2 |
The voice assist may now be launched above the lockscreen
A possibility was introduced to launch voice assist over
the lockscreen using the left keyguard affordance.
Change-Id: Ic4618d24256b65441a50d77d0ef59b0ec99b6ead
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/assist')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/assist/AssistManager.java (renamed from packages/SystemUI/src/com/android/systemui/assist/AssistGestureManager.java) | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/assist/AssistGestureManager.java b/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java index d9f2324..d1f8963 100644 --- a/packages/SystemUI/src/com/android/systemui/assist/AssistGestureManager.java +++ b/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java @@ -33,11 +33,11 @@ import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.phone.PhoneStatusBar; /** - * Class to manage everything around the assist gesture. + * Class to manage everything related to assist in SystemUI. */ -public class AssistGestureManager { +public class AssistManager { - private static final String TAG = "AssistGestureManager"; + private static final String TAG = "AssistManager"; private static final String ASSIST_ICON_METADATA_NAME = "com.android.systemui.action_assist_icon"; @@ -77,7 +77,7 @@ public class AssistGestureManager { } }; - public AssistGestureManager(PhoneStatusBar bar, Context context) { + public AssistManager(PhoneStatusBar bar, Context context) { mContext = context; mBar = bar; mWindowManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE); @@ -194,6 +194,14 @@ public class AssistGestureManager { } } + public void launchVoiceAssistFromKeyguard() { + try { + mVoiceInteractionManagerService.launchVoiceAssistFromKeyguard(); + } catch (RemoteException e) { + Log.w(TAG, "Failed to call launchVoiceAssistFromKeyguard", e); + } + } + private boolean getVoiceInteractorSupportsAssistGesture() { try { return mVoiceInteractionManagerService.activeServiceSupportsAssist(); @@ -203,7 +211,16 @@ public class AssistGestureManager { } } - private ComponentName getVoiceInteractorComponentName() { + public boolean canVoiceAssistBeLaunchedFromKeyguard() { + try { + return mVoiceInteractionManagerService.activeServiceSupportsLaunchFromKeyguard(); + } catch (RemoteException e) { + Log.w(TAG, "Failed to call activeServiceSupportsLaunchFromKeyguard", e); + return false; + } + } + + public ComponentName getVoiceInteractorComponentName() { try { return mVoiceInteractionManagerService.getActiveServiceComponentName(); } catch (RemoteException e) { |