[core] Request create shortcut when using the secret code launch mana… (#1368)

* [core] Request create the shortcut when using the secret code launch manager and auto add shortcut is not disabled
This commit is contained in:
Howard Wu 2021-11-08 03:30:51 +08:00 committed by GitHub
parent 59b59ab69d
commit c0c1da28df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -191,9 +191,11 @@ public class LSPosedService extends ILSPosedService.Stub {
var userInfo = ActivityManagerService.getCurrentUser();
if (userInfo != null) {
var userId = userInfo.id;
if (userId == 0)
if (userId == 0) {
ActivityManagerService.startActivityAsUserWithFeature("android", null,
intent, intent.getType(), null, null, 0, 0, null, null, userId);
LSPManagerService.createOrUpdateShortcut(false);
}
}
} catch (Throwable e) {
Log.e(TAG, "dispatch secret code received", e);