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

Commit a2d87d81 authored by Brad Stenning's avatar Brad Stenning
Browse files

Moving the device provisioned callback to the correct thread.

Test: manual

Bug: 116479940
Change-Id: I4cfdfac7d949ac177b7bc9da066e7497506c971c
(cherry picked from commit 2f6f9984aba0516f3a665d8ad98c79168e05a1b6)
parent 9de1f4e9
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -114,12 +114,19 @@ public class CarStatusBar extends StatusBar implements
                    new DeviceProvisionedController.DeviceProvisionedListener() {
                        @Override
                        public void onDeviceProvisionedChanged() {
                            mDeviceIsProvisioned =
                            mHandler.post(() -> {
                                // on initial boot we are getting a call even though the value
                                // is the same so we are confirming the reset is needed
                                boolean deviceProvisioned =
                                        mDeviceProvisionedController.isDeviceProvisioned();
                                if (mDeviceIsProvisioned != deviceProvisioned) {
                                    mDeviceIsProvisioned = deviceProvisioned;
                                    restartNavBars();
                                }
                            });
                        }
                    });
        }

        // Register a listener for driving state changes.
        mDrivingStateHelper = new DrivingStateHelper(mContext, this::onDrivingStateChanged);