Fix 3385675: Uninstall option available for system app

- when a system app is selected in all apps, don't show uninstall button
- if it's an updated system app, show "Uninstall update"
- Also, remove unused code for non-existent flag for games

Change-Id: I46753ee8d213b2ba1613b71ac1fe73d79786129c
diff --git a/src/com/android/launcher2/ApplicationInfo.java b/src/com/android/launcher2/ApplicationInfo.java
index 3adea37..1d948b7 100644
--- a/src/com/android/launcher2/ApplicationInfo.java
+++ b/src/com/android/launcher2/ApplicationInfo.java
@@ -59,9 +59,9 @@
 
     ComponentName componentName;
 
-    static final int APP_FLAG = 1;
-    static final int GAME_FLAG = 2;
-    static final int DOWNLOADED_FLAG = 4;
+    static final int DOWNLOADED_FLAG = 1;
+    static final int UPDATED_SYSTEM_APP_FLAG = 2;
+
     int flags = 0;
 
     ApplicationInfo() {
@@ -83,17 +83,12 @@
             int appFlags = pm.getApplicationInfo(packageName, 0).flags;
             if ((appFlags & android.content.pm.ApplicationInfo.FLAG_SYSTEM) == 0) {
                 flags |= DOWNLOADED_FLAG;
-            }
-            if ((appFlags & android.content.pm.ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0) {
-                flags |= DOWNLOADED_FLAG;
+
+                if ((appFlags & android.content.pm.ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0) {
+                    flags |= UPDATED_SYSTEM_APP_FLAG;
+                }
             }
             firstInstallTime = pm.getPackageInfo(packageName, 0).firstInstallTime;
-            // TODO: Figure out how to determine what is a game
-
-            // If it's not a game, it's an app
-            if ((flags & GAME_FLAG) == 0) {
-                flags |= APP_FLAG;
-            }
         } catch (NameNotFoundException e) {
             Log.d(TAG, "PackageManager.getApplicationInfo failed for " + packageName);
         }