Skip to content

Commit

Permalink
Fix adding shortcuts in Android 12.1+
Browse files Browse the repository at this point in the history
  • Loading branch information
proletarius101 committed May 28, 2022
1 parent 5f394d7 commit cab91b5
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ object IslandAppShortcut {

@OwnerUser @JvmStatic fun requestPin(context: Context, app: ApplicationInfo) {
val dynamic = isDynamicLabelEnabled(context)
val profile = app.user
if (IslandManager.isReady(context, profile))
Shuttle(context, profile).launchNoThrows { requestPinAsUser(this, app, dynamic) }
else requestPinAsUser(context, app, dynamic) // Create cross-profile shortcut in Mainland if Island is not ready (probably deactivated)
requestPinAsUser(context, app, dynamic)
}

/** @return true if launcher supports shortcut pinning, false for failure, or null if legacy shortcut installation broadcast is sent. */
Expand Down

0 comments on commit cab91b5

Please sign in to comment.