Crash on device controls availability
Post the incoming event to the view's handler to avoid crashing when attempting to update the on the wrong thread. Fixes: 196008691 Test: manual (cannot repro locally but would most likely happen after reboot) Change-Id: I3777d5a43e0ff3a56910124a93670eef1b027fe0
This commit is contained in:
@@ -203,13 +203,15 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
|
||||
private ControlsListingController.ControlsListingCallback mListingCallback =
|
||||
new ControlsListingController.ControlsListingCallback() {
|
||||
public void onServicesUpdated(List<ControlsServiceInfo> serviceInfos) {
|
||||
boolean available = !serviceInfos.isEmpty();
|
||||
post(() -> {
|
||||
boolean available = !serviceInfos.isEmpty();
|
||||
|
||||
if (available != mControlServicesAvailable) {
|
||||
mControlServicesAvailable = available;
|
||||
updateControlsVisibility();
|
||||
updateAffordanceColors();
|
||||
}
|
||||
if (available != mControlServicesAvailable) {
|
||||
mControlServicesAvailable = available;
|
||||
updateControlsVisibility();
|
||||
updateAffordanceColors();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user