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

Commit 7fb5d0b1 authored by Stanley Wang's avatar Stanley Wang Committed by Automerger Merge Worker
Browse files

Merge "Switch control should not be activated after event happens off of the...

Merge "Switch control should not be activated after event happens off of the target region." into sc-dev am: 3f0812ea am: 969aa83d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14809881

Change-Id: I2580a855ea91b4e74a4888bb349627cd1ac46cb5
parents edb6f918 969aa83d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -58,6 +58,8 @@
            android:layout_width="wrap_content"
            android:layout_height="48dp"
            android:layout_gravity="center_vertical"
            android:focusable="false"
            android:clickable="false"
            android:track="@drawable/settingslib_track_selector"
            android:thumb="@drawable/settingslib_thumb_selector"
            android:theme="@style/MainSwitch.Settingslib"/>
+8 −0
Original line number Diff line number Diff line
@@ -75,6 +75,14 @@ public class MainSwitchBarTest {
        assertThat(switchObj).isNotNull();
    }

    @Test
    public void getSwitch_shouldNotFocusableAndClickable() {
        final Switch switchObj = mBar.getSwitch();

        assertThat(switchObj.isFocusable()).isFalse();
        assertThat(switchObj.isClickable()).isFalse();
    }

    @Test
    public void show_shouldVisible() {
        mBar.show();