Use MainSwitchPreference to replace the button style switches.

Fix: 177967926
Fix: 177968295
Fix: 177967925
Fix: 177968078

Test: Run robotest and apply the widget in Settings and see the ui
Change-Id: Ie854de96e5495fa564fb8a097ed4547bbd2b10c5
This commit is contained in:
Stanley Wang
2021-01-29 01:17:43 +08:00
parent 70864998c4
commit 10b7a7d483
25 changed files with 307 additions and 513 deletions

View File

@@ -26,7 +26,7 @@ import android.content.Context;
import android.nfc.NfcAdapter;
import android.provider.Settings;
import androidx.preference.SwitchPreference;
import com.android.settingslib.widget.MainSwitchPreference;
import org.junit.Before;
import org.junit.Test;
@@ -40,7 +40,7 @@ import org.robolectric.RuntimeEnvironment;
public class NfcEnablerTest {
@Mock
private SwitchPreference mNfcPreference;
private MainSwitchPreference mNfcPreference;
private Context mContext;
private NfcEnabler mNfcEnabler;