summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/AppInfo.java
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-10-02 04:13:06 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-10-02 04:13:06 +0000
commit0db3dc42862f9afca31230b25e763f7f98868f28 (patch)
tree983c8948a88e21f9d2de0c7352a8f1e26efb8e79 /src/com/android/launcher3/AppInfo.java
parent1b60530b9272671b6bddda223aea9dfd95f5d469 (diff)
parent850a7b1030ae172327d5ded01eb4c477d209e82b (diff)
downloadandroid_packages_apps_Trebuchet-0db3dc42862f9afca31230b25e763f7f98868f28.tar.gz
android_packages_apps_Trebuchet-0db3dc42862f9afca31230b25e763f7f98868f28.tar.bz2
android_packages_apps_Trebuchet-0db3dc42862f9afca31230b25e763f7f98868f28.zip
release-request-53526352-7b51-4ab1-a661-632ffc55dd7c-for-git_oc-mr1-release-4371241 snap-temp-L10900000107789672
Change-Id: I7001c12c7af12044cf424419079144a1afca34c9
Diffstat (limited to 'src/com/android/launcher3/AppInfo.java')
-rw-r--r--src/com/android/launcher3/AppInfo.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/com/android/launcher3/AppInfo.java b/src/com/android/launcher3/AppInfo.java
index 3da199635..7d2f75385 100644
--- a/src/com/android/launcher3/AppInfo.java
+++ b/src/com/android/launcher3/AppInfo.java
@@ -19,6 +19,7 @@ package com.android.launcher3;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
+import android.content.pm.ApplicationInfo;
import android.content.pm.LauncherActivityInfo;
import android.os.UserHandle;
@@ -31,6 +32,10 @@ import com.android.launcher3.util.PackageManagerHelper;
*/
public class AppInfo extends ItemInfoWithIcon {
+ public static final int FLAG_SYSTEM_UNKNOWN = 0;
+ public static final int FLAG_SYSTEM_YES = 1 << 0;
+ public static final int FLAG_SYSTEM_NO = 1 << 1;
+
/**
* The intent used to start the application.
*/
@@ -43,6 +48,11 @@ public class AppInfo extends ItemInfoWithIcon {
*/
public int isDisabled = ShortcutInfo.DEFAULT;
+ /**
+ * Stores if the app is a system app or not.
+ */
+ public int isSystemApp;
+
public AppInfo() {
itemType = LauncherSettings.Favorites.ITEM_TYPE_APPLICATION;
}
@@ -71,6 +81,10 @@ public class AppInfo extends ItemInfoWithIcon {
}
intent = makeLaunchIntent(info);
+
+ isSystemApp = (info.getApplicationInfo().flags & ApplicationInfo.FLAG_SYSTEM) == 0
+ ? FLAG_SYSTEM_NO : FLAG_SYSTEM_YES;
+
}
public AppInfo(AppInfo info) {
@@ -79,6 +93,7 @@ public class AppInfo extends ItemInfoWithIcon {
title = Utilities.trim(info.title);
intent = new Intent(info.intent);
isDisabled = info.isDisabled;
+ isSystemApp = info.isSystemApp;
}
@Override