summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYiming Jing <yimingjing@google.com>2021-01-29 23:34:05 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-01-29 23:34:05 +0000
commitc96387aeff09fbf581041de9ae0a7409e96b553f (patch)
treedb1a6261597e56f5d66b5246bc5fb48b464219aa
parentb324d5d44a660818e40f6616f5a0f9e69da0b70c (diff)
parent4d8eba05398c71029cfab0fd06216dc279922b94 (diff)
downloadDebuggingRestrictionController-c96387aeff09fbf581041de9ae0a7409e96b553f.tar.gz
Setup Android.bp and dependencies to build in tree am: bbc5d5ea49 am: 4d8eba0539
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Car/DebuggingRestrictionController/+/13436370 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ib815c11b9dd5fff2b0643e3df3b8abd98f499e1e
-rw-r--r--Android.bp52
-rw-r--r--libs/Android.bp127
-rw-r--r--libs/firebase-auth-20.0.1.aarbin0 -> 844133 bytes
-rw-r--r--libs/firebase-auth-interop-19.0.0.aarbin0 -> 11875 bytes
-rw-r--r--libs/firebase-common-19.5.0.aarbin0 -> 34803 bytes
-rw-r--r--libs/firebase-components-16.1.0.aarbin0 -> 30176 bytes
-rw-r--r--libs/firebase-functions-19.2.0.aarbin0 -> 20080 bytes
-rw-r--r--libs/firebase-iid-21.0.1.aarbin0 -> 61082 bytes
-rw-r--r--libs/firebase-iid-interop-17.0.0.aarbin0 -> 6775 bytes
-rw-r--r--libs/firebase-installations-16.3.5.aarbin0 -> 41905 bytes
-rw-r--r--libs/firebase-installations-interop-16.0.1.aarbin0 -> 6106 bytes
-rw-r--r--libs/google-api-client-1.30.10.jarbin0 -> 207079 bytes
-rw-r--r--libs/google-http-client-1.36.0.jarbin0 -> 286674 bytes
-rw-r--r--libs/google-http-client-jackson2-1.36.0.jarbin0 -> 8492 bytes
-rw-r--r--libs/google-oauth-client-1.31.0.jarbin0 -> 69599 bytes
-rw-r--r--libs/httpclient-4.5.12.jarbin0 -> 778156 bytes
-rw-r--r--libs/httpcore-4.4.13.jarbin0 -> 328593 bytes
-rw-r--r--libs/jackson-core-2.11.1.jarbin0 -> 351575 bytes
-rw-r--r--libs/okhttp-3.12.1.jarbin0 -> 422787 bytes
-rw-r--r--libs/okio-1.15.0.jarbin0 -> 88732 bytes
-rw-r--r--libs/opencensus-api-0.24.0.jarbin0 -> 351668 bytes
-rw-r--r--libs/opencensus-contrib-http-util-0.24.0.jarbin0 -> 23420 bytes
-rw-r--r--libs/play-services-auth-api-phone-17.4.0.aarbin0 -> 26925 bytes
-rw-r--r--libs/play-services-base-17.1.0.aarbin0 -> 534809 bytes
-rw-r--r--libs/play-services-basement-17.1.0.aarbin0 -> 299315 bytes
-rw-r--r--libs/play-services-cloud-messaging-16.0.0.aarbin0 -> 44394 bytes
-rw-r--r--libs/play-services-safetynet-17.0.0.aarbin0 -> 54070 bytes
-rw-r--r--libs/play-services-stats-17.0.0.aarbin0 -> 17218 bytes
-rw-r--r--libs/play-services-tasks-17.0.0.aarbin0 -> 39919 bytes
-rw-r--r--soong/AndroidManifest.xml38
-rw-r--r--soong/BuildConfig.java37
-rw-r--r--soong/FirebaseApplication.java35
-rw-r--r--soong/README.md7
33 files changed, 296 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..16a8bf0
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,52 @@
+android_app {
+ name: "DebuggingRestrictionController",
+ srcs: ["app/src/main/java/**/*.java", "soong/BuildConfig.java", "soong/FirebaseApplication.java"],
+ resource_dirs: ["app/src/main/res"],
+ manifest: "soong/AndroidManifest.xml",
+ sdk_version: "system_current",
+ certificate: "platform",
+ privileged: true,
+ optimize: {
+ enabled: true,
+ proguard_flags_files: ["app/proguard-rules.pro"],
+ },
+
+ static_libs: [
+ "com.google.android.material_material",
+ "androidx.annotation_annotation",
+ "androidx.appcompat_appcompat",
+ "androidx-constraintlayout_constraintlayout",
+
+ "androidx.lifecycle_lifecycle-livedata",
+ "androidx.lifecycle_lifecycle-viewmodel",
+ "androidx.lifecycle_lifecycle-runtime",
+ "androidx.lifecycle_lifecycle-extensions",
+ "androidx.legacy_legacy-support-v4",
+ "androidx.test.espresso.idling-resource",
+
+ "guava",
+ "jsr305",
+
+ "drc_static_libs",
+ "drc-lib-firebase-auth-20.0.1",
+ "drc-lib-firebase-auth-interop-19.0.0",
+ "drc-lib-firebase-common-19.5.0",
+ "drc-lib-firebase-components-16.1.0",
+ "drc-lib-firebase-functions-19.2.0",
+ "drc-lib-firebase-iid-21.0.1",
+ "drc-lib-firebase-iid-interop-17.0.0",
+ "drc-lib-firebase-installations-16.3.5",
+ "drc-lib-firebase-installations-interop-16.0.1",
+ "drc-lib-play-services-auth-api-phone-17.4.0",
+ "drc-lib-play-services-base-17.1.0",
+ "drc-lib-play-services-basement-17.1.0",
+ "drc-lib-play-services-cloud-messaging-16.0.0",
+ "drc-lib-play-services-safetynet-17.0.0",
+ "drc-lib-play-services-stats-17.0.0",
+ "drc-lib-play-services-tasks-17.0.0",
+ ],
+
+ //required: ["allowed_privapp_com.android.car.debuggingrestrictioncontroller"],
+}
+
+
diff --git a/libs/Android.bp b/libs/Android.bp
new file mode 100644
index 0000000..9980b54
--- /dev/null
+++ b/libs/Android.bp
@@ -0,0 +1,127 @@
+android_library_import {
+ name: "drc-lib-firebase-functions-19.2.0",
+ aars: ["firebase-functions-19.2.0.aar"],
+ sdk_version: "current",
+}
+
+android_library_import {
+ name: "drc-lib-play-services-base-17.1.0",
+ aars: ["play-services-base-17.1.0.aar"],
+ sdk_version: "current",
+}
+
+
+android_library_import {
+ name: "drc-lib-play-services-stats-17.0.0",
+ aars: ["play-services-stats-17.0.0.aar"],
+ sdk_version: "current",
+}
+
+
+android_library_import {
+ name: "drc-lib-play-services-basement-17.1.0",
+ aars: ["play-services-basement-17.1.0.aar"],
+ sdk_version: "current",
+}
+
+
+android_library_import {
+ name: "drc-lib-firebase-iid-21.0.1",
+ aars: ["firebase-iid-21.0.1.aar"],
+ sdk_version: "current",
+}
+
+
+android_library_import {
+ name: "drc-lib-play-services-tasks-17.0.0",
+ aars: ["play-services-tasks-17.0.0.aar"],
+ sdk_version: "current",
+}
+
+
+android_library_import {
+ name: "drc-lib-firebase-installations-interop-16.0.1",
+ aars: ["firebase-installations-interop-16.0.1.aar"],
+ sdk_version: "current",
+}
+
+
+android_library_import {
+ name: "drc-lib-firebase-auth-interop-19.0.0",
+ aars: ["firebase-auth-interop-19.0.0.aar"],
+ sdk_version: "current",
+}
+
+
+android_library_import {
+ name: "drc-lib-firebase-components-16.1.0",
+ aars: ["firebase-components-16.1.0.aar"],
+ sdk_version: "current",
+}
+
+
+android_library_import {
+ name: "drc-lib-firebase-iid-interop-17.0.0",
+ aars: ["firebase-iid-interop-17.0.0.aar"],
+ sdk_version: "current",
+}
+
+
+android_library_import {
+ name: "drc-lib-firebase-installations-16.3.5",
+ aars: ["firebase-installations-16.3.5.aar"],
+ sdk_version: "current",
+}
+
+
+android_library_import {
+ name: "drc-lib-firebase-auth-20.0.1",
+ aars: ["firebase-auth-20.0.1.aar"],
+ sdk_version: "current",
+}
+
+
+android_library_import {
+ name: "drc-lib-play-services-cloud-messaging-16.0.0",
+ aars: ["play-services-cloud-messaging-16.0.0.aar"],
+ sdk_version: "current",
+}
+
+
+android_library_import {
+ name: "drc-lib-play-services-safetynet-17.0.0",
+ aars: ["play-services-safetynet-17.0.0.aar"],
+ sdk_version: "current",
+}
+
+
+android_library_import {
+ name: "drc-lib-firebase-common-19.5.0",
+ aars: ["firebase-common-19.5.0.aar"],
+ sdk_version: "current",
+}
+
+
+android_library_import {
+ name: "drc-lib-play-services-auth-api-phone-17.4.0",
+ aars: ["play-services-auth-api-phone-17.4.0.aar"],
+ sdk_version: "current",
+}
+
+java_import {
+ name: "drc_static_libs",
+ jars: [
+ "google-api-client-1.30.10.jar",
+ "google-http-client-1.36.0.jar",
+ "google-http-client-jackson2-1.36.0.jar",
+ "google-oauth-client-1.31.0.jar",
+ "httpclient-4.5.12.jar",
+ "httpcore-4.4.13.jar",
+ "jackson-core-2.11.1.jar",
+ "okhttp-3.12.1.jar",
+ "okio-1.15.0.jar",
+ "opencensus-api-0.24.0.jar",
+ "opencensus-contrib-http-util-0.24.0.jar",
+ ],
+ sdk_version: "current"
+} \ No newline at end of file
diff --git a/libs/firebase-auth-20.0.1.aar b/libs/firebase-auth-20.0.1.aar
new file mode 100644
index 0000000..03546ae
--- /dev/null
+++ b/libs/firebase-auth-20.0.1.aar
Binary files differ
diff --git a/libs/firebase-auth-interop-19.0.0.aar b/libs/firebase-auth-interop-19.0.0.aar
new file mode 100644
index 0000000..f50c5b3
--- /dev/null
+++ b/libs/firebase-auth-interop-19.0.0.aar
Binary files differ
diff --git a/libs/firebase-common-19.5.0.aar b/libs/firebase-common-19.5.0.aar
new file mode 100644
index 0000000..5348f7f
--- /dev/null
+++ b/libs/firebase-common-19.5.0.aar
Binary files differ
diff --git a/libs/firebase-components-16.1.0.aar b/libs/firebase-components-16.1.0.aar
new file mode 100644
index 0000000..fafb519
--- /dev/null
+++ b/libs/firebase-components-16.1.0.aar
Binary files differ
diff --git a/libs/firebase-functions-19.2.0.aar b/libs/firebase-functions-19.2.0.aar
new file mode 100644
index 0000000..9eda5c0
--- /dev/null
+++ b/libs/firebase-functions-19.2.0.aar
Binary files differ
diff --git a/libs/firebase-iid-21.0.1.aar b/libs/firebase-iid-21.0.1.aar
new file mode 100644
index 0000000..6f3d837
--- /dev/null
+++ b/libs/firebase-iid-21.0.1.aar
Binary files differ
diff --git a/libs/firebase-iid-interop-17.0.0.aar b/libs/firebase-iid-interop-17.0.0.aar
new file mode 100644
index 0000000..c728e6d
--- /dev/null
+++ b/libs/firebase-iid-interop-17.0.0.aar
Binary files differ
diff --git a/libs/firebase-installations-16.3.5.aar b/libs/firebase-installations-16.3.5.aar
new file mode 100644
index 0000000..6236f43
--- /dev/null
+++ b/libs/firebase-installations-16.3.5.aar
Binary files differ
diff --git a/libs/firebase-installations-interop-16.0.1.aar b/libs/firebase-installations-interop-16.0.1.aar
new file mode 100644
index 0000000..3dd9a6c
--- /dev/null
+++ b/libs/firebase-installations-interop-16.0.1.aar
Binary files differ
diff --git a/libs/google-api-client-1.30.10.jar b/libs/google-api-client-1.30.10.jar
new file mode 100644
index 0000000..20f26d2
--- /dev/null
+++ b/libs/google-api-client-1.30.10.jar
Binary files differ
diff --git a/libs/google-http-client-1.36.0.jar b/libs/google-http-client-1.36.0.jar
new file mode 100644
index 0000000..769ce23
--- /dev/null
+++ b/libs/google-http-client-1.36.0.jar
Binary files differ
diff --git a/libs/google-http-client-jackson2-1.36.0.jar b/libs/google-http-client-jackson2-1.36.0.jar
new file mode 100644
index 0000000..a839e66
--- /dev/null
+++ b/libs/google-http-client-jackson2-1.36.0.jar
Binary files differ
diff --git a/libs/google-oauth-client-1.31.0.jar b/libs/google-oauth-client-1.31.0.jar
new file mode 100644
index 0000000..f8aeca5
--- /dev/null
+++ b/libs/google-oauth-client-1.31.0.jar
Binary files differ
diff --git a/libs/httpclient-4.5.12.jar b/libs/httpclient-4.5.12.jar
new file mode 100644
index 0000000..300cdf0
--- /dev/null
+++ b/libs/httpclient-4.5.12.jar
Binary files differ
diff --git a/libs/httpcore-4.4.13.jar b/libs/httpcore-4.4.13.jar
new file mode 100644
index 0000000..163dc43
--- /dev/null
+++ b/libs/httpcore-4.4.13.jar
Binary files differ
diff --git a/libs/jackson-core-2.11.1.jar b/libs/jackson-core-2.11.1.jar
new file mode 100644
index 0000000..51b8c98
--- /dev/null
+++ b/libs/jackson-core-2.11.1.jar
Binary files differ
diff --git a/libs/okhttp-3.12.1.jar b/libs/okhttp-3.12.1.jar
new file mode 100644
index 0000000..730ca54
--- /dev/null
+++ b/libs/okhttp-3.12.1.jar
Binary files differ
diff --git a/libs/okio-1.15.0.jar b/libs/okio-1.15.0.jar
new file mode 100644
index 0000000..ab8ab73
--- /dev/null
+++ b/libs/okio-1.15.0.jar
Binary files differ
diff --git a/libs/opencensus-api-0.24.0.jar b/libs/opencensus-api-0.24.0.jar
new file mode 100644
index 0000000..dcace99
--- /dev/null
+++ b/libs/opencensus-api-0.24.0.jar
Binary files differ
diff --git a/libs/opencensus-contrib-http-util-0.24.0.jar b/libs/opencensus-contrib-http-util-0.24.0.jar
new file mode 100644
index 0000000..4f91a71
--- /dev/null
+++ b/libs/opencensus-contrib-http-util-0.24.0.jar
Binary files differ
diff --git a/libs/play-services-auth-api-phone-17.4.0.aar b/libs/play-services-auth-api-phone-17.4.0.aar
new file mode 100644
index 0000000..7bcc96e
--- /dev/null
+++ b/libs/play-services-auth-api-phone-17.4.0.aar
Binary files differ
diff --git a/libs/play-services-base-17.1.0.aar b/libs/play-services-base-17.1.0.aar
new file mode 100644
index 0000000..2ee8f5d
--- /dev/null
+++ b/libs/play-services-base-17.1.0.aar
Binary files differ
diff --git a/libs/play-services-basement-17.1.0.aar b/libs/play-services-basement-17.1.0.aar
new file mode 100644
index 0000000..8ab2865
--- /dev/null
+++ b/libs/play-services-basement-17.1.0.aar
Binary files differ
diff --git a/libs/play-services-cloud-messaging-16.0.0.aar b/libs/play-services-cloud-messaging-16.0.0.aar
new file mode 100644
index 0000000..bd0f2fb
--- /dev/null
+++ b/libs/play-services-cloud-messaging-16.0.0.aar
Binary files differ
diff --git a/libs/play-services-safetynet-17.0.0.aar b/libs/play-services-safetynet-17.0.0.aar
new file mode 100644
index 0000000..fee0a1b
--- /dev/null
+++ b/libs/play-services-safetynet-17.0.0.aar
Binary files differ
diff --git a/libs/play-services-stats-17.0.0.aar b/libs/play-services-stats-17.0.0.aar
new file mode 100644
index 0000000..a501b9e
--- /dev/null
+++ b/libs/play-services-stats-17.0.0.aar
Binary files differ
diff --git a/libs/play-services-tasks-17.0.0.aar b/libs/play-services-tasks-17.0.0.aar
new file mode 100644
index 0000000..c58fbfb
--- /dev/null
+++ b/libs/play-services-tasks-17.0.0.aar
Binary files differ
diff --git a/soong/AndroidManifest.xml b/soong/AndroidManifest.xml
new file mode 100644
index 0000000..ab8f694
--- /dev/null
+++ b/soong/AndroidManifest.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.car.debuggingrestrictioncontroller">
+
+ <uses-permission android:name="android.permission.INTERNET" />
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+ <uses-permission android:name="android.permission.MANAGE_USERS" />
+
+ <application
+ android:name=".FirebaseApplication"
+ android:allowBackup="true"
+ android:icon="@mipmap/ic_launcher"
+ android:label="@string/app_name"
+ android:roundIcon="@mipmap/ic_launcher_round"
+ android:supportsRtl="true"
+ android:theme="@style/Theme.DebuggingRestrictionController">
+
+ <activity
+ android:name=".ui.login.LoginActivity"
+ android:exported="true"
+ android:label="@string/app_name"
+ android:launchMode="singleTask">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ <activity
+ android:name=".ui.token.TokenActivity"
+ android:exported="false"
+ android:parentActivityName=".ui.login.LoginActivity">
+ <meta-data
+ android:name="android.support.PARENT_ACTIVITY"
+ android:value=".ui.login.LoginActivity" />
+ </activity>
+ </application>
+
+</manifest>
diff --git a/soong/BuildConfig.java b/soong/BuildConfig.java
new file mode 100644
index 0000000..5f7c83c
--- /dev/null
+++ b/soong/BuildConfig.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2021 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.car.debuggingrestrictioncontroller;
+
+public final class BuildConfig {
+
+ /** Toggle if the app should use a CA cert provided below */
+ public static final boolean TOKEN_USES_SELF_SIGNED_CA = true;
+
+ /** Contents of the self-signed CA root cert in PEM format */
+ public static final String ROOT_CA_CERT = "[please specify]";
+
+ /** Name of the Token Issuer API, e.g. "requestAccessToken" */
+ public static final String TOKEN_ISSUER_API_NAME = "[please specify]";
+
+ /** Exptected Hostname/SNI in the token signing certificate */
+ public static final String TOKEN_ISSUER_HOST_NAME = "[please specify]";
+
+ /** Test account for instrumented tests */
+ public static final String DRC_TEST_EMAIL = "[please specify]";
+
+ /** Test account for instrumented tests */
+ public static final String DRC_TEST_PASSWORD = "[please specify]";
+}
diff --git a/soong/FirebaseApplication.java b/soong/FirebaseApplication.java
new file mode 100644
index 0000000..96860ca
--- /dev/null
+++ b/soong/FirebaseApplication.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2021 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.car.debuggingrestrictioncontroller;
+
+import android.app.Application;
+import com.google.firebase.FirebaseApp;
+import com.google.firebase.FirebaseOptions;
+
+/** Firebase credentials */
+public class FirebaseApplication extends Application {
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ FirebaseOptions options =
+ new FirebaseOptions.Builder()
+ .setApplicationId("[please specify]")
+ .setProjectId("[please specify]")
+ .setApiKey("[please specify]")
+ .build();
+ FirebaseApp.initializeApp(this, options);
+ }
+}
diff --git a/soong/README.md b/soong/README.md
new file mode 100644
index 0000000..a0da3bd
--- /dev/null
+++ b/soong/README.md
@@ -0,0 +1,7 @@
+The files in this directory are for building the app in the Android source tree.
+
+`FirebaseApplication.java` contains Firebase credentials that should be copied
+from `google-services.json`, which can be downloaded from the Firebase console.
+
+`BuildConfig.java` contains configuratuon for the root CA certificate and the
+token issuer API endpoint.