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

Commit c2694e1f authored by Haijie Hong's avatar Haijie Hong
Browse files

Fix scrolling to wrong position issue in Bluetooth Device Details page

Bug: 294355795
Test: tested locally
Change-Id: Ic80fb7974cf30adb3112aeb826c2b5bcb0067afc
parent 41fab98b
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -203,6 +203,16 @@ public class BluetoothDeviceDetailsFragment extends RestrictedDashboardFragment
        slicePreferenceController.setSliceUri(sliceEnabled ? controlUri : null);
        slicePreferenceController.onStart();
        slicePreferenceController.displayPreference(getPreferenceScreen());

        // Temporarily fix the issue that the page will be automatically scrolled to a wrong
        // position when entering the page. This will make sure the bluetooth header is shown on top
        // of the page.
        use(LeAudioBluetoothDetailsHeaderController.class).displayPreference(
                getPreferenceScreen());
        use(AdvancedBluetoothDetailsHeaderController.class).displayPreference(
                getPreferenceScreen());
        use(BluetoothDetailsHeaderController.class).displayPreference(
                getPreferenceScreen());
    }

    private final ViewTreeObserver.OnGlobalLayoutListener mOnGlobalLayoutListener =