OSDN Git Service

Settings: add package name to app info
[android-x86/packages-apps-Settings.git] / src / com / android / settings / applications / InstalledAppDetails.java
index efeade1..5b8c78a 100644 (file)
@@ -553,7 +553,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) {
@@ -1042,7 +1042,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));
 
@@ -1054,6 +1054,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);