diff options
author | 2022-12-09 06:14:06 +0000 | |
---|---|---|
committer | 2022-12-13 05:05:56 +0000 | |
commit | 1d21a6fb3052e865fa9850b560e8fe03c3b9a5d7 (patch) | |
tree | 337f4dc4c0c978db5392a0cd01e1e0a1b8f5b511 | |
parent | 3e3bff5381098666ac8a07e722b0f7b6c510d51c (diff) |
[Safety Labels] Add feature flag for Safety Label Change Notifications as SystemApi
We add this feature flag as SystemApi as it will be used across packages
(PermissionController, Settings and Platform code)
Bug: 261652173
Test: Will be used to guard the Safety Label Change Notifications
feature and so will be tested then.
Change-Id: Ia65d7c468a757de13feda32fa1a79299b39eaa63
-rw-r--r-- | Android.bp | 1 | ||||
-rw-r--r-- | framework-s/Android.bp | 1 | ||||
-rw-r--r-- | framework-s/api/system-current.txt | 8 | ||||
-rw-r--r-- | framework-s/java/android/safetylabel/SafetyLabelConstants.java | 48 |
4 files changed, 58 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp index 74e980580..f9eee9ddb 100644 --- a/Android.bp +++ b/Android.bp @@ -111,6 +111,7 @@ bootclasspath_fragment { package_prefixes: [ "android.app.role", "android.safetycenter", + "android.safetylabel", "com.android.permission", ], }, diff --git a/framework-s/Android.bp b/framework-s/Android.bp index 8d107d18a..12c8656c0 100644 --- a/framework-s/Android.bp +++ b/framework-s/Android.bp @@ -92,6 +92,7 @@ java_sdk_library { "android.permission", "android.app.role", "android.safetycenter", + "android.safetylabel", // For com.android.permission.jarjar. "com.android.permission", ], diff --git a/framework-s/api/system-current.txt b/framework-s/api/system-current.txt index 3f7cd09ec..c0f4a1fe8 100644 --- a/framework-s/api/system-current.txt +++ b/framework-s/api/system-current.txt @@ -569,3 +569,11 @@ package android.safetycenter.config { } +package android.safetylabel { + + public final class SafetyLabelConstants { + field public static final String SAFETY_LABEL_CHANGE_NOTIFICATION_ENABLED = "safety_label_change_notifications_enabled"; + } + +} + diff --git a/framework-s/java/android/safetylabel/SafetyLabelConstants.java b/framework-s/java/android/safetylabel/SafetyLabelConstants.java new file mode 100644 index 000000000..36bde68ed --- /dev/null +++ b/framework-s/java/android/safetylabel/SafetyLabelConstants.java @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2022 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.safetylabel; + +import static android.os.Build.VERSION_CODES.UPSIDE_DOWN_CAKE; + +import android.annotation.SystemApi; + +import androidx.annotation.RequiresApi; + +/** + * Constants relating to the Safety Label feature. + * + * @hide + */ +@SystemApi +@RequiresApi(UPSIDE_DOWN_CAKE) +public final class SafetyLabelConstants { + /** + * Constant to be used as Device Config flag determining whether the Safety Label Change + * Notifications feature is enabled. + * + * When this flag is enabled, a system notification will be sent to users if any apps they have + * installed have made recent updates to their data sharing policy in their app safety labels. + * + * @hide + */ + @SystemApi + @RequiresApi(UPSIDE_DOWN_CAKE) + public static final String SAFETY_LABEL_CHANGE_NOTIFICATION_ENABLED = + "safety_label_change_notifications_enabled"; + + private SafetyLabelConstants() {} +} |