summaryrefslogtreecommitdiff
path: root/libs/hwui/FrameInfoVisualizer.cpp
diff options
context:
space:
mode:
author Coco Duan <cocod@google.com> 2024-01-31 02:59:29 +0000
committer Coco Duan <cocod@google.com> 2024-01-31 22:50:30 +0000
commitfb4b51c58b1be4406cba3e42f5bcbd637f23a0d0 (patch)
treeb142e9b24cd5be8707332822af378ba143b850a1 /libs/hwui/FrameInfoVisualizer.cpp
parent5ed53c5ff51c0b11207a30dd3e829f6719832506 (diff)
Fix NPE when removing widgets
The issue happened when removing a user-selected widget, as `deleteWidget()` handles removing from both DB and AppWidgetHost. Then `onAppWidgetRemoved()` callback repetitively calls `deleteWidget()` trying to remove from DB and widget host again. - Separate the call to delete a widget from widget host and DB. Let CommunalAppWidgetHost manages deleting from DB for both uninstalled or user-selected widget, following the deletion from widget host. - In CommunalWidgetDAO#deleteWidgetById, added a null check on the entry that is queried. Returns false if no entry exists to be deleted. Bug: b/323057545 Test: atest CommunalWidgetRepositoryImplTest Test: atest CommunalWidgetDaoTest Test: atest CommunalEditModeViewModelTest Flag: ACONFIG com.android.systemui.communal_hub DEVELOPMENT Change-Id: I6a9b8f8605f22b08a447acf8d7747519fc6e3f81
Diffstat (limited to 'libs/hwui/FrameInfoVisualizer.cpp')
0 files changed, 0 insertions, 0 deletions