Donate to
e Foundation
|
Murena
handsets with /e/OS | Own a part of Murena!
Learn more
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
BlissLauncher
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
e
os
BlissLauncher
Commits
ad75cf6a
Commit
ad75cf6a
authored
2 years ago
by
Yash Garg
Browse files
Options
Downloads
Patches
Plain Diff
Remove widgets when an application is uninstalled
parent
d27e5894
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!136
Introduce WeatherUpdater instead of workers
,
!133
Remove widgets when an application is uninstalled
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/src/main/java/foundation/e/blisslauncher/features/launcher/LauncherActivity.java
+12
-0
12 additions, 0 deletions
...n/e/blisslauncher/features/launcher/LauncherActivity.java
with
12 additions
and
0 deletions
app/src/main/java/foundation/e/blisslauncher/features/launcher/LauncherActivity.java
+
12
−
0
View file @
ad75cf6a
...
@@ -629,6 +629,7 @@ public class LauncherActivity extends AppCompatActivity
...
@@ -629,6 +629,7 @@ public class LauncherActivity extends AppCompatActivity
forceRefreshSuggestedApps
=
true
;
forceRefreshSuggestedApps
=
true
;
removePackageFromLauncher
(
appRemoveEvent
.
getPackageName
(),
appRemoveEvent
.
getUserHandle
());
removePackageFromLauncher
(
appRemoveEvent
.
getPackageName
(),
appRemoveEvent
.
getUserHandle
());
DatabaseManager
.
getManager
(
this
).
saveLayouts
(
pages
,
mDock
);
DatabaseManager
.
getManager
(
this
).
saveLayouts
(
pages
,
mDock
);
rebindAllWidgets
();
}
}
public
void
onAppChangeEvent
(
AppChangeEvent
appChangeEvent
)
{
public
void
onAppChangeEvent
(
AppChangeEvent
appChangeEvent
)
{
...
@@ -1468,12 +1469,23 @@ public class LauncherActivity extends AppCompatActivity
...
@@ -1468,12 +1469,23 @@ public class LauncherActivity extends AppCompatActivity
}
}
// [[END]]
// [[END]]
rebindWidgetHost
();
}
private
void
rebindWidgetHost
()
{
int
[]
widgetIds
=
mAppWidgetHost
.
getAppWidgetIds
();
int
[]
widgetIds
=
mAppWidgetHost
.
getAppWidgetIds
();
getCompositeDisposable
().
add
(
DatabaseManager
.
getManager
(
this
).
getWidgets
(
widgetIds
)
getCompositeDisposable
().
add
(
DatabaseManager
.
getManager
(
this
).
getWidgets
(
widgetIds
)
.
subscribeOn
(
Schedulers
.
from
(
AppExecutors
.
getInstance
().
diskIO
()))
.
subscribeOn
(
Schedulers
.
from
(
AppExecutors
.
getInstance
().
diskIO
()))
.
observeOn
(
AndroidSchedulers
.
mainThread
()).
subscribe
(
this
::
bindWidgets
));
.
observeOn
(
AndroidSchedulers
.
mainThread
()).
subscribe
(
this
::
bindWidgets
));
}
}
public
void
rebindAllWidgets
()
{
if
(
widgetsPage
!=
null
)
{
widgetContainer
.
removeAllViewsInLayout
();
rebindWidgetHost
();
}
}
private
void
bindWidgets
(
List
<
WidgetItem
>
widgets
)
{
private
void
bindWidgets
(
List
<
WidgetItem
>
widgets
)
{
for
(
WidgetItem
widget
:
widgets
)
{
for
(
WidgetItem
widget
:
widgets
)
{
AppWidgetProviderInfo
appWidgetInfo
=
mAppWidgetManager
.
getAppWidgetInfo
(
widget
.
id
);
AppWidgetProviderInfo
appWidgetInfo
=
mAppWidgetManager
.
getAppWidgetInfo
(
widget
.
id
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment