Adds null checks on callers of Nullable method getA11yServiceInfo().

Also renames mPackageName to mFeatureName. This string is used as the
user-visible feature name, e.g. TalkBack, not the APK package name.

Fix: 382054546
Test: n/a (existing presubmit)
Flag: EXEMPT minor bugfix
Change-Id: I1ce6902612d89bbb68bddf30227ca231ea98dce7
This commit is contained in:
Daniel Norman
2024-12-04 18:44:56 +00:00
parent 4a84a244b2
commit 908bd398bd
8 changed files with 16 additions and 16 deletions

View File

@@ -81,7 +81,7 @@ public class LaunchAccessibilityActivityPreferenceFragment extends ToggleFeature
super.onProcessArguments(arguments);
mComponentName = arguments.getParcelable(AccessibilitySettings.EXTRA_COMPONENT_NAME);
final ActivityInfo info = getAccessibilityShortcutInfo().getActivityInfo();
mPackageName = info.loadLabel(getPackageManager()).toString();
mFeatureName = info.loadLabel(getPackageManager());
// Settings animated image.
final int animatedImageRes = arguments.getInt(