diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index abc340ba90e1f068aadb9e90477ab3dc5fb0523c..fc2935bc72800ae5395b98879a16ba39d90a33ba 100755
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -43,6 +43,8 @@
+
+
{
- DeepShortcutManager.getInstance(this).unpinShortcut(ShortcutKey.fromItem((ShortcutItem) launcherItem));
- removeShortcutView((ShortcutItem) launcherItem, blissFrameLayout);
+ ShortcutItem shortcut = (ShortcutItem) launcherItem;
+ DeepShortcutManager.getInstance(this).unpinShortcut(ShortcutKey.fromItem(shortcut));
+ if (DeepShortcutManager.getInstance(this).wasLastCallSuccess()) {
+ deleteShortcutFromProvider(shortcut.id);
+ removeShortcutView(shortcut, blissFrameLayout);
+ }
})
.setNegativeButton(R.string.cancel, null)
.setIcon(launcherItem.icon)
@@ -2000,6 +2005,12 @@ public class LauncherActivity extends AppCompatActivity implements
blissFrameLayout.addView(imageView, layoutParams);
}
+ private void deleteShortcutFromProvider(String id) {
+ ContentResolver resolver = getContentResolver();
+ int count = resolver.delete(Uri.parse("content://foundation.e.pwaplayer.provider/pwa"), null, new String[]{id});
+ Log.d("LauncherActivity", "Items deleted from pwa provider: " + count);
+ }
+
private void removeShortcutView(ShortcutItem shortcutItem, BlissFrameLayout blissFrameLayout) {
DatabaseManager.getManager(this).removeLauncherItem(shortcutItem.id);
if (mFolderWindowContainer.getVisibility() == View.VISIBLE) {