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

Commit ed2bba11 authored by Felipe Leme's avatar Felipe Leme
Browse files

Fixed name of autofill service on save UI.

Test: atest CtsAutoFillServiceTestCases
Bug: 62537081
Fixes: 79201521

Change-Id: I9ae7137719390b61c38da1e52fcb13fd59333792
parent 56c1b4f7
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import android.app.IActivityManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageItemInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.ServiceInfo;
@@ -667,7 +668,10 @@ final class AutofillManagerServiceImpl {

    @NonNull
    CharSequence getServiceLabel() {
        return mInfo.getServiceInfo().loadLabel(mContext.getPackageManager());
        final CharSequence label = mInfo.getServiceInfo().loadSafeLabel(
                mContext.getPackageManager(), 0 /* do not ellipsize */,
                PackageItemInfo.SAFE_LABEL_FLAG_FIRST_LINE | PackageItemInfo.SAFE_LABEL_FLAG_TRIM);
        return label;
    }

    @NonNull
@@ -912,6 +916,7 @@ final class AutofillManagerServiceImpl {
        } else {
            pw.println();
            mInfo.dump(prefix2, pw);
            pw.print(prefix); pw.print("Service Label: "); pw.println(getServiceLabel());
        }
        pw.print(prefix); pw.print("Component from settings: ");
            pw.println(getComponentNameFromSettings());