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

Commit b07375b1 authored by Roman Birg's avatar Roman Birg Committed by Arne Coucheron
Browse files

Settings: add package name to app info



Change-Id: I8ce737ec5150f37e61240d8053403046ca9317fb
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent ae0647b7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ public class AppOpsDetails extends InstrumentedFragment {
        CharSequence label = mPm.getApplicationLabel(pkgInfo.applicationInfo);
        Drawable icon = mPm.getApplicationIcon(pkgInfo.applicationInfo);
        InstalledAppDetails.setupAppSnippet(appSnippet, label, icon,
                pkgInfo != null ? pkgInfo.versionName : null);
                pkgInfo != null ? pkgInfo.versionName : null, null);
    }

    private String retrieveAppEntry() {
+8 −2
Original line number Diff line number Diff line
@@ -558,7 +558,7 @@ public class InstalledAppDetails extends AppInfoBase
        final View appSnippet = mHeader.findViewById(R.id.app_snippet);
        mState.ensureIcon(mAppEntry);
        setupAppSnippet(appSnippet, mAppEntry.label, mAppEntry.icon,
                pkgInfo != null ? pkgInfo.versionName : null);
                pkgInfo != null ? pkgInfo.versionName : null, pkgInfo.packageName);
    }

    private boolean signaturesMatch(String pkg1, String pkg2) {
@@ -1049,7 +1049,7 @@ public class InstalledAppDetails extends AppInfoBase
    }

    public static void setupAppSnippet(View appSnippet, CharSequence label, Drawable icon,
            CharSequence versionName) {
            CharSequence versionName, String packageName) {
        LayoutInflater.from(appSnippet.getContext()).inflate(R.layout.widget_text_views,
                (ViewGroup) appSnippet.findViewById(android.R.id.widget_frame));

@@ -1061,6 +1061,12 @@ public class InstalledAppDetails extends AppInfoBase
        // Version number of application
        TextView appVersion = (TextView) appSnippet.findViewById(R.id.widget_text1);

        if (packageName != null) {
            TextView appPackage = (TextView) appSnippet.findViewById(R.id.widget_text2);
            appPackage.setText(packageName);
            appPackage.setSelected(true);
        }

        if (!TextUtils.isEmpty(versionName)) {
            appVersion.setSelected(true);
            appVersion.setVisibility(View.VISIBLE);