NIU Actions: Handle null default assistant

This handles the case where Settings.Secure.ASSISTANT is null, which occurs when config_defaultAssistant is not set at build time.

Change-Id: I6b0bd316e5221d96be538471b5eaae361ca74ba2
CRs-Fixed: 3533091
This commit is contained in:
jianbinz 2023-06-29 16:32:14 +08:00 committed by jianbin zhang
parent dde112fce3
commit ff55b3a7f4
1 changed files with 5 additions and 1 deletions

View File

@ -253,7 +253,11 @@ public final class TaskOverlayFactoryGo extends TaskOverlayFactory {
String assistantPackage =
Settings.Secure.getString(contentResolver, Settings.Secure.ASSISTANT);
if (!TextUtils.isEmpty(assistantPackage)) {
mNIUPackageName = assistantPackage.split("/", 2)[0];
} else {
mNIUPackageName = "";
}
}
protected class OverlayUICallbacksGoImpl extends OverlayUICallbacksImpl