Add new TvFeedbackConsent soong target
Bug: 268191690
Test: make and flash
Change-Id: I34a66716670663ebbd7125ddbb78e8fcb5f41156
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..d6fe865
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,60 @@
+//
+// 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"],
+}
+
+android_library {
+ name: "TvFeedbackConsent-res",
+ resource_dirs: [
+ "res",
+ ],
+ use_resource_processor: true,
+ manifest: "AndroidManifest-res.xml",
+}
+
+android_library {
+ name: "TvFeedbackConsent-core",
+ srcs: [
+ "src/**/*.java",
+ "src/**/*.kt",
+ "src/**/I*.aidl",
+ ],
+ resource_dirs: [],
+ use_resource_processor: true,
+ static_libs: [
+ "androidx.leanback_leanback-preference",
+ "androidx.leanback_leanback",
+ "TvFeedbackConsent-res",
+ ],
+ manifest: "AndroidManifest.xml",
+}
+
+android_app {
+ name: "TvFeedbackConsent",
+ resource_dirs: [],
+ use_resource_processor: true,
+ static_libs: [
+ "TvFeedbackConsent-core",
+ ],
+
+ platform_apis: true,
+ system_ext_specific: true,
+ certificate: "platform",
+ privileged: true,
+
+}
+
diff --git a/AndroidManifest-res.xml b/AndroidManifest-res.xml
new file mode 100644
index 0000000..acf4881
--- /dev/null
+++ b/AndroidManifest-res.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ ~ 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.
+ -->
+<manifest package="com.android.tv.feedbackconsent.res">
+ <application />
+</manifest>
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
new file mode 100644
index 0000000..7357264
--- /dev/null
+++ b/AndroidManifest.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ ~ 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.
+ -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ coreApp="true"
+ package="com.android.tv.feedbackconsent"
+ android:sharedUserId="android.uid.system">
+
+ <application android:label="Tv Feedback Consent">
+ <service
+ android:name=".TvFeedbackConsentService"
+ android:exported="true" />
+ </application>
+
+ <!-- Required to trigger action 'bug report capture' in ActivityManagerService -->
+ <uses-feature
+ android:name="android.software.leanback"
+ android:required="false" />
+
+ <uses-permission android:name="android.permission.READ_LOGS" />
+ <uses-permission android:name="android.permission.DUMP" />
+</manifest>
diff --git a/res/values/strings.xml b/res/values/strings.xml
new file mode 100644
index 0000000..b480d31
--- /dev/null
+++ b/res/values/strings.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ ~ 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.
+ -->
+
+<resources />
\ No newline at end of file
diff --git a/src/com/android/tv/feedbackconsent/TvFeedbackConsentService.java b/src/com/android/tv/feedbackconsent/TvFeedbackConsentService.java
new file mode 100644
index 0000000..260369d
--- /dev/null
+++ b/src/com/android/tv/feedbackconsent/TvFeedbackConsentService.java
@@ -0,0 +1,43 @@
+/*
+ * 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.tv.feedbackconsent;
+
+import android.app.Service;
+import android.content.Intent;
+import android.os.IBinder;
+
+import androidx.annotation.Nullable;
+
+public final class TvFeedbackConsentService extends Service {
+ private static final String TAG = TvFeedbackConsentService.class.getSimpleName();
+
+ @Nullable
+ @Override
+ public IBinder onBind(Intent intent) {
+ return null;
+ }
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ }
+}