do not add pinned shortcuts to the dynamic ones

This commit is contained in:
tibbi 2019-05-04 19:59:40 +02:00
parent c50812962c
commit 7484d2db7a
1 changed files with 1 additions and 8 deletions

View File

@ -1,7 +1,6 @@
package com.simplemobiletools.filemanager.pro.adapters package com.simplemobiletools.filemanager.pro.adapters
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.app.PendingIntent
import android.content.ClipData import android.content.ClipData
import android.content.ClipboardManager import android.content.ClipboardManager
import android.content.Context import android.content.Context
@ -246,13 +245,7 @@ class ItemsAdapter(activity: SimpleActivity, var listItems: MutableList<ListItem
.setIntent(intent) .setIntent(intent)
.build() .build()
manager.dynamicShortcuts = Arrays.asList(shortcut) manager.requestPinShortcut(shortcut, null)
val pinShortcutInfo = ShortcutInfo.Builder(activity, path).build()
val pinnedShortcutCallbackIntent = manager.createShortcutResultIntent(pinShortcutInfo)
val successCallback = PendingIntent.getBroadcast(activity, 0, pinnedShortcutCallbackIntent, 0)
manager.requestPinShortcut(pinShortcutInfo, successCallback.intentSender)
} }
} }
} }