Moving come helper methods to corresponding classes

> Moving isPackageEnabled to InstallShortcutReceiver
> Moving the deep shortcut map to the data model
> Removing appInfo.flags. Instead fetching the flags when needed

Change-Id: I654dd8acefa7b7d183b0419afbe112bef001d536
This commit is contained in:
Sunny Goyal
2016-10-10 10:41:41 -07:00
parent 5fe414f9a4
commit 8e0e1d7609
8 changed files with 81 additions and 113 deletions

View File

@@ -226,7 +226,8 @@ public class InstallShortcutReceiver extends BroadcastReceiver {
String packageName = pendingInfo.getTargetPackage();
if (!TextUtils.isEmpty(packageName)) {
UserHandleCompat myUserHandle = UserHandleCompat.myUserHandle();
if (!LauncherModel.isValidPackage(context, packageName, myUserHandle)) {
if (!LauncherAppsCompat.getInstance(context)
.isPackageEnabledForProfile(packageName, myUserHandle)) {
if (DBG) Log.d(TAG, "Ignoring shortcut for absent package: "
+ pendingInfo.launchIntent);
continue;