mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 18:58:19 +00:00
Removing unused instant apps methods
Change-Id: I82bf86a8604cdb64853e7d0d6f4cbca275f5fa7a
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user