mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Removing static reference of deep shortcut manager
Bug: 141376165 Change-Id: Ie60b82be63a8926825598c681d8b2a1b2ace6413
This commit is contained in:
@@ -332,4 +332,17 @@ public class PackageManagerHelper {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if Launcher has the permission to access shortcuts.
|
||||
* @see LauncherApps#hasShortcutHostPermission()
|
||||
*/
|
||||
public static boolean hasShortcutsPermission(Context context) {
|
||||
try {
|
||||
return context.getSystemService(LauncherApps.class).hasShortcutHostPermission();
|
||||
} catch (SecurityException | IllegalStateException e) {
|
||||
Log.e(TAG, "Failed to make shortcut manager call", e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user