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

Commit 9c4e2d67 authored by Stanley Wang's avatar Stanley Wang
Browse files

Fix top level "Gestures" not appearing in search result

If the availability status equals AVAILABLE_UNSEARCHABLE,
the preference won't appear in the serch result so we change
the status to AVAILABLE.

Change-Id: Id3ab28c4974f42be9b06a58d9c0d284f23ef160f
Fixes: 117951603
Test: manual and robotests
parent 0173c5f5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ public class GesturesSettingPreferenceController extends BasePreferenceControlle
        for (AbstractPreferenceController controller : mGestureControllers) {
            isAvailable = isAvailable || controller.isAvailable();
        }
        return isAvailable ? AVAILABLE_UNSEARCHABLE : UNSUPPORTED_ON_DEVICE;
        return isAvailable ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
    }

    /**
+3 −1
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.settings.gestures;

import static com.android.settings.core.BasePreferenceController.AVAILABLE;

import static com.google.common.truth.Truth.assertThat;

import static org.mockito.Matchers.any;
@@ -81,7 +83,7 @@ public class GesturesSettingsPreferenceControllerTest {
        });
        ReflectionHelpers.setField(mController, "mGestureControllers", mControllers);

        assertThat(mController.isAvailable()).isTrue();
        assertThat(mController.getAvailabilityStatus()).isEqualTo(AVAILABLE);
    }

    @Test