No more LauncherActivityInfoCompat

Bug: 32745285
Change-Id: I00f13794d5dc0a2b1fe03ec74de36018f22eb386
This commit is contained in:
Sunny Goyal
2017-01-05 15:22:41 -08:00
parent 87f784c285
commit 3e9be43b6e
20 changed files with 77 additions and 182 deletions

View File

@@ -21,6 +21,7 @@ import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.content.Intent.ShortcutIconResource;
import android.content.pm.LauncherActivityInfo;
import android.database.Cursor;
import android.database.CursorWrapper;
import android.graphics.Bitmap;
@@ -39,7 +40,6 @@ import com.android.launcher3.LauncherSettings;
import com.android.launcher3.ShortcutInfo;
import com.android.launcher3.Utilities;
import com.android.launcher3.Workspace;
import com.android.launcher3.compat.LauncherActivityInfoCompat;
import com.android.launcher3.compat.LauncherAppsCompat;
import com.android.launcher3.compat.UserManagerCompat;
import com.android.launcher3.config.FeatureFlags;
@@ -234,7 +234,7 @@ public class LoaderCursor extends CursorWrapper {
Intent newIntent = new Intent(Intent.ACTION_MAIN, null);
newIntent.addCategory(Intent.CATEGORY_LAUNCHER);
newIntent.setComponent(componentName);
LauncherActivityInfoCompat lai = LauncherAppsCompat.getInstance(mContext)
LauncherActivityInfo lai = LauncherAppsCompat.getInstance(mContext)
.resolveActivity(newIntent, user);
if ((lai == null) && !allowMissingTarget) {
Log.d(TAG, "Missing activity found in getShortcutInfo: " + componentName);