Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45abf1a0 authored by Yi Jiang's avatar Yi Jiang
Browse files

In getAttentionServicePackageName(), only return the package name of Attention...

In getAttentionServicePackageName(), only return the package name of Attention Service instead of package name+class name.

Test: manually tested on devices.
Bug: 129899828
Change-Id: Ibafb6e3fecb896e95833eb0131483e9a756ea4c6
parent 515904df
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -20472,8 +20472,16 @@ public class PackageManagerService extends IPackageManager.Stub
    }
    @Override
    public String getAttentionServicePackageName() {
        return mContext.getString(R.string.config_defaultAttentionService);
    public @Nullable String getAttentionServicePackageName() {
        final String flattenedComponentName =
                mContext.getString(R.string.config_defaultAttentionService);
        if (flattenedComponentName != null) {
            ComponentName componentName = ComponentName.unflattenFromString(flattenedComponentName);
            if (componentName != null && componentName.getPackageName() != null) {
                return componentName.getPackageName();
            }
        }
        return null;
    }
    private @Nullable String getDocumenterPackageName() {