Removing unused instant apps methods

Change-Id: I82bf86a8604cdb64853e7d0d6f4cbca275f5fa7a
This commit is contained in:
Sunny Goyal
2019-03-27 15:38:41 -07:00
parent d8b9264a1a
commit ee89e5da7d
2 changed files with 1 additions and 33 deletions

View File

@@ -19,16 +19,11 @@ package com.android.quickstep;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.InstantAppInfo;
import android.content.pm.PackageManager;
import android.util.Log;
import com.android.launcher3.AppInfo;
import com.android.launcher3.util.InstantAppResolver;
import java.util.ArrayList;
import java.util.List;
/**
* Implementation of InstantAppResolver using platform APIs
*/
@@ -40,8 +35,7 @@ public class InstantAppResolverImpl extends InstantAppResolver {
private final PackageManager mPM;
public InstantAppResolverImpl(Context context)
throws NoSuchMethodException, ClassNotFoundException {
public InstantAppResolverImpl(Context context) {
mPM = context.getPackageManager();
}
@@ -55,23 +49,4 @@ public class InstantAppResolverImpl extends InstantAppResolver {
ComponentName cn = info.getTargetComponent();
return cn != null && cn.getClassName().equals(COMPONENT_CLASS_MARKER);
}
@Override
public List<ApplicationInfo> getInstantApps() {
try {
List<ApplicationInfo> result = new ArrayList<>();
for (InstantAppInfo iai : mPM.getInstantApps()) {
ApplicationInfo info = iai.getApplicationInfo();
if (info != null) {
result.add(info);
}
}
return result;
} catch (SecurityException se) {
Log.w(TAG, "getInstantApps failed. Launcher may not be the default home app.", se);
} catch (Exception e) {
Log.e(TAG, "Error calling API: getInstantApps", e);
}
return super.getInstantApps();
}
}