Misc fixes for IA and pattern.
Disable NFC fragments when feature is not avaiable Link to spell checker screen with the pref is clicked Tint "add"/"delete" button in UserDictionary actionbar to proper color. Change-Id: I8a8e219ce3dbbafc6c4d5a0f34f835ffd0abad4f Fix: 34155679 Fix: 34161006 Fix: 34154795 Test: RunSettingsRoboTests
This commit is contained in:
@@ -15,11 +15,13 @@
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
android:viewportHeight="24.0"
|
||||
android:tint="?android:attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
|
||||
|
@@ -28,7 +28,8 @@
|
||||
<Preference
|
||||
android:key="spellcheckers_settings"
|
||||
android:title="@string/spellcheckers_settings_title"
|
||||
android:persistent="false"/>
|
||||
android:persistent="false"
|
||||
android:fragment="com.android.settings.inputmethod.SpellCheckersSettings"/>
|
||||
|
||||
<!-- User dictionary preference title and fragment will be set programmatically. -->
|
||||
<Preference
|
||||
|
@@ -974,6 +974,11 @@ public class SettingsActivity extends SettingsDrawerActivity
|
||||
pm.hasSystemFeature(PackageManager.FEATURE_NFC)
|
||||
&& pm.hasSystemFeature(PackageManager.FEATURE_NFC_HOST_CARD_EMULATION)
|
||||
&& adapter != null && adapter.isEnabled(), isAdmin);
|
||||
setTileEnabled(new ComponentName(packageName,
|
||||
"com.android.settings.PaymentSettingsDashboardAlias"),
|
||||
pm.hasSystemFeature(PackageManager.FEATURE_NFC)
|
||||
&& pm.hasSystemFeature(PackageManager.FEATURE_NFC_HOST_CARD_EMULATION)
|
||||
&& adapter != null && adapter.isEnabled(), isAdmin);
|
||||
|
||||
setTileEnabled(new ComponentName(packageName,
|
||||
Settings.PrintSettingsActivity.class.getName()),
|
||||
|
@@ -86,7 +86,7 @@ public class UserDictionaryAddWordFragment extends InstrumentedPreferenceFragmen
|
||||
@Override
|
||||
public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) {
|
||||
MenuItem actionItem = menu.add(0, OPTIONS_MENU_DELETE, 0, R.string.delete)
|
||||
.setIcon(android.R.drawable.ic_menu_delete);
|
||||
.setIcon(R.drawable.ic_delete);
|
||||
actionItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM |
|
||||
MenuItem.SHOW_AS_ACTION_WITH_TEXT);
|
||||
}
|
||||
|
@@ -31,8 +31,8 @@ import org.junit.runner.RunWith;
|
||||
import org.mockito.Answers;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
import org.robolectric.RuntimeEnvironment;
|
||||
import org.robolectric.annotation.Config;
|
||||
import org.robolectric.shadows.ShadowApplication;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static org.mockito.Mockito.mock;
|
||||
@@ -53,7 +53,7 @@ public class SpellCheckerPreferenceControllerTest {
|
||||
@Before
|
||||
public void setUp() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
mAppContext = ShadowApplication.getInstance().getApplicationContext();
|
||||
mAppContext = RuntimeEnvironment.application;
|
||||
when(mContext.getSystemService(Context.TEXT_SERVICES_MANAGER_SERVICE))
|
||||
.thenReturn(mTextServicesManager);
|
||||
mPreference = new Preference(mAppContext);
|
||||
@@ -76,7 +76,6 @@ public class SpellCheckerPreferenceControllerTest {
|
||||
when(mTextServicesManager.isSpellCheckerEnabled()).thenReturn(false);
|
||||
|
||||
mController.updateState(mPreference);
|
||||
|
||||
assertThat(mPreference.getSummary())
|
||||
.isEqualTo(mAppContext.getString(R.string.switch_off_text));
|
||||
}
|
||||
|
Reference in New Issue
Block a user