Revert "Add configuration for defaulting notification behavior" am: a2d06273c1
am: 48eae58586
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20505171 Change-Id: I0e2693f89594f6c473c5c2e9dbb6a34ea6bf5864 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -21,7 +21,6 @@ import android.widget.RadioButton;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.RestrictedRadioButton;
|
||||
import com.android.settings.notification.RedactionInterstitial.RedactionInterstitialFragment;
|
||||
import com.android.settings.testutils.shadow.SettingsShadowResources;
|
||||
import com.android.settings.testutils.shadow.ShadowRestrictedLockUtilsInternal;
|
||||
import com.android.settings.testutils.shadow.ShadowUtils;
|
||||
|
||||
@@ -39,7 +38,6 @@ import org.robolectric.shadows.ShadowUserManager;
|
||||
@Config(shadows = {
|
||||
ShadowUtils.class,
|
||||
ShadowRestrictedLockUtilsInternal.class,
|
||||
SettingsShadowResources.class,
|
||||
})
|
||||
public class RedactionInterstitialTest {
|
||||
private RedactionInterstitial mActivity;
|
||||
@@ -136,28 +134,6 @@ public class RedactionInterstitialTest {
|
||||
assertSelectedButton(R.id.redact_sensitive);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void defaultShowSensitiveContent_configDeny() {
|
||||
final ContentResolver resolver = RuntimeEnvironment.application.getContentResolver();
|
||||
Settings.Secure.putIntForUser(resolver,
|
||||
LOCK_SCREEN_SHOW_NOTIFICATIONS, 1, UserHandle.myUserId());
|
||||
setupConfig(false);
|
||||
setupActivity();
|
||||
|
||||
assertSelectedButton(R.id.redact_sensitive);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void defaultShowSensitiveContent_configAllow() {
|
||||
final ContentResolver resolver = RuntimeEnvironment.application.getContentResolver();
|
||||
Settings.Secure.putIntForUser(resolver,
|
||||
LOCK_SCREEN_SHOW_NOTIFICATIONS, 1, UserHandle.myUserId());
|
||||
setupConfig(true);
|
||||
setupActivity();
|
||||
|
||||
assertSelectedButton(R.id.show_all);
|
||||
}
|
||||
|
||||
private void setupActivity() {
|
||||
mActivity = buildActivity(RedactionInterstitial.class, new Intent()).setup().get();
|
||||
mFragment = (RedactionInterstitialFragment)
|
||||
@@ -166,11 +142,6 @@ public class RedactionInterstitialTest {
|
||||
assertThat(mFragment).isNotNull();
|
||||
}
|
||||
|
||||
private void setupConfig(boolean allowSensitiveContent) {
|
||||
SettingsShadowResources.overrideResource(
|
||||
R.bool.default_allow_sensitive_lockscreen_content, allowSensitiveContent);
|
||||
}
|
||||
|
||||
private void setupSettings(int show, int showUnredacted) {
|
||||
final ContentResolver resolver = RuntimeEnvironment.application.getContentResolver();
|
||||
Settings.Secure.putIntForUser(resolver,
|
||||
|
Reference in New Issue
Block a user