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

Commit c1e8c3ca authored by Nicholas Sauer's avatar Nicholas Sauer
Browse files

Fix SettingsProviderTest.

bug: 119814205
Test: atest -s emulator-5554 frameworks/base/packages/SettingsProvider/test
Change-Id: Ifa57074f492e81897866ddfb4a4bf86d44b2ad74
parent 490db5dd
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -32,9 +32,11 @@ import android.os.SystemClock;
import android.os.UserHandle;
import android.provider.Settings;
import android.util.Log;
import java.util.concurrent.atomic.AtomicBoolean;

import org.junit.Test;

import java.util.concurrent.atomic.AtomicBoolean;

/**
 * Tests for the SettingContentProvider.
 *
@@ -258,7 +260,7 @@ public class SettingsProviderTest extends BaseSettingsProviderTest {
                    FAKE_SETTING_VALUE, false);

            // Reset the changes made by the "shell/root" package
            resetToDefaultsViaShell(type, "shell");
            resetToDefaultsViaShell(type, "com.android.shell");
            resetToDefaultsViaShell(type, "root");

            // Make sure the old APIs don't set defaults
@@ -272,7 +274,7 @@ public class SettingsProviderTest extends BaseSettingsProviderTest {
                    FAKE_SETTING_VALUE_2, false);

            // Reset the changes made by this package
            resetToDefaultsViaShell(type, "shell");
            resetToDefaultsViaShell(type, "com.android.shell");
            resetToDefaultsViaShell(type, "root");

            // Make sure the old APIs don't set defaults
@@ -313,7 +315,7 @@ public class SettingsProviderTest extends BaseSettingsProviderTest {
                    FAKE_SETTING_VALUE_2, "TOKEN2", false);

            // Reset settings associated with TOKEN1
            resetToDefaultsViaShell(type, "shell", "TOKEN1");
            resetToDefaultsViaShell(type, "com.android.shell", "TOKEN1");
            resetToDefaultsViaShell(type, "root", "TOKEN1");

            // Make sure TOKEN1 settings are reset
@@ -325,7 +327,7 @@ public class SettingsProviderTest extends BaseSettingsProviderTest {
                    FAKE_SETTING_NAME_1));

            // Reset settings associated with TOKEN2
            resetToDefaultsViaShell(type, "shell", "TOKEN2");
            resetToDefaultsViaShell(type, "com.android.shell", "TOKEN2");
            resetToDefaultsViaShell(type, "root", "TOKEN2");

            // Make sure TOKEN2 settings are reset