summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/AppInfo.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/AppInfo.java')
-rw-r--r--src/com/android/launcher3/AppInfo.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/launcher3/AppInfo.java b/src/com/android/launcher3/AppInfo.java
index b1af370b1..674d8e819 100644
--- a/src/com/android/launcher3/AppInfo.java
+++ b/src/com/android/launcher3/AppInfo.java
@@ -110,6 +110,19 @@ public class AppInfo extends ItemInfo {
return flags;
}
+ public static int initFlags(PackageInfo info) {
+ int appFlags = info.applicationInfo.flags;
+ int flags = 0;
+ if ((appFlags & android.content.pm.ApplicationInfo.FLAG_SYSTEM) == 0) {
+ flags |= DOWNLOADED_FLAG;
+
+ if ((appFlags & android.content.pm.ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0) {
+ flags |= UPDATED_SYSTEM_APP_FLAG;
+ }
+ }
+ return flags;
+ }
+
public AppInfo(AppInfo info) {
super(info);
componentName = info.componentName;