From 1e2e6140cf39670778a3a894f3bd0e909edd841a Mon Sep 17 00:00:00 2001 From: cosmohsieh Date: Fri, 11 Jan 2019 10:02:24 +0800 Subject: [PATCH 1/9] Change intent filter string of NetworkRequestDialogActivity Bug: 117399926 Test: atest NetworkRequestDialogActivityTest Change-Id: I204b528e4b920c052fbd6626caf2f36e7d80914e --- AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 213e5a4b191..e57705e1f99 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -2595,7 +2595,7 @@ android:exported="true" android:permission="android.permission.NETWORK_SETTINGS"> - + From 9a7786b3e11f626c08c99691dd0cb718de4267da Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Mon, 10 Dec 2018 18:14:48 +0000 Subject: [PATCH 2/9] Move Settings app to /product Since this app is frequently customized by OEMs, it doesn't fit in the mainline /system image right now. Move it to /product. Bug: 110072687 Test: make Change-Id: Iee5940125af3f2a8543ecb3a68d7fba737acd77d Merged-In: Iee5940125af3f2a8543ecb3a68d7fba737acd77d (cherry picked from commit f109282c8ea955bfc72a025c7068930c67c38681) --- Android.mk | 1 + CleanSpec.mk | 1 + 2 files changed, 2 insertions(+) diff --git a/Android.mk b/Android.mk index b54b376f92a..02b9adcaa5a 100644 --- a/Android.mk +++ b/Android.mk @@ -14,6 +14,7 @@ include $(CLEAR_VARS) LOCAL_PACKAGE_NAME := Settings LOCAL_PRIVATE_PLATFORM_APIS := true LOCAL_CERTIFICATE := platform +LOCAL_PRODUCT_MODULE := true LOCAL_PRIVILEGED_MODULE := true LOCAL_MODULE_TAGS := optional LOCAL_USE_AAPT2 := true diff --git a/CleanSpec.mk b/CleanSpec.mk index 6ead46ebd24..93445f949d0 100644 --- a/CleanSpec.mk +++ b/CleanSpec.mk @@ -46,6 +46,7 @@ $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/Settings_intermediates) $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/Settings_intermediates) +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/Settings) # ************************************************ # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST From 35209f6e6ce0f68bad4f845a1cf1277e8fe0ac1b Mon Sep 17 00:00:00 2001 From: jackqdyulei Date: Thu, 10 Jan 2019 14:15:59 -0800 Subject: [PATCH 3/9] Update height of SliceView So it can display 6 items at most, not 4 items Bug: 120803703 Test: Manual Change-Id: Id34398903d0f81bebee3e02c024d21ad2e68578f --- res/layout/slice_preference_layout.xml | 2 +- res/values/dimens.xml | 2 ++ src/com/android/settings/slices/SlicePreference.java | 1 + src/com/android/settings/slices/SlicePreferenceController.java | 1 - 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/res/layout/slice_preference_layout.xml b/res/layout/slice_preference_layout.xml index 4cea9c04678..ae589014dd9 100644 --- a/res/layout/slice_preference_layout.xml +++ b/res/layout/slice_preference_layout.xml @@ -25,5 +25,5 @@ + android:layout_height="@dimen/slice_preference_group_height"/> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 1a3d6ffae1a..8b535e3f321 100755 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -370,4 +370,6 @@ 264dp 360dp + + 360dp diff --git a/src/com/android/settings/slices/SlicePreference.java b/src/com/android/settings/slices/SlicePreference.java index 37a53f4d581..a88ae768db6 100644 --- a/src/com/android/settings/slices/SlicePreference.java +++ b/src/com/android/settings/slices/SlicePreference.java @@ -44,6 +44,7 @@ public class SlicePreference extends LayoutPreference { private void init() { mSliceView = findViewById(R.id.slice_view); mSliceView.showTitleItems(true); + mSliceView.setScrollable(false); } public void onSliceUpdated(Slice slice) { diff --git a/src/com/android/settings/slices/SlicePreferenceController.java b/src/com/android/settings/slices/SlicePreferenceController.java index 93ba6520f3e..d7fcc18a832 100644 --- a/src/com/android/settings/slices/SlicePreferenceController.java +++ b/src/com/android/settings/slices/SlicePreferenceController.java @@ -50,7 +50,6 @@ public class SlicePreferenceController extends BasePreferenceController implemen @Override public void displayPreference(PreferenceScreen screen) { super.displayPreference(screen); - mSlicePreference = screen.findPreference(getPreferenceKey()); } From d64901494fb4bd2f195d8c6da7258f107207eebf Mon Sep 17 00:00:00 2001 From: Fan Zhang Date: Fri, 11 Jan 2019 13:10:28 -0800 Subject: [PATCH 4/9] Add live caption preference in accessibility page. Change-Id: Idd9725ddbbcf658325b1f04b07a0ed9cfa6c2682 Fixes: 121373754 Test: robotests --- res/values/strings.xml | 6 ++ res/xml/accessibility_settings.xml | 6 ++ .../accessibility/AccessibilitySettings.java | 19 ++++-- .../LiveCaptionPreferenceController.java | 58 ++++++++++++++++ .../LiveCaptionPreferenceControllerTest.java | 66 +++++++++++++++++++ 5 files changed, 151 insertions(+), 4 deletions(-) create mode 100644 src/com/android/settings/accessibility/LiveCaptionPreferenceController.java create mode 100644 tests/robotests/src/com/android/settings/accessibility/LiveCaptionPreferenceControllerTest.java diff --git a/res/values/strings.xml b/res/values/strings.xml index 9f5b562c2be..ea3979f3175 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -7355,6 +7355,12 @@ Turn off now + + Live Caption + + + Auto-convert on-device audio to captions + Do Not Disturb is on until %s diff --git a/res/xml/accessibility_settings.xml b/res/xml/accessibility_settings.xml index cc07ce119e9..b3e1704967c 100644 --- a/res/xml/accessibility_settings.xml +++ b/res/xml/accessibility_settings.xml @@ -124,6 +124,12 @@ android:key="audio_and_captions_category" android:title="@string/audio_and_captions_category_title"> + + resolved = + mPackageManager.queryIntentActivities(LIVE_CAPTION_INTENT, 0 /* flags */); + return resolved != null && !resolved.isEmpty() + ? AVAILABLE + : UNSUPPORTED_ON_DEVICE; + } + + @Override + public void updateState(Preference preference) { + super.updateState(preference); + preference.setIntent(LIVE_CAPTION_INTENT); + } +} diff --git a/tests/robotests/src/com/android/settings/accessibility/LiveCaptionPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accessibility/LiveCaptionPreferenceControllerTest.java new file mode 100644 index 00000000000..f6160b285cb --- /dev/null +++ b/tests/robotests/src/com/android/settings/accessibility/LiveCaptionPreferenceControllerTest.java @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.settings.accessibility; + +import static com.android.settings.core.BasePreferenceController.AVAILABLE; +import static com.android.settings.core.BasePreferenceController.UNSUPPORTED_ON_DEVICE; + +import static com.google.common.truth.Truth.assertThat; + +import android.content.pm.ResolveInfo; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.robolectric.RobolectricTestRunner; +import org.robolectric.RuntimeEnvironment; +import org.robolectric.Shadows; +import org.robolectric.shadows.ShadowPackageManager; + +import java.util.Collections; + +@RunWith(RobolectricTestRunner.class) +public class LiveCaptionPreferenceControllerTest { + + private LiveCaptionPreferenceController mController; + + @Before + public void setUp() { + mController = new LiveCaptionPreferenceController(RuntimeEnvironment.application, + "test_key"); + } + + @Test + public void getAvailabilityStatus_canResolveIntent_shouldReturnAvailable() { + final ShadowPackageManager pm = Shadows.shadowOf( + RuntimeEnvironment.application.getPackageManager()); + pm.addResolveInfoForIntent(LiveCaptionPreferenceController.LIVE_CAPTION_INTENT, + new ResolveInfo()); + + assertThat(mController.getAvailabilityStatus()).isEqualTo(AVAILABLE); + } + + @Test + public void getAvailabilityStatus_noResolveIntent_shouldReturnUnavailable() { + final ShadowPackageManager pm = Shadows.shadowOf( + RuntimeEnvironment.application.getPackageManager()); + pm.setResolveInfosForIntent(LiveCaptionPreferenceController.LIVE_CAPTION_INTENT, + Collections.emptyList()); + + assertThat(mController.getAvailabilityStatus()).isEqualTo(UNSUPPORTED_ON_DEVICE); + } +} From 09064cf6d984e7b2186e86643ac3b3a102a416ac Mon Sep 17 00:00:00 2001 From: Anton Hansson Date: Mon, 10 Dec 2018 17:03:29 +0000 Subject: [PATCH 5/9] Make the Settings permission a required module This will include the Settings permission file whenever the Settings app is installed. Bug: 110072687 Test: make Exempt-From-Owner-Approval: cp from internal Change-Id: Ia2548355282498bceeffddb564de32a6cb857c66 Merged-In: Ia2548355282498bceeffddb564de32a6cb857c66 (cherry picked from commit 16322a027142db6eaae885dea06b825382bb76b8) --- Android.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/Android.mk b/Android.mk index 02b9adcaa5a..3be56c3aa0e 100644 --- a/Android.mk +++ b/Android.mk @@ -16,6 +16,7 @@ LOCAL_PRIVATE_PLATFORM_APIS := true LOCAL_CERTIFICATE := platform LOCAL_PRODUCT_MODULE := true LOCAL_PRIVILEGED_MODULE := true +LOCAL_REQUIRED_MODULES := privapp_whitelist_com.android.settings LOCAL_MODULE_TAGS := optional LOCAL_USE_AAPT2 := true From bd81bb0e343028c50b4ea9e934a1fc7c7b9109f9 Mon Sep 17 00:00:00 2001 From: Beverly Date: Mon, 14 Jan 2019 13:01:00 -0500 Subject: [PATCH 6/9] Increase char count on Charging sounds string Test: manual Change-Id: I5c4bedd6cf4f8ed85ae7df8ab78baf0ae3937dd5 Fixes: 122743016 --- res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 7e628e61974..2cc1d49573d 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -7127,7 +7127,7 @@ Screen locking sounds - + Charging sounds and vibration From e88f7ab7a7526d089289a6939fc6cf1e6aa45be5 Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Mon, 14 Jan 2019 09:06:44 -0500 Subject: [PATCH 7/9] Update appearance of channel preferences Test: atest Change-Id: Ie58e7a27601ee23b1cd2caf990cc5c10006c0162 Fixes: 122671854 --- .../ChannelSummaryPreference.java | 115 ++++++++++++ .../NotificationSettingsBase.java | 3 +- .../ChannelSummaryPreferenceTest.java | 169 ++++++++++++++++++ 3 files changed, 285 insertions(+), 2 deletions(-) create mode 100644 src/com/android/settings/notification/ChannelSummaryPreference.java create mode 100644 tests/robotests/src/com/android/settings/notification/ChannelSummaryPreferenceTest.java diff --git a/src/com/android/settings/notification/ChannelSummaryPreference.java b/src/com/android/settings/notification/ChannelSummaryPreference.java new file mode 100644 index 00000000000..c716038f60f --- /dev/null +++ b/src/com/android/settings/notification/ChannelSummaryPreference.java @@ -0,0 +1,115 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.settings.notification; + +import android.content.Context; +import android.content.Intent; +import android.view.View; +import android.widget.CheckBox; + +import com.android.settings.R; +import com.android.settingslib.TwoTargetPreference; + +import androidx.preference.PreferenceViewHolder; + +/** + * A custom preference that provides inline checkbox and tappable target. + */ +public class ChannelSummaryPreference extends TwoTargetPreference { + + private Context mContext; + private Intent mIntent; + private CheckBox mCheckBox; + private boolean mChecked; + private boolean mEnableCheckBox = true; + + public ChannelSummaryPreference(Context context) { + super(context); + setLayoutResource(R.layout.preference_checkable_two_target); + mContext = context; + setWidgetLayoutResource(R.layout.zen_rule_widget); + } + + @Override + public void onBindViewHolder(PreferenceViewHolder view) { + super.onBindViewHolder(view); + View settingsWidget = view.findViewById(android.R.id.widget_frame); + View divider = view.findViewById(R.id.two_target_divider); + if (mIntent != null) { + divider.setVisibility(View.VISIBLE); + settingsWidget.setVisibility(View.VISIBLE); + settingsWidget.setOnClickListener(v -> mContext.startActivity(mIntent)); + } else { + divider.setVisibility(View.GONE); + settingsWidget.setVisibility(View.GONE); + settingsWidget.setOnClickListener(null); + } + + View checkboxContainer = view.findViewById(R.id.checkbox_container); + if (checkboxContainer != null) { + checkboxContainer.setOnClickListener(mOnCheckBoxClickListener); + } + mCheckBox = (CheckBox) view.findViewById(com.android.internal.R.id.checkbox); + if (mCheckBox != null) { + mCheckBox.setChecked(mChecked); + mCheckBox.setEnabled(mEnableCheckBox); + } + } + + public boolean isChecked() { + return mChecked; + } + + @Override + public void setIntent(Intent intent) { + mIntent = intent; + } + + @Override + public void onClick() { + mOnCheckBoxClickListener.onClick(null); + } + + public void setChecked(boolean checked) { + mChecked = checked; + if (mCheckBox != null) { + mCheckBox.setChecked(checked); + } + } + + public void setCheckBoxEnabled(boolean enabled) { + mEnableCheckBox = enabled; + if (mCheckBox != null) { + mCheckBox.setEnabled(enabled); + } + } + + private View.OnClickListener mOnCheckBoxClickListener = new View.OnClickListener() { + @Override + public void onClick(View v) { + if (mCheckBox != null && !mCheckBox.isEnabled()) { + return; + } + setChecked(!mChecked); + if (!callChangeListener(mChecked)) { + setChecked(!mChecked); + } else { + persistBoolean(mChecked); + } + } + }; +} diff --git a/src/com/android/settings/notification/NotificationSettingsBase.java b/src/com/android/settings/notification/NotificationSettingsBase.java index ed0b1235ef4..7053bb341e2 100644 --- a/src/com/android/settings/notification/NotificationSettingsBase.java +++ b/src/com/android/settings/notification/NotificationSettingsBase.java @@ -273,8 +273,7 @@ abstract public class NotificationSettingsBase extends DashboardFragment { protected Preference populateSingleChannelPrefs(PreferenceGroup parent, final NotificationChannel channel, final boolean groupBlocked) { - MasterCheckBoxPreference channelPref = new MasterCheckBoxPreference( - getPrefContext()); + ChannelSummaryPreference channelPref = new ChannelSummaryPreference(getPrefContext()); channelPref.setCheckBoxEnabled(mSuspendedAppsAdmin == null && isChannelBlockable(channel) && isChannelConfigurable(channel) diff --git a/tests/robotests/src/com/android/settings/notification/ChannelSummaryPreferenceTest.java b/tests/robotests/src/com/android/settings/notification/ChannelSummaryPreferenceTest.java new file mode 100644 index 00000000000..408b2b66f25 --- /dev/null +++ b/tests/robotests/src/com/android/settings/notification/ChannelSummaryPreferenceTest.java @@ -0,0 +1,169 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.settings.notification; + +import static com.google.common.truth.Truth.assertThat; + +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; + +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.CheckBox; +import android.widget.LinearLayout; + +import com.android.settings.R; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.robolectric.RobolectricTestRunner; +import org.robolectric.RuntimeEnvironment; + +import androidx.preference.Preference; +import androidx.preference.PreferenceViewHolder; + +@RunWith(RobolectricTestRunner.class) +public class ChannelSummaryPreferenceTest { + + private Context mContext; + + @Before + public void setUp() { + mContext = RuntimeEnvironment.application; + } + + @Test + public void createNewPreference_shouldSetLayout() { + final ChannelSummaryPreference preference = new ChannelSummaryPreference(mContext); + assertThat(preference.getLayoutResource()).isEqualTo( + R.layout.preference_checkable_two_target); + assertThat(preference.getWidgetLayoutResource()).isEqualTo( + R.layout.zen_rule_widget); + } + + @Test + public void setChecked_shouldUpdateButtonCheckedState() { + final ChannelSummaryPreference preference = new ChannelSummaryPreference(mContext); + final LayoutInflater inflater = LayoutInflater.from(mContext); + final PreferenceViewHolder holder = PreferenceViewHolder.createInstanceForTests( + inflater.inflate(R.layout.preference_checkable_two_target, null)); + final LinearLayout widgetView = holder.itemView.findViewById(R.id.checkbox_container); + inflater.inflate(R.layout.preference_widget_checkbox, widgetView, true); + final CheckBox toggle = (CheckBox) holder.findViewById(com.android.internal.R.id.checkbox); + preference.onBindViewHolder(holder); + + preference.setChecked(true); + assertThat(toggle.isChecked()).isTrue(); + + preference.setChecked(false); + assertThat(toggle.isChecked()).isFalse(); + } + + @Test + public void setCheckboxEnabled_shouldUpdateButtonEnabledState() { + final ChannelSummaryPreference preference = new ChannelSummaryPreference(mContext); + final LayoutInflater inflater = LayoutInflater.from(mContext); + final PreferenceViewHolder holder = PreferenceViewHolder.createInstanceForTests( + inflater.inflate(R.layout.preference_checkable_two_target, null)); + final LinearLayout widgetView = holder.itemView.findViewById(R.id.checkbox_container); + inflater.inflate(R.layout.preference_widget_checkbox, widgetView, true); + final CheckBox toggle = (CheckBox) holder.findViewById(com.android.internal.R.id.checkbox); + preference.onBindViewHolder(holder); + + preference.setCheckBoxEnabled(true); + assertThat(toggle.isEnabled()).isTrue(); + + preference.setCheckBoxEnabled(false); + assertThat(toggle.isEnabled()).isFalse(); + } + + @Test + public void setCheckBoxEnabled_shouldUpdateButtonEnabledState_beforeViewBound() { + final ChannelSummaryPreference preference = new ChannelSummaryPreference(mContext); + final LayoutInflater inflater = LayoutInflater.from(mContext); + final PreferenceViewHolder holder = PreferenceViewHolder.createInstanceForTests( + inflater.inflate(R.layout.preference_checkable_two_target, null)); + final LinearLayout widgetView = holder.itemView.findViewById(R.id.checkbox_container); + inflater.inflate(R.layout.preference_widget_checkbox, widgetView, true); + final CheckBox toggle = (CheckBox) holder.findViewById(com.android.internal.R.id.checkbox); + + preference.setCheckBoxEnabled(false); + preference.onBindViewHolder(holder); + assertThat(toggle.isEnabled()).isFalse(); + } + + @Test + public void clickWidgetView_shouldToggleButton() { + final ChannelSummaryPreference preference = new ChannelSummaryPreference(mContext); + final LayoutInflater inflater = LayoutInflater.from(mContext); + final PreferenceViewHolder holder = PreferenceViewHolder.createInstanceForTests( + inflater.inflate(R.layout.preference_checkable_two_target, null)); + final LinearLayout widgetView = holder.itemView.findViewById(R.id.checkbox_container); + assertThat(widgetView).isNotNull(); + + inflater.inflate(R.layout.preference_widget_checkbox, widgetView, true); + final CheckBox toggle = (CheckBox) holder.findViewById(com.android.internal.R.id.checkbox); + preference.onBindViewHolder(holder); + + widgetView.performClick(); + assertThat(toggle.isChecked()).isTrue(); + + widgetView.performClick(); + assertThat(toggle.isChecked()).isFalse(); + } + + @Test + public void clickWidgetView_shouldNotToggleButtonIfDisabled() { + final ChannelSummaryPreference preference = new ChannelSummaryPreference(mContext); + final LayoutInflater inflater = LayoutInflater.from(mContext); + final PreferenceViewHolder holder = PreferenceViewHolder.createInstanceForTests( + inflater.inflate(R.layout.preference_checkable_two_target, null)); + final LinearLayout widgetView = holder.itemView.findViewById(R.id.checkbox_container); + assertThat(widgetView).isNotNull(); + + inflater.inflate(R.layout.preference_widget_checkbox, widgetView, true); + final CheckBox toggle = (CheckBox) holder.findViewById(com.android.internal.R.id.checkbox); + preference.onBindViewHolder(holder); + toggle.setEnabled(false); + + widgetView.performClick(); + assertThat(toggle.isChecked()).isFalse(); + } + + @Test + public void clickWidgetView_shouldNotifyPreferenceChanged() { + final ChannelSummaryPreference preference = new ChannelSummaryPreference(mContext); + final PreferenceViewHolder holder = PreferenceViewHolder.createInstanceForTests( + LayoutInflater.from(mContext).inflate( + R.layout.preference_checkable_two_target, null)); + final View widgetView = holder.findViewById(R.id.checkbox_container); + final Preference.OnPreferenceChangeListener + listener = mock(Preference.OnPreferenceChangeListener.class); + preference.setOnPreferenceChangeListener(listener); + preference.onBindViewHolder(holder); + + preference.setChecked(false); + widgetView.performClick(); + verify(listener).onPreferenceChange(preference, true); + + preference.setChecked(true); + widgetView.performClick(); + verify(listener).onPreferenceChange(preference, false); + } +} From 69cc84d22c296c93eb0b7f3058c3139c1c016d8d Mon Sep 17 00:00:00 2001 From: Fan Zhang Date: Mon, 14 Jan 2019 11:50:24 -0800 Subject: [PATCH 8/9] Disable failing test to unblock presubmit Bug: 122824614 Test: rerun robotest Change-Id: I90fa864906675c6d072d25b27b6a61f59933d324 --- .../appinfo/DefaultSmsShortcutPreferenceControllerTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/robotests/src/com/android/settings/applications/appinfo/DefaultSmsShortcutPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/applications/appinfo/DefaultSmsShortcutPreferenceControllerTest.java index 93582bf8776..2723e3aaf63 100644 --- a/tests/robotests/src/com/android/settings/applications/appinfo/DefaultSmsShortcutPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/applications/appinfo/DefaultSmsShortcutPreferenceControllerTest.java @@ -27,6 +27,7 @@ import android.content.pm.PackageManager; import com.android.settings.applications.defaultapps.DefaultSmsPreferenceController; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -77,6 +78,7 @@ public class DefaultSmsShortcutPreferenceControllerTest { } @Test + @Ignore("b/122824614") public void isDefaultApp_notDefaultSms_shouldReturnFalse() { assertThat(mController.isDefaultApp()).isFalse(); } From 966d842be09c30ead8b49439ac44f55488871c5e Mon Sep 17 00:00:00 2001 From: Fan Zhang Date: Mon, 14 Jan 2019 19:56:24 +0000 Subject: [PATCH 9/9] Revert "Disable failing test to unblock presubmit" This reverts commit 69cc84d22c296c93eb0b7f3058c3139c1c016d8d. Bug: 122824614 Test: robotests Reason for revert: b/122824614 Change-Id: I5730b6c0a5e6d26fd54a8a1eff8d1eab3144a8ee --- .../appinfo/DefaultSmsShortcutPreferenceControllerTest.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/robotests/src/com/android/settings/applications/appinfo/DefaultSmsShortcutPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/applications/appinfo/DefaultSmsShortcutPreferenceControllerTest.java index 2723e3aaf63..93582bf8776 100644 --- a/tests/robotests/src/com/android/settings/applications/appinfo/DefaultSmsShortcutPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/applications/appinfo/DefaultSmsShortcutPreferenceControllerTest.java @@ -27,7 +27,6 @@ import android.content.pm.PackageManager; import com.android.settings.applications.defaultapps.DefaultSmsPreferenceController; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -78,7 +77,6 @@ public class DefaultSmsShortcutPreferenceControllerTest { } @Test - @Ignore("b/122824614") public void isDefaultApp_notDefaultSms_shouldReturnFalse() { assertThat(mController.isDefaultApp()).isFalse(); }