|
|
@ -26,11 +26,10 @@ object PrivateShortcutCreateManager {
|
|
|
|
fun doesPrivateBrowsingPinnedShortcutExist(context: Context): Boolean {
|
|
|
|
fun doesPrivateBrowsingPinnedShortcutExist(context: Context): Boolean {
|
|
|
|
return if (SDK_INT >= Build.VERSION_CODES.N_MR1) {
|
|
|
|
return if (SDK_INT >= Build.VERSION_CODES.N_MR1) {
|
|
|
|
val pinnedShortcuts = context.getSystemService(ShortcutManager::class.java).pinnedShortcuts
|
|
|
|
val pinnedShortcuts = context.getSystemService(ShortcutManager::class.java).pinnedShortcuts
|
|
|
|
if (pinnedShortcuts.any {
|
|
|
|
pinnedShortcuts.any {
|
|
|
|
it.intent?.extras?.getString(HomeActivity.OPEN_TO_SEARCH) ==
|
|
|
|
it.intent?.extras?.getString(HomeActivity.OPEN_TO_SEARCH) ==
|
|
|
|
StartSearchIntentProcessor.PRIVATE_BROWSING_PINNED_SHORTCUT })
|
|
|
|
StartSearchIntentProcessor.PRIVATE_BROWSING_PINNED_SHORTCUT
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
false
|
|
|
|
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
false
|
|
|
|
false
|
|
|
|
}
|
|
|
|
}
|
|
|
|