Merge changes from topic "record-finalized-flags-part-2" into main
* changes:
record-finalized-flags: add actual implementation
record-finalized-flags: convert to Rust
diff --git a/tools/aconfig/fake_device_config/Android.bp b/tools/aconfig/fake_device_config/Android.bp
index 1c5b7c5..bf98058 100644
--- a/tools/aconfig/fake_device_config/Android.bp
+++ b/tools/aconfig/fake_device_config/Android.bp
@@ -24,16 +24,6 @@
}
java_library {
- name: "strict_mode_stub",
- srcs: [
- "src/android/os/StrictMode.java",
- ],
- sdk_version: "core_current",
- host_supported: true,
- is_stubs_module: true,
-}
-
-java_library {
name: "aconfig_storage_stub",
srcs: [
"src/android/os/flagging/**/*.java",
diff --git a/tools/aconfig/fake_device_config/src/android/os/Binder.java b/tools/aconfig/fake_device_config/src/android/os/Binder.java
deleted file mode 100644
index 8a2313d..0000000
--- a/tools/aconfig/fake_device_config/src/android/os/Binder.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) 2024 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;
-
-public class Binder {
- public static final long clearCallingIdentity() {
- throw new UnsupportedOperationException("Stub!");
- }
- public static final void restoreCallingIdentity(long token) {
- throw new UnsupportedOperationException("Stub!");
- }
-}
diff --git a/tools/aconfig/fake_device_config/src/android/os/StrictMode.java b/tools/aconfig/fake_device_config/src/android/os/StrictMode.java
deleted file mode 100644
index 6416252..0000000
--- a/tools/aconfig/fake_device_config/src/android/os/StrictMode.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2024 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;
-
-public class StrictMode {
- public static ThreadPolicy allowThreadDiskReads() {
- throw new UnsupportedOperationException("Stub!");
- }
-
- public static void setThreadPolicy(final ThreadPolicy policy) {
- throw new UnsupportedOperationException("Stub!");
- }
-
- public static final class ThreadPolicy {}
-}
diff --git a/tools/aconfig/fake_device_config/src/android/provider/DeviceConfig.java b/tools/aconfig/fake_device_config/src/android/provider/DeviceConfig.java
deleted file mode 100644
index dbb07ac..0000000
--- a/tools/aconfig/fake_device_config/src/android/provider/DeviceConfig.java
+++ /dev/null
@@ -1,39 +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.provider;
-
-/*
- * This class allows generated aconfig code to compile independently of the framework.
- */
-public class DeviceConfig {
- private DeviceConfig() {
- }
-
- public static boolean getBoolean(String ns, String name, boolean def) {
- return false;
- }
-
- public static Properties getProperties(String namespace, String... names) {
- return new Properties();
- }
-
- public static class Properties {
- public boolean getBoolean(String name, boolean def) {
- return false;
- }
- }
-}
diff --git a/tools/aconfig/fake_device_config/src/android/util/Log.java b/tools/aconfig/fake_device_config/src/android/util/Log.java
index 79de680..e40790a 100644
--- a/tools/aconfig/fake_device_config/src/android/util/Log.java
+++ b/tools/aconfig/fake_device_config/src/android/util/Log.java
@@ -2,18 +2,18 @@
public final class Log {
public static int i(String tag, String msg) {
- return 0;
+ throw new UnsupportedOperationException("Stub!");
}
public static int w(String tag, String msg) {
- return 0;
+ throw new UnsupportedOperationException("Stub!");
}
public static int e(String tag, String msg) {
- return 0;
+ throw new UnsupportedOperationException("Stub!");
}
public static int e(String tag, String msg, Throwable tr) {
- return 0;
+ throw new UnsupportedOperationException("Stub!");
}
}