Reloading workspace when the shortcuts permission changes
> Check for permission on every onResume > If the permission is different than last known permission, reload and rebind workspace. Bug: 30789422 Change-Id: Idfa445815e29e2336505779545507d106b33a253
This commit is contained in:
@@ -224,4 +224,16 @@ public class DeepShortcutManager {
|
||||
return Collections.EMPTY_LIST;
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(25)
|
||||
public boolean hasHostPermission() {
|
||||
if (Utilities.isNycMR1OrAbove()) {
|
||||
try {
|
||||
return mLauncherApps.hasShortcutHostPermission();
|
||||
} catch (SecurityException|IllegalStateException e) {
|
||||
Log.e(TAG, "Failed to make shortcut manager call", e);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user