Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
os
BlissLauncher
Commits
c207221c
Commit
c207221c
authored
Dec 11, 2020
by
Amit Kumar
💻
Browse files
Fix crash when shortcut is deleted if it is having null package name
parent
ee47058f
Pipeline
#89618
passed with stage
in 8 minutes and 13 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/foundation/e/blisslauncher/features/launcher/LauncherActivity.java
View file @
c207221c
...
...
@@ -520,7 +520,7 @@ public class LauncherActivity extends AppCompatActivity implements
}
public
void
onAppAddEvent
(
AppAddEvent
appAddEvent
)
{
updateOrAddApp
(
appAddEvent
.
getPackageName
(),
appAddEvent
.
getUserHandle
());
updateOrAddApp
(
appAddEvent
.
getPackageName
(),
appAddEvent
.
getUserHandle
());
//DatabaseManager.getManager(this).saveLayouts(pages, mDock);
if
(
moveTo
!=
-
1
)
{
mHorizontalPager
.
setCurrentPage
(
moveTo
);
...
...
@@ -1984,11 +1984,18 @@ public class LauncherActivity extends AppCompatActivity implements
.
setMessage
(
R
.
string
.
uninstall_shortcut_dialog
)
.
setPositiveButton
(
R
.
string
.
ok
,
(
dialog1
,
which
)
->
{
ShortcutItem
shortcut
=
(
ShortcutItem
)
launcherItem
;
DeepShortcutManager
.
getInstance
(
this
).
unpinShortcut
(
ShortcutKey
.
fromItem
(
shortcut
));
if
(
DeepShortcutManager
.
getInstance
(
this
).
wasLastCallSuccess
())
{
if
(
shortcut
.
packageName
!=
null
)
{
DeepShortcutManager
.
getInstance
(
this
).
unpinShortcut
(
ShortcutKey
.
fromItem
(
shortcut
));
if
(
DeepShortcutManager
.
getInstance
(
this
).
wasLastCallSuccess
())
{
deleteShortcutFromProvider
(
shortcut
.
id
);
removeShortcutView
(
shortcut
,
blissFrameLayout
);
}
}
else
{
// Null package name generally comes for nougat shortcuts so don't unpin here, just directly delete it.
deleteShortcutFromProvider
(
shortcut
.
id
);
removeShortcutView
(
shortcut
,
blissFrameLayout
);
}
})
.
setNegativeButton
(
R
.
string
.
cancel
,
null
)
.
setIcon
(
launcherItem
.
icon
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment