summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Richard MacGregor <rmacgregor@google.com> 2023-07-20 17:44:49 +0000
committer Richard MacGregor <rmacgregor@google.com> 2023-07-21 22:28:28 +0000
commit20d044f6e0b4e4ab117527826b5735e20e9f2001 (patch)
tree0f75c2c416523a1342483c3792eab2e5ce96bdc0
parent371d7d01be606c343787d6c74f2f3235878b319e (diff)
Setup aconfig flags for Permissions
Add lib for permissions flagging Test: manual Bug: 291791417 Change-Id: I4c1609e2fb01e2362b03eeb2e002aa84b0bb9d5d
-rw-r--r--PermissionController/Android.bp1
-rw-r--r--flags/Android.bp65
-rw-r--r--flags/flags.aconfig7
-rw-r--r--flags/java/com/android/permission/flags/PermissionsFlags.java20
4 files changed, 93 insertions, 0 deletions
diff --git a/PermissionController/Android.bp b/PermissionController/Android.bp
index 4049cbab9..81d7e0154 100644
--- a/PermissionController/Android.bp
+++ b/PermissionController/Android.bp
@@ -152,6 +152,7 @@ android_app {
"lottie",
"safety-label",
"role-controller",
+ "permissions-flags-lib",
"androidx.compose.runtime_runtime",
"androidx.annotation_annotation",
"androidx.compose.ui_ui",
diff --git a/flags/Android.bp b/flags/Android.bp
new file mode 100644
index 000000000..4f0241f91
--- /dev/null
+++ b/flags/Android.bp
@@ -0,0 +1,65 @@
+//
+// 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 {
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+aconfig_declarations {
+ name: "permissions-aconfig-flags",
+ package: "com.android.permission.flags",
+ srcs: ["flags.aconfig"],
+}
+
+java_aconfig_library {
+ name: "permissions-aconfig-flags-lib",
+ aconfig_declarations: "permissions-aconfig-flags",
+ sdk_version: "system_current",
+ min_sdk_version: "30",
+ apex_available: [
+ "com.android.permission",
+ "test_com.android.permission",
+ ],
+ installable: false,
+ visibility: [
+ "//packages/modules/Permission:__subpackages__",
+ ],
+}
+
+java_library {
+ name: "permissions-flags-lib",
+ sdk_version: "system_current",
+ min_sdk_version: "30",
+ target_sdk_version: "34",
+ srcs: [
+ "java/**/*.java",
+ ],
+ static_libs: [
+ "permissions-aconfig-flags-lib",
+ ],
+ libs: [
+ "androidx.annotation_annotation",
+ "framework-annotations-lib",
+ ],
+ apex_available: [
+ "com.android.permission",
+ "test_com.android.permission",
+ ],
+ installable: false,
+ visibility: [
+ "//packages/modules/Permission:__subpackages__",
+ ],
+} \ No newline at end of file
diff --git a/flags/flags.aconfig b/flags/flags.aconfig
new file mode 100644
index 000000000..6a8cd5307
--- /dev/null
+++ b/flags/flags.aconfig
@@ -0,0 +1,7 @@
+package: "com.android.permission.flags"
+
+flag {
+ name: "voice_activation_op_enabled"
+ namespace: "permissions"
+ description: "This flag is used to support hotword activation events in privacy dashboard"
+}
diff --git a/flags/java/com/android/permission/flags/PermissionsFlags.java b/flags/java/com/android/permission/flags/PermissionsFlags.java
new file mode 100644
index 000000000..afab3fae5
--- /dev/null
+++ b/flags/java/com/android/permission/flags/PermissionsFlags.java
@@ -0,0 +1,20 @@
+/*
+ * 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 com.android.permission.flags;
+
+/** Class used for flags that do not work with aconfig tooling */
+public final class PermissionsFlags {}