diff options
4 files changed, 129 insertions, 0 deletions
diff --git a/tools/aconfig/fake_device_config/Android.bp b/tools/aconfig/fake_device_config/Android.bp index 4cd5070d11..1c5b7c5967 100644 --- a/tools/aconfig/fake_device_config/Android.bp +++ b/tools/aconfig/fake_device_config/Android.bp @@ -42,3 +42,14 @@ java_library { host_supported: true, is_stubs_module: true, } + +java_library { + name: "aconfig_storage_stub_none", + srcs: [ + "src/android/os/flagging/**/*.java", + ], + sdk_version: "none", + system_modules: "core-all-system-modules", + host_supported: true, + is_stubs_module: true, +} diff --git a/tools/aconfig/fake_device_config/src/android/os/flagging/AconfigPackage.java b/tools/aconfig/fake_device_config/src/android/os/flagging/AconfigPackage.java new file mode 100644 index 0000000000..3cac5168d1 --- /dev/null +++ b/tools/aconfig/fake_device_config/src/android/os/flagging/AconfigPackage.java @@ -0,0 +1,30 @@ +/* + * 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.flagging; + +/* + * This class allows generated aconfig code to compile independently of the framework. + */ +public class AconfigPackage { + public static AconfigPackage load(String packageName) { + throw new UnsupportedOperationException("Stub!"); + } + + public boolean getBooleanFlagValue(String flagName, boolean defaultValue) { + throw new UnsupportedOperationException("Stub!"); + } +} diff --git a/tools/aconfig/fake_device_config/src/android/os/flagging/AconfigPackageInternal.java b/tools/aconfig/fake_device_config/src/android/os/flagging/AconfigPackageInternal.java new file mode 100644 index 0000000000..5f066a8f7d --- /dev/null +++ b/tools/aconfig/fake_device_config/src/android/os/flagging/AconfigPackageInternal.java @@ -0,0 +1,44 @@ +/* + * 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.flagging; + +/* + * This class allows generated aconfig code to compile independently of the framework. + */ +public class AconfigPackageInternal { + + public static AconfigPackageInternal load(String container, String packageName) { + throw new UnsupportedOperationException("Stub!"); + } + + public static AconfigPackageInternal load( + String container, String packageName, long packageFingerprint) { + throw new UnsupportedOperationException("Stub!"); + } + + public boolean getBooleanFlagValue(int index) { + throw new UnsupportedOperationException("Stub!"); + } + + public boolean getBooleanFlagValue(String flagName, boolean defaultValue) { + throw new UnsupportedOperationException("Stub!"); + } + + public AconfigStorageReadException getException() { + throw new UnsupportedOperationException("Stub!"); + } +} diff --git a/tools/aconfig/fake_device_config/src/android/os/flagging/PlatformAconfigPackageInternal.java b/tools/aconfig/fake_device_config/src/android/os/flagging/PlatformAconfigPackageInternal.java new file mode 100644 index 0000000000..c1bc19b60d --- /dev/null +++ b/tools/aconfig/fake_device_config/src/android/os/flagging/PlatformAconfigPackageInternal.java @@ -0,0 +1,44 @@ +/* + * 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.flagging; + +/* + * This class allows generated aconfig code to compile independently of the framework. + */ +public class PlatformAconfigPackageInternal { + + public static PlatformAconfigPackageInternal load(String container, String packageName) { + throw new UnsupportedOperationException("Stub!"); + } + + public static PlatformAconfigPackageInternal load( + String container, String packageName, long packageFingerprint) { + throw new UnsupportedOperationException("Stub!"); + } + + public boolean getBooleanFlagValue(int index) { + throw new UnsupportedOperationException("Stub!"); + } + + public boolean getBooleanFlagValue(String flagName, boolean defaultValue) { + throw new UnsupportedOperationException("Stub!"); + } + + public AconfigStorageReadException getException() { + throw new UnsupportedOperationException("Stub!"); + } +} |