summaryrefslogtreecommitdiff
path: root/ravenwood/junit-impl-src
diff options
context:
space:
mode:
author Makoto Onuki <omakoto@google.com> 2024-11-13 22:16:28 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-11-13 22:16:28 +0000
commitfcf54a4241049de34db60c8d4e90e5f3a5e9dd0b (patch)
tree6f42c5528867357e6ae5f9801bc5f826fe717b98 /ravenwood/junit-impl-src
parent7261855ac79a5ff177face7c02a161440a4f620b (diff)
Revert "Compat-framework on ravenwood"
This reverts commit 7261855ac79a5ff177face7c02a161440a4f620b. Reason for revert: b/378945472 Change-Id: Id22aeb4d95f129ab59b338fabc551e78938effc9
Diffstat (limited to 'ravenwood/junit-impl-src')
-rw-r--r--ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java32
-rw-r--r--ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodSystemServer.java12
2 files changed, 0 insertions, 44 deletions
diff --git a/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java b/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java
index 678a97be60a2..c5a9c7b28ad3 100644
--- a/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java
+++ b/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java
@@ -30,12 +30,9 @@ import static org.mockito.Mockito.mock;
import android.annotation.Nullable;
import android.app.ActivityManager;
-import android.app.AppCompatCallbacks;
import android.app.Instrumentation;
import android.app.ResourcesManager;
import android.app.UiAutomation;
-import android.content.Context;
-import android.content.pm.ApplicationInfo;
import android.content.res.Resources;
import android.os.Binder;
import android.os.Build;
@@ -44,7 +41,6 @@ import android.os.HandlerThread;
import android.os.Looper;
import android.os.Process_ravenwood;
import android.os.ServiceManager;
-import android.os.ServiceManager.ServiceNotFoundException;
import android.os.SystemProperties;
import android.provider.DeviceConfig_host;
import android.system.ErrnoException;
@@ -62,7 +58,6 @@ import com.android.ravenwood.common.RavenwoodCommonUtils;
import com.android.ravenwood.common.RavenwoodRuntimeException;
import com.android.ravenwood.common.SneakyThrow;
import com.android.server.LocalServices;
-import com.android.server.compat.PlatformCompat;
import org.junit.runner.Description;
@@ -336,8 +331,6 @@ public class RavenwoodRuntimeEnvironmentController {
RavenwoodSystemServer.init(config);
- initializeCompatIds(config);
-
if (ENABLE_TIMEOUT_STACKS) {
sPendingTimeout = sTimeoutExecutor.schedule(
RavenwoodRuntimeEnvironmentController::dumpStacks,
@@ -353,31 +346,6 @@ public class RavenwoodRuntimeEnvironmentController {
Binder.restoreCallingIdentity(packBinderIdentityToken(false, config.mUid, config.mPid));
}
- private static void initializeCompatIds(RavenwoodConfig config) {
- // Set up compat-IDs for the app side.
- // TODO: Inside the system server, all the compat-IDs should be enabled,
- // Due to the `AppCompatCallbacks.install(new long[0], new long[0])` call in
- // SystemServer.
-
- // Compat framework only uses the package name and the target SDK level.
- ApplicationInfo appInfo = new ApplicationInfo();
- appInfo.packageName = config.mTargetPackageName;
- appInfo.targetSdkVersion = config.mTargetSdkLevel;
-
- PlatformCompat platformCompat = null;
- try {
- platformCompat = (PlatformCompat) ServiceManager.getServiceOrThrow(
- Context.PLATFORM_COMPAT_SERVICE);
- } catch (ServiceNotFoundException e) {
- throw new RuntimeException(e);
- }
-
- var disabledChanges = platformCompat.getDisabledChanges(appInfo);
- var loggableChanges = platformCompat.getLoggableChanges(appInfo);
-
- AppCompatCallbacks.install(disabledChanges, loggableChanges);
- }
-
/**
* De-initialize.
*/
diff --git a/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodSystemServer.java b/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodSystemServer.java
index 438a2bfa7a14..f198a08a50e3 100644
--- a/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodSystemServer.java
+++ b/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodSystemServer.java
@@ -17,9 +17,7 @@
package android.platform.test.ravenwood;
import android.content.ClipboardManager;
-import android.content.Context;
import android.hardware.SerialManager;
-import android.os.ServiceManager;
import android.os.SystemClock;
import android.ravenwood.example.BlueManager;
import android.ravenwood.example.RedManager;
@@ -29,8 +27,6 @@ import android.util.ArraySet;
import com.android.server.LocalServices;
import com.android.server.SystemService;
import com.android.server.SystemServiceManager;
-import com.android.server.compat.PlatformCompat;
-import com.android.server.compat.PlatformCompatNative;
import com.android.server.utils.TimingsTraceAndSlog;
import java.util.List;
@@ -69,14 +65,6 @@ public class RavenwoodSystemServer {
private static SystemServiceManager sServiceManager;
public static void init(RavenwoodConfig config) {
- // Always start PlatformCompat, regardless of the requested services.
- // PlatformCompat is not really a SystemService, so it won't receive boot phases / etc.
- // This initialization code is copied from SystemServer.java.
- PlatformCompat platformCompat = new PlatformCompat(config.mState.mSystemServerContext);
- ServiceManager.addService(Context.PLATFORM_COMPAT_SERVICE, platformCompat);
- ServiceManager.addService(Context.PLATFORM_COMPAT_NATIVE_SERVICE,
- new PlatformCompatNative(platformCompat));
-
// Avoid overhead if no services required
if (config.mServicesRequired.isEmpty()) return;