summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yang Sun <sunytt@google.com> 2023-12-12 08:55:02 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-12-12 08:55:02 +0000
commitfc3f417f346b812827c18c04f5ff7433fb0bf4e3 (patch)
tree86ad272e2eed7cf0e3a43e157cad2af81a7b367f
parentab4e9b68f4dd0dcf0abf984a8b13d5cdc4940c47 (diff)
Revert "Create a HwNoService class that fakes hwservicemanager"
Revert submission 2866127-HwNoService Reason for revert: DroidMonitor: Potential culprit for Bug 315883998 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted. Reverted changes: /q/submissionid:2866127-HwNoService Change-Id: Ib3aea655d19bc0a508abfaa093b75c7a16c29b5e
-rw-r--r--core/java/android/os/HwBinder.java12
-rw-r--r--core/java/android/os/HwNoService.java52
2 files changed, 0 insertions, 64 deletions
diff --git a/core/java/android/os/HwBinder.java b/core/java/android/os/HwBinder.java
index bc19655d1618..feed20800fd4 100644
--- a/core/java/android/os/HwBinder.java
+++ b/core/java/android/os/HwBinder.java
@@ -18,7 +18,6 @@ package android.os;
import android.annotation.SystemApi;
import android.compat.annotation.UnsupportedAppUsage;
-import android.util.Log;
import libcore.util.NativeAllocationRegistry;
@@ -79,17 +78,6 @@ public abstract class HwBinder implements IHwBinder {
String iface,
String serviceName)
throws RemoteException, NoSuchElementException {
- if (!HidlSupport.isHidlSupported()
- && (iface.equals("android.hidl.manager@1.0::IServiceManager")
- || iface.equals("android.hidl.manager@1.1::IServiceManager")
- || iface.equals("android.hidl.manager@1.2::IServiceManager"))) {
- Log.i(
- TAG,
- "Replacing Java hwservicemanager with a fake HwNoService"
- + " because HIDL is not supported on this device.");
- return new HwNoService();
- }
-
return getService(iface, serviceName, false /* retry */);
}
/**
diff --git a/core/java/android/os/HwNoService.java b/core/java/android/os/HwNoService.java
deleted file mode 100644
index 117c3ad7ee48..000000000000
--- a/core/java/android/os/HwNoService.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2023 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.os;
-
-/**
- * A fake hwservicemanager that is used locally when HIDL isn't supported on the device.
- *
- * @hide
- */
-final class HwNoService implements IHwBinder, IHwInterface {
- /** @hide */
- @Override
- public void transact(int code, HwParcel request, HwParcel reply, int flags) {}
-
- /** @hide */
- @Override
- public IHwInterface queryLocalInterface(String descriptor) {
- return new HwNoService();
- }
-
- /** @hide */
- @Override
- public boolean linkToDeath(DeathRecipient recipient, long cookie) {
- return true;
- }
-
- /** @hide */
- @Override
- public boolean unlinkToDeath(DeathRecipient recipient) {
- return true;
- }
-
- /** @hide */
- @Override
- public IHwBinder asBinder() {
- return this;
- }
-}