mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Add system shortcuts when long pressing recent icon
We add a floating view for the menu that aligns with the task icon. If available, the following shortcuts are present: - Widgets - App info - Install (for instant apps) It is designed to be straightforward to add to this list. Bug: 70294936 Change-Id: I56c1098353d09fc564e0e92e59e4fcf692e486ba
This commit is contained in:
@@ -18,8 +18,11 @@ package com.android.launcher3.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.launcher3.AppInfo;
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.Utilities;
|
||||
|
||||
@@ -44,6 +47,17 @@ public class InstantAppResolver {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isInstantApp(Launcher launcher, String packageName) {
|
||||
PackageManager packageManager = launcher.getPackageManager();
|
||||
try {
|
||||
return isInstantApp(packageManager.getPackageInfo(packageName, 0).applicationInfo);
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
Log.e("InstantAppResolver", "Failed to determine whether package is instant app "
|
||||
+ packageName, e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public List<ApplicationInfo> getInstantApps() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user