Loading packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/SettingsGlobalStore.kt +7 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.content.Context import android.net.Uri import android.provider.Settings.Global import android.provider.Settings.SettingNotFoundException import androidx.annotation.VisibleForTesting /** * [KeyValueStore] for [Global] settings. Loading Loading @@ -84,6 +85,12 @@ class SettingsGlobalStore private constructor(contentResolver: ContentResolver) } } @VisibleForTesting fun reset() { instance = null Global.clearProviderForTest() } /** Returns the required permissions to read [Global] settings. */ fun getReadPermissions() = Permissions.EMPTY Loading packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/SettingsSecureStore.kt +7 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.content.Context import android.net.Uri import android.provider.Settings.Secure import android.provider.Settings.SettingNotFoundException import androidx.annotation.VisibleForTesting /** * [KeyValueStore] for [Secure] settings. Loading Loading @@ -84,6 +85,12 @@ class SettingsSecureStore private constructor(contentResolver: ContentResolver) } } @VisibleForTesting fun reset() { instance = null Secure.clearProviderForTest() } /** Returns the required permissions to read [Secure] settings. */ fun getReadPermissions() = Permissions.EMPTY Loading packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/SettingsSystemStore.kt +7 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.content.Context import android.net.Uri import android.provider.Settings.SettingNotFoundException import android.provider.Settings.System import androidx.annotation.VisibleForTesting /** * [KeyValueStore] for [System] settings. Loading Loading @@ -84,6 +85,12 @@ class SettingsSystemStore private constructor(contentResolver: ContentResolver) } } @VisibleForTesting fun reset() { instance = null System.clearProviderForTest() } /** Returns the required permissions to read [System] settings. */ fun getReadPermissions() = Permissions.EMPTY Loading packages/SettingsLib/Ipc/testutils/AndroidManifest.xml 0 → 100644 +21 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright (C) 2025 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. --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.settingslib.ipc.testutils"> <uses-sdk android:minSdkVersion="21" /> </manifest> Loading
packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/SettingsGlobalStore.kt +7 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.content.Context import android.net.Uri import android.provider.Settings.Global import android.provider.Settings.SettingNotFoundException import androidx.annotation.VisibleForTesting /** * [KeyValueStore] for [Global] settings. Loading Loading @@ -84,6 +85,12 @@ class SettingsGlobalStore private constructor(contentResolver: ContentResolver) } } @VisibleForTesting fun reset() { instance = null Global.clearProviderForTest() } /** Returns the required permissions to read [Global] settings. */ fun getReadPermissions() = Permissions.EMPTY Loading
packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/SettingsSecureStore.kt +7 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.content.Context import android.net.Uri import android.provider.Settings.Secure import android.provider.Settings.SettingNotFoundException import androidx.annotation.VisibleForTesting /** * [KeyValueStore] for [Secure] settings. Loading Loading @@ -84,6 +85,12 @@ class SettingsSecureStore private constructor(contentResolver: ContentResolver) } } @VisibleForTesting fun reset() { instance = null Secure.clearProviderForTest() } /** Returns the required permissions to read [Secure] settings. */ fun getReadPermissions() = Permissions.EMPTY Loading
packages/SettingsLib/DataStore/src/com/android/settingslib/datastore/SettingsSystemStore.kt +7 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.content.Context import android.net.Uri import android.provider.Settings.SettingNotFoundException import android.provider.Settings.System import androidx.annotation.VisibleForTesting /** * [KeyValueStore] for [System] settings. Loading Loading @@ -84,6 +85,12 @@ class SettingsSystemStore private constructor(contentResolver: ContentResolver) } } @VisibleForTesting fun reset() { instance = null System.clearProviderForTest() } /** Returns the required permissions to read [System] settings. */ fun getReadPermissions() = Permissions.EMPTY Loading
packages/SettingsLib/Ipc/testutils/AndroidManifest.xml 0 → 100644 +21 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright (C) 2025 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. --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.settingslib.ipc.testutils"> <uses-sdk android:minSdkVersion="21" /> </manifest>