* commit 'e58ba842de4324c62b7e527f0b90fc6ee5ccba13': Fix SysUI crashes on svelte devices
This commit is contained in:
@@ -49,8 +49,10 @@ public class AssistUtils {
|
|||||||
public boolean showSessionForActiveService(Bundle args, int sourceFlags,
|
public boolean showSessionForActiveService(Bundle args, int sourceFlags,
|
||||||
IVoiceInteractionSessionShowCallback showCallback, IBinder activityToken) {
|
IVoiceInteractionSessionShowCallback showCallback, IBinder activityToken) {
|
||||||
try {
|
try {
|
||||||
return mVoiceInteractionManagerService.showSessionForActiveService(args, sourceFlags,
|
if (mVoiceInteractionManagerService != null) {
|
||||||
showCallback, activityToken);
|
return mVoiceInteractionManagerService.showSessionForActiveService(args,
|
||||||
|
sourceFlags, showCallback, activityToken);
|
||||||
|
}
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.w(TAG, "Failed to call showSessionForActiveService", e);
|
Log.w(TAG, "Failed to call showSessionForActiveService", e);
|
||||||
}
|
}
|
||||||
@@ -59,7 +61,9 @@ public class AssistUtils {
|
|||||||
|
|
||||||
public void launchVoiceAssistFromKeyguard() {
|
public void launchVoiceAssistFromKeyguard() {
|
||||||
try {
|
try {
|
||||||
|
if (mVoiceInteractionManagerService != null) {
|
||||||
mVoiceInteractionManagerService.launchVoiceAssistFromKeyguard();
|
mVoiceInteractionManagerService.launchVoiceAssistFromKeyguard();
|
||||||
|
}
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.w(TAG, "Failed to call launchVoiceAssistFromKeyguard", e);
|
Log.w(TAG, "Failed to call launchVoiceAssistFromKeyguard", e);
|
||||||
}
|
}
|
||||||
@@ -87,7 +91,11 @@ public class AssistUtils {
|
|||||||
|
|
||||||
public ComponentName getActiveServiceComponentName() {
|
public ComponentName getActiveServiceComponentName() {
|
||||||
try {
|
try {
|
||||||
|
if (mVoiceInteractionManagerService != null) {
|
||||||
return mVoiceInteractionManagerService.getActiveServiceComponentName();
|
return mVoiceInteractionManagerService.getActiveServiceComponentName();
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.w(TAG, "Failed to call getActiveServiceComponentName", e);
|
Log.w(TAG, "Failed to call getActiveServiceComponentName", e);
|
||||||
return null;
|
return null;
|
||||||
@@ -106,7 +114,9 @@ public class AssistUtils {
|
|||||||
|
|
||||||
public void hideCurrentSession() {
|
public void hideCurrentSession() {
|
||||||
try {
|
try {
|
||||||
|
if (mVoiceInteractionManagerService != null) {
|
||||||
mVoiceInteractionManagerService.hideCurrentSession();
|
mVoiceInteractionManagerService.hideCurrentSession();
|
||||||
|
}
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.w(TAG, "Failed to call hideCurrentSession", e);
|
Log.w(TAG, "Failed to call hideCurrentSession", e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user