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

Commit f86c1914 authored by Martin Stjernholm's avatar Martin Stjernholm Committed by Automerger Merge Worker
Browse files

Merge "Skip legacy BackgroundDexOptService unit tests when ART Service is in...

Merge "Skip legacy BackgroundDexOptService unit tests when ART Service is in use." into udc-dev am: b234b657 am: 81812edb

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22163313



Change-Id: I2ee44fd7a9bf6850d61a3f32fd4bf19d3e02db89
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents cd6cb4ed 81812edb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1179,7 +1179,7 @@ public class Installer extends SystemService {
        // TODO(b/260124949): Remove the legacy dexopt code paths, i.e. this exception and all code
        // that may throw it.
        public LegacyDexoptDisabledException() {
            super("Invalid call to legacy dexopt installd method while ART Service is in use.");
            super("Invalid call to legacy dexopt method while ART Service is in use.");
        }
    }

+6 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ import android.content.IntentFilter;
import android.os.HandlerThread;
import android.os.PowerManager;
import android.os.Process;
import android.os.SystemProperties;
import android.util.Log;

import com.android.internal.util.IndentingPrintWriter;
@@ -56,6 +57,7 @@ import com.android.server.pm.dex.DexManager;
import com.android.server.pm.dex.DexoptOptions;

import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -126,6 +128,10 @@ public final class BackgroundDexOptServiceUnitTest {

    @Before
    public void setUp() throws Exception {
        // These tests are only applicable to the legacy BackgroundDexOptService and cannot be run
        // when ART Service is enabled.
        Assume.assumeFalse(SystemProperties.getBoolean("dalvik.vm.useartservice", false));

        when(mInjector.getCallingUid()).thenReturn(Process.FIRST_APPLICATION_UID);
        when(mInjector.getContext()).thenReturn(mContext);
        when(mInjector.getDexOptHelper()).thenReturn(mDexOptHelper);