Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb05e5fe authored by lijilou's avatar lijilou Committed by Pinyao Ting
Browse files

AppWidgetServiceImpl:fix NPE in pruneWidgetStateLocked mthod .

  When the hostsPackageForUser method return true,No nonNull judgment is made on the provider var which may be a null var.

Bug: 339747311
Test: manual
Change-Id: I00f8c12b5dec00eac6e50e2ef755742db3fe4521
parent f51a4c83
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -5681,7 +5681,9 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
                        // so we tear it down in anticipation of it (possibly) being
                        // reconstructed due to the restore
                        host.widgets.remove(widget);
                        if (provider != null) {
                            provider.widgets.remove(widget);
                        }
                        // Check if we need to destroy any services (if no other app widgets are
                        // referencing the same service)
                        decrementAppWidgetServiceRefCount(widget);