Merge RP1A.190923.001
Change-Id: I9a0293def75f76e73d582ab4e168348e67ed18b7
diff --git a/bridge/src/android/app/SystemServiceRegistry_Accessor.java b/bridge/src/android/app/SystemServiceRegistry_Accessor.java
deleted file mode 100644
index 591aee0..0000000
--- a/bridge/src/android/app/SystemServiceRegistry_Accessor.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.app;
-
-/**
- * Class to allow accessing {@link SystemServiceRegistry#getSystemServiceName}
- */
-public class SystemServiceRegistry_Accessor {
- /**
- * Gets the name of the system-level service that is represented by the specified class.
- */
- public static String getSystemServiceName(Class<?> serviceClass) {
- return SystemServiceRegistry.getSystemServiceName(serviceClass);
- }
-}
diff --git a/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java b/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
index bfec5dd..feb9b88 100644
--- a/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
+++ b/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
@@ -27,7 +27,6 @@
import com.android.ide.common.rendering.api.ResourceReference;
import com.android.ide.common.rendering.api.ResourceValue;
import com.android.ide.common.rendering.api.ResourceValueImpl;
-import com.android.ide.common.rendering.api.SessionParams;
import com.android.ide.common.rendering.api.StyleResourceValue;
import com.android.layoutlib.bridge.Bridge;
import com.android.layoutlib.bridge.BridgeConstants;
@@ -42,7 +41,7 @@
import android.annotation.NonNull;
import android.annotation.Nullable;
-import android.app.SystemServiceRegistry_Accessor;
+import android.app.SystemServiceRegistry;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.ContentResolver;
@@ -643,7 +642,7 @@
@Override
public String getSystemServiceName(Class<?> serviceClass) {
- return SystemServiceRegistry_Accessor.getSystemServiceName(serviceClass);
+ return SystemServiceRegistry.getSystemServiceName(serviceClass);
}
/**
diff --git a/bridge/tests/src/android/app/SystemServiceRegistry_AccessorTest.java b/bridge/tests/src/android/app/SystemServiceRegistry_AccessorTest.java
deleted file mode 100644
index 4f1c16c..0000000
--- a/bridge/tests/src/android/app/SystemServiceRegistry_AccessorTest.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.app;
-
-import org.junit.Test;
-
-import android.content.Context;
-import android.hardware.input.InputManager;
-import android.view.WindowManager;
-import android.view.accessibility.AccessibilityManager;
-
-import static org.junit.Assert.*;
-
-public class SystemServiceRegistry_AccessorTest {
- @Test
- public void testRegistry() {
- // Just check a few services to make sure we don't break the accessor
- assertEquals(Context.ACCESSIBILITY_SERVICE,
- SystemServiceRegistry_Accessor.getSystemServiceName(AccessibilityManager.class));
- assertEquals(Context.INPUT_SERVICE,
- SystemServiceRegistry_Accessor.getSystemServiceName(InputManager.class));
- assertEquals(Context.WINDOW_SERVICE,
- SystemServiceRegistry_Accessor.getSystemServiceName(WindowManager.class));
- }
-}
\ No newline at end of file
diff --git a/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java b/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
index 4e305e8..3db0644 100644
--- a/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
+++ b/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java
@@ -27,7 +27,6 @@
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import android.app.SystemServiceRegistry_AccessorTest;
import android.content.res.Resources_DelegateTest;
import android.graphics.Color_DelegateTest;
import android.graphics.Matrix_DelegateTest;
@@ -44,9 +43,8 @@
BridgeXmlBlockParserTest.class, BridgeXmlPullAttributesTest.class,
Matrix_DelegateTest.class, TestDelegates.class,
BridgeRenderSessionTest.class, ResourceHelperTest.class, BridgeContextTest.class,
- SystemServiceRegistry_AccessorTest.class, Resources_DelegateTest.class,
- Color_DelegateTest.class, ImagePoolHelperTest.class, ImagePoolImplTest.class,
- HighQualityShadowsRenderTests.class
+ Resources_DelegateTest.class, Color_DelegateTest.class, ImagePoolHelperTest.class,
+ ImagePoolImplTest.class, HighQualityShadowsRenderTests.class
})
public class Main {
}