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

Commit 67c4fb22 authored by Hall Liu's avatar Hall Liu Committed by Android (Google) Code Review
Browse files

Merge "Update tests to work with SystemConfigManager" into rvc-dev

parents 20399449 f1a88371
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ import android.os.Handler;
import android.os.IInterface;
import android.os.PersistableBundle;
import android.os.PowerWhitelistManager;
import android.os.SystemConfigManager;
import android.os.UserHandle;
import android.os.UserManager;
import android.preference.PreferenceManager;
@@ -257,6 +258,8 @@ public class ContextFixture implements TestFixture<Context> {
                    return mDownloadManager;
                case Context.TELEPHONY_REGISTRY_SERVICE:
                    return mTelephonyRegistryManager;
                case Context.SYSTEM_CONFIG_SERVICE:
                    return mSystemConfigManager;
                case Context.BATTERY_STATS_SERVICE:
                case Context.DISPLAY_SERVICE:
                case Context.POWER_SERVICE:
@@ -285,6 +288,8 @@ public class ContextFixture implements TestFixture<Context> {
                return Context.CONNECTIVITY_SERVICE;
            } else if (serviceClass == PowerWhitelistManager.class) {
                return Context.POWER_WHITELIST_MANAGER;
            } else if (serviceClass == SystemConfigManager.class) {
                return Context.SYSTEM_CONFIG_SERVICE;
            }
            return super.getSystemServiceName(serviceClass);
        }
@@ -619,6 +624,7 @@ public class ContextFixture implements TestFixture<Context> {
    private final PackageInfo mPackageInfo = mock(PackageInfo.class);
    private final TelephonyRegistryManager mTelephonyRegistryManager =
        mock(TelephonyRegistryManager.class);
    private final SystemConfigManager mSystemConfigManager = mock(SystemConfigManager.class);
    private final PowerWhitelistManager mPowerWhitelistManager = mock(PowerWhitelistManager.class);

    private final ContentProvider mContentProvider = spy(new FakeContentProvider());