Merge "Added user icon and (device | profile) owner info on KitchenSink USER screen."
diff --git a/car-internal-lib/src/com/android/car/internal/ICarSystemServerClient.aidl b/car-internal-lib/src/com/android/car/internal/ICarSystemServerClient.aidl
index b05c272..405a637 100644
--- a/car-internal-lib/src/com/android/car/internal/ICarSystemServerClient.aidl
+++ b/car-internal-lib/src/com/android/car/internal/ICarSystemServerClient.aidl
@@ -18,6 +18,8 @@
import android.content.pm.UserInfo;
+import com.android.internal.os.IResultReceiver;
+
/**
* API to communicate from CarServiceHelperService to car service.
*/
@@ -49,4 +51,11 @@
* Notify to pre-create users.
*/
void preCreateUsers();
+
+ /**
+ * Notify that the device must be factory reset, so CarService can ask user to confirm.
+ *
+ * @param callback used to trigger the factory reset.
+ */
+ void onFactoryReset(IResultReceiver callback);
}
diff --git a/car-lib/api/system-current.txt b/car-lib/api/system-current.txt
index ee915f0..d70e079 100644
--- a/car-lib/api/system-current.txt
+++ b/car-lib/api/system-current.txt
@@ -63,6 +63,7 @@
field public static final String PERMISSION_READ_CAR_VENDOR_PERMISSION_INFO = "android.car.permission.READ_CAR_VENDOR_PERMISSION_INFO";
field public static final String PERMISSION_RECEIVE_CAR_AUDIO_DUCKING_EVENTS = "android.car.permission.RECEIVE_CAR_AUDIO_DUCKING_EVENTS";
field public static final String PERMISSION_STORAGE_MONITORING = "android.car.permission.STORAGE_MONITORING";
+ field public static final String PERMISSION_TEMPLATE_RENDERER = "android.car.permission.TEMPLATE_RENDERER";
field public static final String PERMISSION_TIRES = "android.car.permission.CAR_TIRES";
field public static final String PERMISSION_USE_CAR_WATCHDOG = "android.car.permission.USE_CAR_WATCHDOG";
field public static final String PERMISSION_VENDOR_EXTENSION = "android.car.permission.CAR_VENDOR_EXTENSION";
diff --git a/car-lib/src/android/car/Car.java b/car-lib/src/android/car/Car.java
index 152606e..f8e9d41 100644
--- a/car-lib/src/android/car/Car.java
+++ b/car-lib/src/android/car/Car.java
@@ -750,6 +750,16 @@
/** Type of car connection: platform runs directly in car. */
public static final int CONNECTION_TYPE_EMBEDDED = 5;
+ /**
+ * Permission necessary to be able to render template-based UI metadata on behalf of another
+ * application.
+ *
+ * @hide
+ */
+ @SystemApi
+ public static final String PERMISSION_TEMPLATE_RENDERER =
+ "android.car.permission.TEMPLATE_RENDERER";
+
/** @hide */
@IntDef({CONNECTION_TYPE_EMBEDDED})
@Retention(RetentionPolicy.SOURCE)
diff --git a/cpp/watchdog/server/Android.bp b/cpp/watchdog/server/Android.bp
index f98dfe2..72c623a 100644
--- a/cpp/watchdog/server/Android.bp
+++ b/cpp/watchdog/server/Android.bp
@@ -20,6 +20,7 @@
"-Werror",
"-Wno-unused-variable",
"-Wunused-parameter",
+ "-Wno-error=deprecated",
],
include_dirs: [
"system/libbase/include",
diff --git a/packages/CarDeveloperOptions/Android.bp b/packages/CarDeveloperOptions/Android.bp
index c50925e..82a1844 100644
--- a/packages/CarDeveloperOptions/Android.bp
+++ b/packages/CarDeveloperOptions/Android.bp
@@ -30,4 +30,8 @@
optimize: {
proguard_flags_files: ["proguard.flags"],
},
+
+ // TODO(b/176240706): "org.apache.http.legacy" is used by Settings-core,
+ // get rid of this dependency and remove the "uses_libs" property.
+ uses_libs: ["org.apache.http.legacy"],
}
diff --git a/service/AndroidManifest.xml b/service/AndroidManifest.xml
index af7c387..d239d8e 100644
--- a/service/AndroidManifest.xml
+++ b/service/AndroidManifest.xml
@@ -812,6 +812,15 @@
android:label="@string/car_permission_label_control_car_power_policy"
android:description="@string/car_permission_desc_control_car_power_policy"/>
+ <!-- Allows an application to render template-based UI metadata on behalf of another
+ application.
+ <p>Protection level: signature|privileged
+ -->
+ <permission android:name="android.car.permission.TEMPLATE_RENDERER"
+ android:protectionLevel="signature|privileged"
+ android:label="@string/car_permission_label_template_renderer"
+ android:description="@string/car_permission_desc_template_renderer"/>
+
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.DEVICE_POWER"/>
<uses-permission android:name="android.permission.GRANT_RUNTIME_PERMISSIONS"/>
@@ -835,6 +844,8 @@
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.PROVIDE_TRUST_AGENT"/>
<uses-permission android:name="android.permission.READ_LOGS"/>
+ <!-- Used by NotificationHelper to change the notifications app name -->
+ <uses-permission android:name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME"/>
<application android:label="@string/app_title"
android:directBootAware="true"
@@ -880,5 +891,11 @@
android:exported="false"
android:launchMode="singleTask">
</activity>
+ <activity android:name="com.android.car.ui.FactoryResetActivity"
+ android:excludeFromRecents="true"
+ android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
+ android:exported="false"
+ android:launchMode="singleTask">
+ </activity>
</application>
</manifest>
diff --git a/service/res/layout/factory_reset.xml b/service/res/layout/factory_reset.xml
new file mode 100644
index 0000000..d848c6b
--- /dev/null
+++ b/service/res/layout/factory_reset.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2020 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.
+-->
+<FrameLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <!-- TODO(b/171603586): overall improvement on layout like background color, width, and other
+ properties copy-and-pased from blocking activity, plus the right messages -->
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@color/activity_blocking_activity_background"
+ android:gravity="center"
+ android:orientation="vertical">
+
+ <TextView
+ android:layout_width="@dimen/blocking_text_width"
+ android:layout_height="wrap_content"
+ android:textAppearance="@style/ActivityBlockingActivityText"
+ android:text="@string/factory_reset_full_text"
+ android:gravity="center"/>
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="48dp"
+ android:layout_gravity="center"
+ android:gravity="center_horizontal"
+ android:orientation="horizontal">
+ <Button
+ android:id="@+id/factory_reset_now_button"
+ android:text="@string/factory_reset_now"
+ style="@style/ButtonStyle" />
+ <Button
+ android:id="@+id/factory_reset_later_button"
+ android:text="@string/factory_reset_later"
+ style="@style/ButtonStyle" />
+ </LinearLayout>
+
+ </LinearLayout>
+
+</FrameLayout>
diff --git a/service/res/values-af/strings.xml b/service/res/values-af/strings.xml
index 5906804..600cc33 100644
--- a/service/res/values-af/strings.xml
+++ b/service/res/values-af/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Aktiveer of deaktiveer motor se kenmerke."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"gebruik motorwaghond"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Gebruik motorwaghond."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"lees motorkragbeleid"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Lees motorkragbeleid."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"beheer motorkragbeleid"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Beheer motorkragbeleid."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"My Toestel"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Gas"</string>
</resources>
diff --git a/service/res/values-ar/strings.xml b/service/res/values-ar/strings.xml
index 9f32641..9920c9a 100644
--- a/service/res/values-ar/strings.xml
+++ b/service/res/values-ar/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"تفعيل ميزات السيارة أو إيقافها"</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"استخدام مراقب نظام السيارة"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"استخدام مراقب نظام السيارة"</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"قراءة سياسة تشغيل ميزات السيارة"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"قراءة سياسة تشغيل ميزات السيارة"</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"التحكّم في سياسة تشغيل ميزات السيارة"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"التحكُّم في سياسة تشغيل ميزات السيارة"</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"جهازي"</string>
<string name="default_guest_name" msgid="2912812799433131476">"ضيف"</string>
</resources>
diff --git a/service/res/values-as/strings.xml b/service/res/values-as/strings.xml
index 84c5abe..49eb40e 100644
--- a/service/res/values-as/strings.xml
+++ b/service/res/values-as/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"গাড়ীৰ সুবিধাসমূহ সক্ষম অথবা অক্ষম কৰক।"</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"গাড়ীৰ ৱাচ্ডগ ব্যৱহাৰ কৰক"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"গাড়ীৰ ৱাচ্ডগ ব্যৱহাৰ কৰক।"</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"গাড়ীৰ পাৱাৰ পলিচী পঢ়ে"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"গাড়ীৰ পাৱাৰ পলিচী পঢ়ে।"</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"গাড়ীৰ পাৱাৰ পলিচী নিয়ন্ত্ৰণ কৰে"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"গাড়ীৰ পাৱাৰ পলিচী নিয়ন্ত্ৰণ কৰে।"</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"মোৰ ডিভাইচ"</string>
<string name="default_guest_name" msgid="2912812799433131476">"অতিথি"</string>
</resources>
diff --git a/service/res/values-az/strings.xml b/service/res/values-az/strings.xml
index c6c0070..0ff407f 100644
--- a/service/res/values-az/strings.xml
+++ b/service/res/values-az/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Avtomobilin xüsusiyyətlərini aktiv və ya deaktiv etmək."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"avtomobil keşikçisindən istifadə edin"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Avtomobil keşikçisindən istifadə edin."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"avtomobilin enerji siyasətini oxuya bilir"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Avtomobilin enerji siyasətini oxuya bilir."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"avtomobilin enerji siyasətini idarə edə bilir"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Avtomobilin enerji siyasətini idarə edə bilir."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Cihazım"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Qonaq"</string>
</resources>
diff --git a/service/res/values-be/strings.xml b/service/res/values-be/strings.xml
index 3ee7b8b..b295897 100644
--- a/service/res/values-be/strings.xml
+++ b/service/res/values-be/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Уключыць або выключыць функцыі аўтамабіля."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"выкарыстанне вартавога таймера аўтамабіля"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Выкарыстанне вартавога таймера аўтамабіля."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"атрымаць інфармацыю пра палітыку сілкавання аўтамабіля"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Атрымаць інфармацыю пра палітыку сілкавання аўтамабіля"</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"кіраваць палітыкай сілкавання аўтамабіля."</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Кіраваць палітыкай сілкавання аўтамабіля."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Мая прылада"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Госць"</string>
</resources>
diff --git a/service/res/values-bn/strings.xml b/service/res/values-bn/strings.xml
index 88831d0..44262fb 100644
--- a/service/res/values-bn/strings.xml
+++ b/service/res/values-bn/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"গাড়ির ফিচার চালু বা বন্ধ করুন।"</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"গাড়ির ওয়াচডগ ফিচারটি ব্যবহার করুন"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"গাড়ির ওয়াচডগ ফিচারটি ব্যবহার করুন।"</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"গাড়ির পাওয়ার নীতি পড়ুন"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"গাড়ির পাওয়ার নীতি পড়ুন।"</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"গাড়ির পাওয়ার নীতি নিয়ন্ত্রণ করুন"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"গাড়ির পাওয়ার নীতি নিয়ন্ত্রণ করুন।"</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"আমার ডিভাইস"</string>
<string name="default_guest_name" msgid="2912812799433131476">"অতিথি"</string>
</resources>
diff --git a/service/res/values-ca/strings.xml b/service/res/values-ca/strings.xml
index ef14b02..05869ab 100644
--- a/service/res/values-ca/strings.xml
+++ b/service/res/values-ca/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Activa o desactiva les funcions del cotxe."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"utilitza el temporitzador de vigilància del cotxe"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Utilitza el temporitzador de vigilància del cotxe."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"llegeix la política d\'energia del cotxe"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Llegeix la política d\'energia del cotxe."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"controla la política d\'energia del cotxe"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Controla la política d\'energia del cotxe."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"El meu dispositiu"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Convidat"</string>
</resources>
diff --git a/service/res/values-cs/strings.xml b/service/res/values-cs/strings.xml
index d6a4d17..d0a3fbe 100644
--- a/service/res/values-cs/strings.xml
+++ b/service/res/values-cs/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Zapnout nebo vypnout funkce auta."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"používat sledování auta"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Používat sledování auta."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"čtení zásad pro napájení komponentů auta"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Čtení zásad pro napájení komponentů auta."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"ovládání zásad pro napájení komponentů auta"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Ovládání zásad pro napájení komponentů auta."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Moje zařízení"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Host"</string>
</resources>
diff --git a/service/res/values-da/strings.xml b/service/res/values-da/strings.xml
index 60d206b..d9a7f19 100644
--- a/service/res/values-da/strings.xml
+++ b/service/res/values-da/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Aktivér eller deaktiver bilens funktioner."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"brug bilens watchdog"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Brug bilens watchdog."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"læs bilens politik for aktivering af komponenter"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Læs bilens politik for aktivering af komponenter."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"styr bilens politik for aktivering af komponenter"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Styr bilens politik for aktivering af komponenter."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Min enhed"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Gæst"</string>
</resources>
diff --git a/service/res/values-de/strings.xml b/service/res/values-de/strings.xml
index ed7b295..07a17de 100644
--- a/service/res/values-de/strings.xml
+++ b/service/res/values-de/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Funktionen des Autos aktivieren oder deaktivieren."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"Watchdog im Auto verwenden"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Watchdog im Auto verwenden."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"Richtlinie zur Stromversorgung von Komponenten im Auto lesen"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Richtlinie zur Stromversorgung von Komponenten im Auto lesen."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"Richtlinie zur Stromversorgung von Komponenten im Auto steuern"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Richtlinie zur Stromversorgung von Komponenten im Auto steuern."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Mein Gerät"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Gast"</string>
</resources>
diff --git a/service/res/values-el/strings.xml b/service/res/values-el/strings.xml
index c5afbcd..1610e00 100644
--- a/service/res/values-el/strings.xml
+++ b/service/res/values-el/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Ενεργοποίηση ή απενεργοποίηση των λειτουργιών του αυτοκινήτου."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"χρήση watchdog αυτοκινήτου"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Χρήση watchdog αυτοκινήτου."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"ανάγνωση πολιτικής ισχύος αυτοκινήτου"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Ανάγνωση πολιτικής ισχύος αυτοκινήτου."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"έλεγχος πολιτικής ισχύος αυτοκινήτου"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Έλεγχος πολιτικής ισχύος αυτοκινήτου."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Η συσκευή μου"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Επισκέπτης"</string>
</resources>
diff --git a/service/res/values-es-rUS/strings.xml b/service/res/values-es-rUS/strings.xml
index 50f9c8c..25c3f5c 100644
--- a/service/res/values-es-rUS/strings.xml
+++ b/service/res/values-es-rUS/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Habilitar o inhabilitar las funciones del vehículo"</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"usar perro guardián del vehículo"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Usar perro guardián del vehículo"</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"leer política de activación de componentes del vehículo"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Lee la política de activación de componentes del vehículo."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"controlar política de activación de componentes del vehículo"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Controla la política de activación de componentes del vehículo."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Mi dispositivo"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Invitado"</string>
</resources>
diff --git a/service/res/values-eu/strings.xml b/service/res/values-eu/strings.xml
index 3237bad..83b5630 100644
--- a/service/res/values-eu/strings.xml
+++ b/service/res/values-eu/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Gaitu edo desgaitu autoaren eginbideak."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"erabili autoaren softwarea zaintzeko sistema"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Erabili autoaren softwarea zaintzeko sistema."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"irakurri autoaren osagaiak aktibatzeko gidalerroak"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Irakurri autoaren osagaiak aktibatzeko gidalerroak."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"kontrolatu autoaren osagaiak aktibatzeko gidalerroak"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Kontrolatu autoaren osagaiak aktibatzeko gidalerroak."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Nire gailua"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Gonbidatua"</string>
</resources>
diff --git a/service/res/values-fa/strings.xml b/service/res/values-fa/strings.xml
index 40a5728..5b7e065 100644
--- a/service/res/values-fa/strings.xml
+++ b/service/res/values-fa/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"ویژگیهای خودرو را فعال یا غیرفعال کنید."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"استفاده از زمانسنج مراقب خودرو"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"استفاده از زمانسنج مراقب خودرو"</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"خواندن خطمشی روشن/خاموش شدن مؤلفههای خودرو"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"خواندن خطمشی روشن/خاموش شدن مؤلفههای خودرو."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"کنترل خطمشی روشن/خاموش شدن مؤلفههای خودرو"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"کنترل خطمشی روشن/خاموش شدن مؤلفههای خودرو."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"دستگاه من"</string>
<string name="default_guest_name" msgid="2912812799433131476">"مهمان"</string>
</resources>
diff --git a/service/res/values-fi/strings.xml b/service/res/values-fi/strings.xml
index 8b7bd1a..61e2af3 100644
--- a/service/res/values-fi/strings.xml
+++ b/service/res/values-fi/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Ota auton ominaisuuksia käyttöön tai poista niitä käytöstä."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"käytä auton vauhtiajastinta"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Käytä auton vauhtiajastinta."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"nähdä auton virtakäytännön"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Näkee auton virtakäytännön"</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"ohjata auton virtakäytäntöä"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Ohjaa auton virtakäytäntöä"</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Oma laite"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Vieras"</string>
</resources>
diff --git a/service/res/values-fr/strings.xml b/service/res/values-fr/strings.xml
index 423b6ea..11e9d0c 100644
--- a/service/res/values-fr/strings.xml
+++ b/service/res/values-fr/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Activez ou désactivez les fonctionnalités de la voiture."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"utiliser le watchdog de la voiture"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Utiliser le watchdog de la voiture."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"lire la règle d\'activation pour la voiture"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Lisez la règle d\'activation pour la voiture."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"contrôler la règle d\'activation pour la voiture"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Contrôlez la règle d\'activation pour la voiture."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Mon appareil"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Invité"</string>
</resources>
diff --git a/service/res/values-gu/strings.xml b/service/res/values-gu/strings.xml
index cac3506..addf442 100644
--- a/service/res/values-gu/strings.xml
+++ b/service/res/values-gu/strings.xml
@@ -144,6 +144,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"કારની સુવિધા ચાલુ અથવા બંધ કરો."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"કાર વૉચડોગ સુવિધાનો ઉપયોગ કરો"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"કાર વૉચડોગ સુવિધાનો ઉપયોગ કરો."</string>
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"કારની સુવિધાઓ ચાલુ/બંધ રહેવા વિશેની નીતિ વાંચો"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"કારની સુવિધાઓ ચાલુ/બંધ રહેવા વિશેની નીતિ વાંચો."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"કારની સુવિધાઓ ચાલુ/બંધ રહેવા વિશેની નીતિને નિયંત્રિત કરો"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"કારની સુવિધાઓ ચાલુ/બંધ રહેવા વિશેની નીતિને નિયંત્રિત કરો."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"મારું ડિવાઇસ"</string>
<string name="default_guest_name" msgid="2912812799433131476">"અતિથિ"</string>
</resources>
diff --git a/service/res/values-hi/strings.xml b/service/res/values-hi/strings.xml
index e6f5926..ea67e84 100644
--- a/service/res/values-hi/strings.xml
+++ b/service/res/values-hi/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"कार की सुविधाएं चालू या बंद करें."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"कार के वॉचडॉग का इस्तेमाल करें"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"कार के वॉचडॉग का इस्तेमाल करें."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"कार पावर नीति पढ़ें"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"कार पावर नीति पढ़ें."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"कार पावर नीति कंट्रोल करें"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"कार पावर नीति कंट्रोल करें."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"मेरा डिवाइस"</string>
<string name="default_guest_name" msgid="2912812799433131476">"मेहमान"</string>
</resources>
diff --git a/service/res/values-in/strings.xml b/service/res/values-in/strings.xml
index e3c6255..9492d3f 100644
--- a/service/res/values-in/strings.xml
+++ b/service/res/values-in/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Aktifkan atau nonaktifkan fitur mobil."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"gunakan watchdog mobil"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Gunakan watchdog mobil."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"baca kebijakan daya mobil"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Baca kebijakan daya mobil."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"kontrol kebijakan daya mobil"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Kontrol kebijakan daya mobil."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Perangkat Saya"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Tamu"</string>
</resources>
diff --git a/service/res/values-is/strings.xml b/service/res/values-is/strings.xml
index 24b70f9..178042c 100644
--- a/service/res/values-is/strings.xml
+++ b/service/res/values-is/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Kveikja eða slökkva á bíleiginleikum."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"nota bílaeftirlitsaðila"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Nota bílaeftirlitsaðila."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"lesa ræsistýringar bíls"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Lesa ræsistýringar bíls."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"stjórna ræsistýringum bíls"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Stjórna ræsistýringum bíls."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Tækið mitt"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Gestur"</string>
</resources>
diff --git a/service/res/values-iw/strings.xml b/service/res/values-iw/strings.xml
index 5adbe0c..78a0e3e 100644
--- a/service/res/values-iw/strings.xml
+++ b/service/res/values-iw/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"הפעלה או השבתה של תכונות המכונית."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"שימוש בטיימר המפקח (watchdog) של המכונית"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"שימוש בטיימר המפקח (watchdog) של המכונית."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"קריאת מדיניות הזנת המתח של הרכב"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"קריאת מדיניות הזנת המתח של הרכב."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"שליטה במדיניות הזנת המתח של הרכב"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"שליטה במדיניות הזנת המתח של הרכב."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"המכשיר שלי"</string>
<string name="default_guest_name" msgid="2912812799433131476">"אורח"</string>
</resources>
diff --git a/service/res/values-ka/strings.xml b/service/res/values-ka/strings.xml
index 6ca766e..6efa8d3 100644
--- a/service/res/values-ka/strings.xml
+++ b/service/res/values-ka/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"მანქანის ფუნქციების ჩართვა ან გათიშვა."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"მანქანის დაცვის მოწყობილობის გამოყენება"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"მანქანის დაცვის მოწყობილობის გამოყენება."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"კითხულობს მანქანაში კომპონენტების ჩართვის წესებს"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"კითხულობს მანქანაში კომპონენტების ჩართვის წესებს."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"აკონტროლებს მანქანაში კომპონენტების ჩართვის წესებს"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"აკონტროლებს მანქანაში კომპონენტების ჩართვის წესებს."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"ჩემი მოწყობილობა"</string>
<string name="default_guest_name" msgid="2912812799433131476">"სტუმარი"</string>
</resources>
diff --git a/service/res/values-kn/strings.xml b/service/res/values-kn/strings.xml
index 4c76f84..3071101 100644
--- a/service/res/values-kn/strings.xml
+++ b/service/res/values-kn/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"ಕಾರ್ ಫೀಚರ್ಗಳನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಿ ಅಥವಾ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಿ."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"ಕಾರ್ ಮಾನಿಟರಿಂಗ್ ಟೈಮರ್ ಬಳಸಿ"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"ಕಾರ್ ಮಾನಿಟರಿಂಗ್ ಟೈಮರ್ ಬಳಸಿ."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"ಕಾರಿನ ಪವರ್ ನೀತಿಯನ್ನು ಓದಿ"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"ಕಾರಿನ ಪವರ್ ನೀತಿಯನ್ನು ಓದಿ."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"ಕಾರಿನ ಪವರ್ ನೀತಿಯನ್ನು ನಿಯಂತ್ರಿಸಿ"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"ಕಾರಿನ ಪವರ್ ನೀತಿಯನ್ನು ನಿಯಂತ್ರಿಸಿ."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"ನನ್ನ ಸಾಧನ"</string>
<string name="default_guest_name" msgid="2912812799433131476">"ಅತಿಥಿ"</string>
</resources>
diff --git a/service/res/values-lt/strings.xml b/service/res/values-lt/strings.xml
index 2a09aa9..827ae39 100644
--- a/service/res/values-lt/strings.xml
+++ b/service/res/values-lt/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Įgalinkite arba išjunkite automobilio funkcijas."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"naudoti automobilio apsauginį laikmatį"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Naudoti automobilio apsauginį laikmatį."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"skaityti automobilio komponentų suaktyvinimo politiką"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Skaityti automobilio komponentų suaktyvinimo politiką."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"valdyti automobilio komponentų suaktyvinimo politiką"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Valdyti automobilio komponentų suaktyvinimo politiką."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Mano įrenginys"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Svečias"</string>
</resources>
diff --git a/service/res/values-lv/strings.xml b/service/res/values-lv/strings.xml
index c9def3e..abc283d 100644
--- a/service/res/values-lv/strings.xml
+++ b/service/res/values-lv/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Iespējojiet vai atspējojiet automašīnas funkcijas."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"izmantot automašīnas sargierīci"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Izmantot automašīnas sargierīci."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"nolasīt automašīnas komponentu aktivizācijas politiku"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Nolasīt automašīnas komponentu aktivizācijas politiku."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"kontrolēt automašīnas komponentu aktivizācijas politiku"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Kontrolēt automašīnas komponentu aktivizācijas politiku."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Mana ierīce"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Viesis"</string>
</resources>
diff --git a/service/res/values-ml/strings.xml b/service/res/values-ml/strings.xml
index f650a99..ba78959 100644
--- a/service/res/values-ml/strings.xml
+++ b/service/res/values-ml/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"കാറിന്റെ ഫീച്ചറുകൾ പ്രവർത്തനക്ഷമമോ പ്രവർത്തനരഹിതമോ ആക്കുക."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"കാർ പരിശോധനാ സിസ്റ്റം ഉപയോഗിക്കുക"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"കാർ പരിശോധനാ സിസ്റ്റം ഉപയോഗിക്കുക."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"കാറിന്റെ പവർ പോളിസി വായിക്കുക"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"കാറിന്റെ പവർ പോളിസി വായിക്കുക."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"കാറിന്റെ പവർ പോളിസി നിയന്ത്രിക്കുക"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"കാറിന്റെ പവർ പോളിസി നിയന്ത്രിക്കുക."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"എന്റെ ഉപകരണം"</string>
<string name="default_guest_name" msgid="2912812799433131476">"അതിഥി"</string>
</resources>
diff --git a/service/res/values-mr/strings.xml b/service/res/values-mr/strings.xml
index fff3176..434c62d 100644
--- a/service/res/values-mr/strings.xml
+++ b/service/res/values-mr/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"कारची वैशिष्ट्ये सुरू किंवा बंद करा."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"कार वॉचडॉग वापरा"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"कार वॉचडॉग वापरा."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"कार पॉवर धोरण वाचा"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"कार पॉवर धोरण वाचा."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"कार पॉवर धोरण नियंत्रित करा"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"कार पॉवर धोरण नियंत्रित करा."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"माझे डिव्हाइस"</string>
<string name="default_guest_name" msgid="2912812799433131476">"अतिथी"</string>
</resources>
diff --git a/service/res/values-ne/strings.xml b/service/res/values-ne/strings.xml
index 31f983f..3f594c4 100644
--- a/service/res/values-ne/strings.xml
+++ b/service/res/values-ne/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"कारका सुविधाहरू सक्षम वा असक्षम पार्नुहोस्।"</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"कारको प्रणालीको निगरानी गर्ने सुविधा प्रयोग गर्नुहोस्"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"कारको प्रणालीको निगरानी गर्ने सुविधा प्रयोग गर्नुहोस्"</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"कारको पावरसम्बन्धी नीति पढ्नुहोस्"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"कारको पावरसम्बन्धी नीति पढ्नुहोस्।"</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"कारको पावरसम्बन्धी नीति नियन्त्रण गर्नुहोस्"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"कारको पावरसम्बन्धी नीति नियन्त्रण गर्नुहोस्।"</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"मेरो यन्त्र"</string>
<string name="default_guest_name" msgid="2912812799433131476">"अतिथि"</string>
</resources>
diff --git a/service/res/values-pa/strings.xml b/service/res/values-pa/strings.xml
index 01d5ede..145b2ba 100644
--- a/service/res/values-pa/strings.xml
+++ b/service/res/values-pa/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"ਕਾਰ ਦੀਆਂ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਨੂੰ ਚਾਲੂ ਜਾਂ ਬੰਦ ਕਰੋ।"</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"ਕਾਰ ਵਾਚਡੌਗ ਵਰਤੋ"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"ਕਾਰ ਵਾਚਡੌਗ ਵਰਤੋ।"</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"ਕਾਰ ਪਾਵਰ ਨੀਤੀ ਨੂੰ ਪੜ੍ਹੋ"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"ਕਾਰ ਪਾਵਰ ਨੀਤੀ ਨੂੰ ਪੜ੍ਹੋ।"</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"ਕਾਰ ਪਾਵਰ ਨੀਤੀ ਨੂੰ ਕੰਟਰੋਲ ਕਰੋ"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"ਕਾਰ ਪਾਵਰ ਨੀਤੀ ਨੂੰ ਕੰਟਰੋਲ ਕਰੋ।"</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"ਮੇਰਾ ਡੀਵਾਈਸ"</string>
<string name="default_guest_name" msgid="2912812799433131476">"ਮਹਿਮਾਨ"</string>
</resources>
diff --git a/service/res/values-ro/strings.xml b/service/res/values-ro/strings.xml
index 304ad36..802fdfd 100644
--- a/service/res/values-ro/strings.xml
+++ b/service/res/values-ro/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Activați sau dezactivați funcțiile mașinii."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"folosiți ceasul de gardă al mașinii"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Folosiți ceasul de gardă al mașinii."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"citiți politica pentru încărcarea mașinii"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Citiți politica pentru încărcarea mașinii."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"controlați politica pentru încărcarea mașinii"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Controlați politica pentru încărcarea mașinii."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Dispozitivul meu"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Invitat"</string>
</resources>
diff --git a/service/res/values-ru/strings.xml b/service/res/values-ru/strings.xml
index 61030ca..4b9a44f 100644
--- a/service/res/values-ru/strings.xml
+++ b/service/res/values-ru/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Включение и отключение функций автомобиля."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"использование системы мониторинга автомобиля"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Использование системы мониторинга автомобиля."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"чтение правила о питании автомобиля"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Чтение правила о питании автомобиля."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"управление правилом о питании автомобиля"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Управление правилом о питании автомобиля."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Мое устройство"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Гость"</string>
</resources>
diff --git a/service/res/values-sk/strings.xml b/service/res/values-sk/strings.xml
index 75ccd30..50d1ce6 100644
--- a/service/res/values-sk/strings.xml
+++ b/service/res/values-sk/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Povoľte alebo zakážte funkcie auta."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"používať strážcu prevádzky auta"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Používať strážcu prevádzky auta."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"čítanie pravidiel pre napájanie komponentov auta"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Čítanie pravidiel pre napájanie komponentov auta."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"ovládanie pravidiel pre napájanie komponentov auta"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Ovládanie pravidiel pre napájanie komponentov auta."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Moje zariadenie"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Hosť"</string>
</resources>
diff --git a/service/res/values-sl/strings.xml b/service/res/values-sl/strings.xml
index f2a43e2..1f90b9e 100644
--- a/service/res/values-sl/strings.xml
+++ b/service/res/values-sl/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Omogočanje ali onemogočanje funkcij avtomobila."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"uporaba avtomobilskega nadzornika"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Uporaba avtomobilskega nadzornika."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"branje pravilnika o delovanju komponent v avtomobilu"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Branje pravilnika o delovanju komponent v avtomobilu."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"nadziranje pravilnika o delovanju komponent v avtomobilu"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Nadziranje pravilnika o delovanju komponent v avtomobilu."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Moja naprava"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Gost"</string>
</resources>
diff --git a/service/res/values-sq/strings.xml b/service/res/values-sq/strings.xml
index 7093069..5dc74df 100644
--- a/service/res/values-sq/strings.xml
+++ b/service/res/values-sq/strings.xml
@@ -145,14 +145,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Aktivizo ose çaktivizo veçoritë e makinës."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"përdor monitoruesin e makinës"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Përdor monitoruesin e makinës."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"lexo politikën e makinës për aktivizimin"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Lexo politikën e makinës për aktivizimin."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"kontrollo politikën e makinës për aktivizimin"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Kontrollo politikën e makinës për aktivizimin."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Pajisja ime"</string>
<string name="default_guest_name" msgid="2912812799433131476">"I ftuar"</string>
</resources>
diff --git a/service/res/values-sv/strings.xml b/service/res/values-sv/strings.xml
index 63e2e0d..6c66c3e 100644
--- a/service/res/values-sv/strings.xml
+++ b/service/res/values-sv/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Aktivera eller inaktivera funktioner i bilen."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"använd vakthund för bilen"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Använd vakthund för bilen."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"läsa av principer för bilens laddning"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Läs av principer för bilens laddning."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"styra principer för bilens laddning"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Styr principer för bilens laddning."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Min enhet"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Gäst"</string>
</resources>
diff --git a/service/res/values-sw/strings.xml b/service/res/values-sw/strings.xml
index 450ac4d..be9d5ad 100644
--- a/service/res/values-sw/strings.xml
+++ b/service/res/values-sw/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Washa au uzime vipengele vya gari."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"tumia kipengele cha kulinda gari"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Tumia kipengele cha kulinda gari."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"soma sera ya nishati ya gari"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Soma sera ya nishati ya gari."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"dhibiti sera ya nishati ya gari"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Dhibiti sera ya nishati ya gari."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Kifaa Changu"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Mgeni"</string>
</resources>
diff --git a/service/res/values-uk/strings.xml b/service/res/values-uk/strings.xml
index b10565b..25cd1ac 100644
--- a/service/res/values-uk/strings.xml
+++ b/service/res/values-uk/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Вмикати чи вимикати функції автомобіля"</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"використовувати сторожовий таймер автомобіля"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Використовувати сторожовий таймер автомобіля."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"читати правила щодо ввімкнення компонентів автомобіля"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Читати правила щодо ввімкнення компонентів автомобіля."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"керувати правилами щодо ввімкнення компонентів автомобіля"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Керувати правилами щодо ввімкнення компонентів автомобіля."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Мій пристрій"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Гість"</string>
</resources>
diff --git a/service/res/values-ur/strings.xml b/service/res/values-ur/strings.xml
index 5fe0f7c..f727db6 100644
--- a/service/res/values-ur/strings.xml
+++ b/service/res/values-ur/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"کار کی خصوصیات کو فعال یا غیر فعال کریں۔"</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"کار کے واچ ڈاگ کا ستعمال کریں"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"کار کے واچ ڈاگ کا ستعمال کریں۔"</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"کار کے پاور کی پالیسی کو پڑھیں"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"کار کے پاور کی پالیسی کو پڑھیں۔"</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"کار کے پاور کی پالیسی کو کنٹرول کریں"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"کار کے پاور کی پالیسی کو کنٹرول کریں۔"</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"میرا آلہ"</string>
<string name="default_guest_name" msgid="2912812799433131476">"مہمان"</string>
</resources>
diff --git a/service/res/values-vi/strings.xml b/service/res/values-vi/strings.xml
index fb79957..13f8fb3 100644
--- a/service/res/values-vi/strings.xml
+++ b/service/res/values-vi/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"Bật hoặc tắt các tính năng của ô tô."</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"dùng dịch vụ theo dõi tình trạng xe"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"Dùng dịch vụ theo dõi tình trạng xe."</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"đọc nguyên tắc sử dụng điện của ô tô"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"Đọc nguyên tắc sử dụng điện của ô tô."</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"kiểm soát nguyên tắc sử dụng điện của ô tô"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"Kiểm soát nguyên tắc sử dụng điện của ô tô."</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"Thiết bị của tôi"</string>
<string name="default_guest_name" msgid="2912812799433131476">"Khách"</string>
</resources>
diff --git a/service/res/values-zh-rCN/strings.xml b/service/res/values-zh-rCN/strings.xml
index 87f3418..70bcccc 100644
--- a/service/res/values-zh-rCN/strings.xml
+++ b/service/res/values-zh-rCN/strings.xml
@@ -143,14 +143,10 @@
<string name="car_permission_desc_control_car_features" msgid="7646711104530599901">"启用或停用汽车的功能。"</string>
<string name="car_permission_label_use_car_watchdog" msgid="6973938293170413475">"使用汽车监控定时器"</string>
<string name="car_permission_desc_use_car_watchdog" msgid="8244592601805516086">"使用汽车监控定时器。"</string>
- <!-- no translation found for car_permission_label_read_car_power_policy (4597484321338979324) -->
- <skip />
- <!-- no translation found for car_permission_desc_read_car_power_policy (5430714179790601808) -->
- <skip />
- <!-- no translation found for car_permission_label_control_car_power_policy (6840069695926008330) -->
- <skip />
- <!-- no translation found for car_permission_desc_control_car_power_policy (8565782440893507028) -->
- <skip />
+ <string name="car_permission_label_read_car_power_policy" msgid="4597484321338979324">"读取汽车电源政策"</string>
+ <string name="car_permission_desc_read_car_power_policy" msgid="5430714179790601808">"读取汽车电源政策。"</string>
+ <string name="car_permission_label_control_car_power_policy" msgid="6840069695926008330">"控制汽车电源政策"</string>
+ <string name="car_permission_desc_control_car_power_policy" msgid="8565782440893507028">"控制汽车电源政策。"</string>
<string name="trust_device_default_name" msgid="4213625926070261253">"我的设备"</string>
<string name="default_guest_name" msgid="2912812799433131476">"访客"</string>
</resources>
diff --git a/service/res/values/strings.xml b/service/res/values/strings.xml
index 3d22181..4cdc7cc 100644
--- a/service/res/values/strings.xml
+++ b/service/res/values/strings.xml
@@ -493,9 +493,25 @@
<!-- Permission text: apps control car power policy [CHAR LIMIT=NONE] -->
<string name="car_permission_desc_control_car_power_policy">Control car power policy.</string>
+ <!-- Permission text: app can render templates provided by another app [CHAR LIMIT=NONE] -->
+ <string name="car_permission_label_template_renderer">render templates</string>
+ <!-- Permission text: app can render templates provided by another app [CHAR LIMIT=NONE] -->
+ <string name="car_permission_desc_template_renderer">Render templates.</string>
+
<!-- The default name of device enrolled as trust device [CHAR LIMIT=NONE] -->
<string name="trust_device_default_name">My Device</string>
<!-- Default name for new guest users [CHAR LIMIT=20] -->
<string name="default_guest_name">Guest</string>
+
+ <!-- Name of the high-importance notification channel [CHAR LIMIT=40] -->
+ <string name="importance_high">High importance</string>
+
+ <!-- TODO(b/171603586): once the strings below are properly defined, remove translatable=false and add proper description / CHAR_LIMIT -->
+ <string name="factory_reset_notification_title" translatable="false">Factory reset</string>
+ <string name="factory_reset_notification_text" translatable="false">A factory reset is imminent</string>
+ <string name="factory_reset_full_text" translatable="false">A factory reset is imminent, if you don\'t accept it now, it will be automatically done after reboot.\n\nDo you want to factory reset now?</string>
+ <string name="factory_reset_now" translatable="false">Now</string>
+ <string name="factory_reset_later" translatable="false">Later</string>
+
</resources>
diff --git a/service/src/com/android/car/CarShellCommand.java b/service/src/com/android/car/CarShellCommand.java
index e9443e3..37e7df9 100644
--- a/service/src/com/android/car/CarShellCommand.java
+++ b/service/src/com/android/car/CarShellCommand.java
@@ -148,6 +148,9 @@
"set-user-auth-association";
private static final String COMMAND_DEFINE_POWER_POLICY = "define-power-policy";
private static final String COMMAND_APPLY_POWER_POLICY = "apply-power-policy";
+ private static final String COMMAND_POWER_OFF = "power-off";
+ private static final String POWER_OFF_SKIP_GARAGEMODE = "--skip-garagemode";
+ private static final String POWER_OFF_SHUTDOWN = "--shutdown";
private static final String COMMAND_EMULATE_DRIVING_STATE = "emulate-driving-state";
private static final String DRIVING_STATE_DRIVE = "drive";
@@ -467,7 +470,7 @@
pw.printf("\t%s [%s|%s|%s]\n", COMMAND_EMULATE_DRIVING_STATE, DRIVING_STATE_DRIVE,
DRIVING_STATE_PARK, DRIVING_STATE_REVERSE);
- pw.println("\t Emulates the giving driving state");
+ pw.println("\t Emulates the giving driving state.");
pw.printf("\t%s <POLICY_ID> [--enable COMP1,COMP2,...] [--disable COMP1,COMP2,...]\n",
COMMAND_DEFINE_POWER_POLICY);
@@ -475,9 +478,13 @@
pw.println("\t are unchanged when the policy is applied.");
pw.println("\t Components should be comma-separated without space.");
- pw.printf("\t%s <POLICY_ID>", COMMAND_APPLY_POWER_POLICY);
+ pw.printf("\t%s <POLICY_ID>\n", COMMAND_APPLY_POWER_POLICY);
pw.println("\t Applies power policy which is defined in /vendor/etc/power_policy.xml or");
pw.printf("\t by %s command\n", COMMAND_DEFINE_POWER_POLICY);
+
+ pw.printf("\t%s [%s] [%s]\n", COMMAND_POWER_OFF, POWER_OFF_SKIP_GARAGEMODE,
+ POWER_OFF_SHUTDOWN);
+ pw.println("\t Powers off the car.");
}
private static int showInvalidArguments(PrintWriter pw) {
@@ -748,6 +755,9 @@
return RESULT_ERROR;
}
break;
+ case COMMAND_POWER_OFF:
+ powerOff(args, writer);
+ break;
default:
writer.println("Unknown command: \"" + cmd + "\"");
@@ -1738,6 +1748,27 @@
/* zone= */ "0", Integer.toString(VehicleGear.GEAR_PARK), /* delayTime= */ "0");
}
+ private void powerOff(String[] args, PrintWriter writer) {
+ int index = 1;
+ boolean skipGarageMode = false;
+ boolean shutdown = false;
+ while (index < args.length) {
+ switch (args[index]) {
+ case POWER_OFF_SKIP_GARAGEMODE:
+ skipGarageMode = true;
+ break;
+ case POWER_OFF_SHUTDOWN:
+ shutdown = true;
+ break;
+ default:
+ writer.printf("Not supported option: %s\n", args[index]);
+ return;
+ }
+ index++;
+ }
+ mCarPowerManagementService.powerOffFromCommand(skipGarageMode, shutdown);
+ }
+
/**
* Inject a fake VHAL event
*
diff --git a/service/src/com/android/car/ICarImpl.java b/service/src/com/android/car/ICarImpl.java
index b6ad3fd..28e44b4 100644
--- a/service/src/com/android/car/ICarImpl.java
+++ b/service/src/com/android/car/ICarImpl.java
@@ -61,6 +61,7 @@
import com.android.car.power.SilentModeController;
import com.android.car.stats.CarStatsService;
import com.android.car.systeminterface.SystemInterface;
+import com.android.car.ui.FactoryResetActivity;
import com.android.car.user.CarUserNoticeService;
import com.android.car.user.CarUserService;
import com.android.car.vms.VmsBrokerService;
@@ -843,5 +844,14 @@
if (DBG) Slog.d(TAG, "onUserRemoved(): " + user.toFullString());
mCarUserService.onUserRemoved(user);
}
+
+ @Override
+ public void onFactoryReset(IResultReceiver callback) {
+ assertCallingFromSystemProcess();
+
+ // TODO(b/171603586): STOPSHIP persist in case CarService crashes before next resume
+ mCarPowerManagementService.setFactoryResetCallback(callback);
+ FactoryResetActivity.sendNotification(mContext, callback);
+ }
}
}
diff --git a/service/src/com/android/car/power/CarPowerManagementService.java b/service/src/com/android/car/power/CarPowerManagementService.java
index b6012fb..0d88e69 100644
--- a/service/src/com/android/car/power/CarPowerManagementService.java
+++ b/service/src/com/android/car/power/CarPowerManagementService.java
@@ -35,6 +35,7 @@
import android.frameworks.automotive.powerpolicy.internal.ICarPowerPolicySystemNotification;
import android.frameworks.automotive.powerpolicy.internal.PolicyState;
import android.hardware.automotive.vehicle.V2_0.VehicleApPowerStateReq;
+import android.hardware.automotive.vehicle.V2_0.VehicleApPowerStateShutdownParam;
import android.net.wifi.WifiManager;
import android.os.Build;
import android.os.Handler;
@@ -69,6 +70,7 @@
import com.android.car.user.CarUserService;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.internal.os.IResultReceiver;
import com.android.internal.util.function.pooled.PooledLambda;
import java.io.BufferedReader;
@@ -205,6 +207,11 @@
private String mCurrentPowerPolicy;
@GuardedBy("mLock")
private String mCurrentPowerPolicyGroup;
+
+ @GuardedBy("mLock")
+ @Nullable
+ private IResultReceiver mFactoryResetCallback;
+
private final PowerManagerCallbackList<ICarPowerPolicyChangeListener> mPolicyChangeListeners =
new PowerManagerCallbackList<>(
l -> CarPowerManagementService.this.mPolicyChangeListeners.unregister(l));
@@ -347,6 +354,7 @@
writer.println(", config_maxSuspendWaitDuration:" + getMaxSuspendWaitDurationConfig());
writer.println("# of power policy change listener:"
+ mPolicyChangeListeners.getRegisteredCallbackCount());
+ writer.println("mFactoryResetCallback:" + mFactoryResetCallback);
}
mPolicyReader.dump(writer);
}
@@ -477,7 +485,10 @@
}
}
- private void handleOn() {
+ @VisibleForTesting
+ void handleOn() {
+ if (factoryResetIfNeeded()) return;
+
// If current user is a Guest User, we want to inform CarUserNoticeService not to show
// notice for current user, and show user notice only for the target user.
if (!mSwitchGuestUserBeforeSleep) {
@@ -503,6 +514,32 @@
}
}
+ private boolean factoryResetIfNeeded() {
+ IResultReceiver callback;
+ synchronized (mLock) {
+ if (mFactoryResetCallback == null) return false;
+ callback = mFactoryResetCallback;
+ }
+
+ try {
+ Slog.i(TAG, "Factory resetting as it was delayed by user");
+ callback.send(/* resultCode= */ 0, /* resultData= */ null);
+ return true;
+ } catch (Exception e) {
+ Slog.wtf(TAG, "Should have factory reset, but failed", e);
+ return false;
+ }
+ }
+
+ /**
+ * Sets the callback used to factory reset the device on resume when the user delayed it.
+ */
+ public void setFactoryResetCallback(IResultReceiver callback) {
+ synchronized (mLock) {
+ mFactoryResetCallback = callback;
+ }
+ }
+
/**
* Tells Garage Mode if it should run normally, or just
* exit immediately without indicating 'idle'
@@ -1665,6 +1702,31 @@
return null;
}
+ /**
+ * Powers off the device, considering the given options.
+ *
+ * <p>The final state can be "suspend-to-RAM" or "shutdown". Attempting to go to suspend-to-RAM
+ * on devices which do not support it may lead to an unexpected system state.
+ */
+ public void powerOffFromCommand(boolean skipGarageMode, boolean shutdown) {
+ ICarImpl.assertPermission(mContext, Car.PERMISSION_CAR_POWER);
+ int param = 0;
+ if (shutdown) {
+ param = skipGarageMode ? VehicleApPowerStateShutdownParam.SHUTDOWN_IMMEDIATELY
+ : VehicleApPowerStateShutdownParam.SHUTDOWN_ONLY;
+ } else {
+ param = skipGarageMode ? VehicleApPowerStateShutdownParam.SLEEP_IMMEDIATELY
+ : VehicleApPowerStateShutdownParam.CAN_SLEEP;
+ }
+ PowerState state = new PowerState(VehicleApPowerStateReq.SHUTDOWN_PREPARE, param);
+ synchronized (mLock) {
+ mRebootAfterGarageMode = false;
+ mPendingPowerStates.addFirst(new CpmsState(state));
+ mLock.notify();
+ }
+ mHandler.handlePowerStateChange();
+ }
+
// In a real Deep Sleep, the hardware removes power from the CPU (but retains power
// on the RAM). This puts the processor to sleep. Upon some external signal, power
// is re-applied to the CPU, and processing resumes right where it left off.
diff --git a/service/src/com/android/car/systeminterface/DisplayInterface.java b/service/src/com/android/car/systeminterface/DisplayInterface.java
index 5b00ca6..3bd90c8 100644
--- a/service/src/com/android/car/systeminterface/DisplayInterface.java
+++ b/service/src/com/android/car/systeminterface/DisplayInterface.java
@@ -37,7 +37,7 @@
import android.os.UserHandle;
import android.provider.Settings.SettingNotFoundException;
import android.provider.Settings.System;
-import android.util.Log;
+import android.util.Slog;
import android.view.Display;
import android.view.InputDevice;
@@ -140,7 +140,7 @@
public void refreshDisplayBrightness() {
synchronized (mLock) {
if (mService == null) {
- Log.e(CarLog.TAG_POWER,
+ Slog.e(CarLog.TAG_POWER,
"Could not set brightness: no CarPowerManagementService");
return;
}
@@ -152,7 +152,7 @@
ActivityManager.getCurrentUser());
gamma = convertLinearToGamma(linear, mMinimumBacklight, mMaximumBacklight);
} catch (SettingNotFoundException e) {
- Log.e(CarLog.TAG_POWER, "Could not get SCREEN_BRIGHTNESS: " + e);
+ Slog.e(CarLog.TAG_POWER, "Could not get SCREEN_BRIGHTNESS: ", e);
}
int percentBright = (gamma * 100 + ((GAMMA_SPACE_MAX + 1) / 2)) / GAMMA_SPACE_MAX;
mService.sendDisplayBrightness(percentBright);
@@ -222,11 +222,11 @@
}
if (on) {
mWakeLockInterface.switchToFullWakeLock();
- Log.i(CarLog.TAG_POWER, "on display");
+ Slog.i(CarLog.TAG_POWER, "on display");
mPowerManager.wakeUp(SystemClock.uptimeMillis());
} else {
mWakeLockInterface.switchToPartialWakeLock();
- Log.i(CarLog.TAG_POWER, "off display");
+ Slog.i(CarLog.TAG_POWER, "off display");
mPowerManager.goToSleep(SystemClock.uptimeMillis());
}
// Turn touchscreen input devices on or off, the same as the display
diff --git a/service/src/com/android/car/systeminterface/SystemStateInterface.java b/service/src/com/android/car/systeminterface/SystemStateInterface.java
index 8849394..ed103db 100644
--- a/service/src/com/android/car/systeminterface/SystemStateInterface.java
+++ b/service/src/com/android/car/systeminterface/SystemStateInterface.java
@@ -22,8 +22,8 @@
import android.content.IntentFilter;
import android.os.Looper;
import android.os.PowerManager;
-import android.util.Log;
import android.util.Pair;
+import android.util.Slog;
import com.android.car.internal.ICarServiceHelper;
import com.android.car.procfsinspector.ProcessInfo;
@@ -122,7 +122,7 @@
int retVal = mICarServiceHelper.forceSuspend(SUSPEND_TRY_TIMEOUT_MS);
deviceEnteredSleep = retVal == 0;
} catch (Exception e) {
- Log.e(TAG, "Unable to enter deep sleep", e);
+ Slog.e(TAG, "Unable to enter deep sleep", e);
}
return deviceEnteredSleep;
}
@@ -149,7 +149,7 @@
if (mICarServiceHelper != null) {
return true;
}
- Log.e(TAG, "Unable to enter deep sleep: ICarServiceHelper is still null "
+ Slog.e(TAG, "Unable to enter deep sleep: ICarServiceHelper is still null "
+ "after waiting " + MAX_WAIT_FOR_HELPER_SEC + " seconds");
return false;
}
diff --git a/service/src/com/android/car/ui/FactoryResetActivity.java b/service/src/com/android/car/ui/FactoryResetActivity.java
new file mode 100644
index 0000000..a26d233
--- /dev/null
+++ b/service/src/com/android/car/ui/FactoryResetActivity.java
@@ -0,0 +1,137 @@
+/*
+ * Copyright (C) 2020 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.ui;
+
+import static com.android.car.ui.NotificationHelper.FACTORY_RESET_NOTIFICATION_ID;
+
+import android.app.Activity;
+import android.app.ActivityManager;
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.IBinder;
+import android.os.UserHandle;
+import android.util.Slog;
+import android.widget.Button;
+
+import com.android.car.R;
+import com.android.internal.os.IResultReceiver;
+
+// TODO(b/171603586): add unit test
+
+/**
+ * Activity shown when a factory request is imminent, it gives the user the option to reset now or
+ * wait until the device is rebooted / resumed from suspend.
+ */
+public final class FactoryResetActivity extends Activity {
+
+ private static final String TAG = FactoryResetActivity.class.getSimpleName();
+
+ public static final String EXTRA_CALLBACK = "factory_reset_callback";
+
+ private Button mNowButton;
+ private Button mLaterButton;
+ private IResultReceiver mCallback;
+
+ /**
+ * Sends the notification warning the user about the factory reset.
+ */
+ public static void sendNotification(Context context, IResultReceiver callback) {
+ // The factory request is received by CarService - which runs on system user - but the
+ // notification must be sent to the current user.
+ UserHandle currentUser = UserHandle.of(ActivityManager.getCurrentUser());
+
+ @SuppressWarnings("deprecation")
+ Intent intent = new Intent(context, FactoryResetActivity.class)
+ .putExtra(EXTRA_CALLBACK, callback.asBinder());
+ PendingIntent pendingIntent = PendingIntent.getActivityAsUser(context,
+ FACTORY_RESET_NOTIFICATION_ID, intent, PendingIntent.FLAG_IMMUTABLE,
+ /* options= */ null, currentUser);
+
+ Notification notification = NotificationHelper
+ .newNotificationBuilder(context, NotificationManager.IMPORTANCE_HIGH)
+ // TODO(b/171603586): proper icon?
+ .setSmallIcon(R.drawable.car_ic_mode)
+ .setContentTitle(context.getString(R.string.factory_reset_notification_title))
+ .setContentText(context.getString(R.string.factory_reset_notification_text))
+ .setCategory(Notification.CATEGORY_CAR_WARNING)
+ .setContentIntent(pendingIntent)
+ .setOngoing(true)
+ .build();
+
+ Slog.i(TAG, "Showing factory reset notification on user " + currentUser);
+ context.getSystemService(NotificationManager.class)
+ .notifyAsUser(TAG, FACTORY_RESET_NOTIFICATION_ID, notification, currentUser);
+ }
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ Intent intent = getIntent();
+ Object binder = null;
+
+ try {
+ binder = intent.getExtra(EXTRA_CALLBACK);
+ mCallback = IResultReceiver.Stub.asInterface((IBinder) binder);
+ } catch (Exception e) {
+ Slog.w(TAG, "error getting IResultReveiver from " + EXTRA_CALLBACK + " extra ("
+ + binder + ") on " + intent, e);
+ }
+
+ if (mCallback == null) {
+ Slog.wtf(TAG, "no IResultReceiver / " + EXTRA_CALLBACK + " extra on " + intent);
+ finish();
+ return;
+ }
+
+ setContentView(R.layout.factory_reset);
+
+ mNowButton = findViewById(R.id.factory_reset_now_button);
+ mNowButton.setOnClickListener((v) -> factoryResetNow());
+
+ mLaterButton = findViewById(R.id.factory_reset_later_button);
+ mLaterButton.setOnClickListener((v) -> factoryResetLater());
+ }
+
+ private void factoryResetNow() {
+ Slog.i(TAG, "Factory reset acknowledged; finishing it");
+
+ try {
+ mCallback.send(/* resultCode= */ 0, /* resultData= */ null);
+ Slog.i(TAG, "Hasta la vista, baby");
+
+ // Cancel pending intent and notification
+ getSystemService(NotificationManager.class).cancel(FACTORY_RESET_NOTIFICATION_ID);
+ PendingIntent.getActivity(this, FACTORY_RESET_NOTIFICATION_ID, getIntent(),
+ PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT).cancel();
+ } catch (Exception e) {
+ Slog.e(TAG, "error factory resetting or cancelling notification / intent", e);
+ return;
+ }
+
+ finish();
+ }
+
+ private void factoryResetLater() {
+ Slog.i(TAG, "Delaying factory reset.");
+ finish();
+ }
+}
diff --git a/service/src/com/android/car/ui/NotificationHelper.java b/service/src/com/android/car/ui/NotificationHelper.java
new file mode 100644
index 0000000..e332d99
--- /dev/null
+++ b/service/src/com/android/car/ui/NotificationHelper.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2020 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.ui;
+
+import android.annotation.NonNull;
+import android.app.Notification;
+import android.app.NotificationChannel;
+import android.app.NotificationManager;
+import android.content.Context;
+import android.os.Bundle;
+
+import com.android.car.R;
+
+/**
+ * Helper for notification-related tasks
+ */
+final class NotificationHelper {
+
+ static final int FACTORY_RESET_NOTIFICATION_ID = 42;
+ static final String IMPORTANCE_HIGH_ID = "importance_high";
+
+ /**
+ * Creates a notification (and its notification channel) for the given importance type, setting
+ * its name to be {@code Android System}.
+ *
+ * @param context context for showing the notification
+ * @param importance notification importance. Currently only
+ * {@link NotificationManager.IMPORTANCE_HIGH} is supported.
+ */
+ @NonNull
+ static Notification.Builder newNotificationBuilder(Context context,
+ @NotificationManager.Importance int importance) {
+ String importanceId, importanceName;
+ switch (importance) {
+ case NotificationManager.IMPORTANCE_HIGH:
+ importanceId = IMPORTANCE_HIGH_ID;
+ importanceName = context.getString(R.string.importance_high);
+ break;
+ default:
+ throw new IllegalArgumentException("Unsupported importance: " + importance);
+ }
+ NotificationManager notificationMgr = context.getSystemService(NotificationManager.class);
+ notificationMgr.createNotificationChannel(
+ new NotificationChannel(importanceId, importanceName, importance));
+
+ Bundle extras = new Bundle();
+ extras.putString(Notification.EXTRA_SUBSTITUTE_APP_NAME,
+ context.getString(com.android.internal.R.string.android_system_label));
+
+ return new Notification.Builder(context, importanceId).addExtras(extras);
+ }
+
+ private NotificationHelper() {
+ throw new UnsupportedOperationException("Contains only static methods");
+ }
+}
diff --git a/service/src/com/android/car/user/CarUserNoticeService.java b/service/src/com/android/car/user/CarUserNoticeService.java
index 9001078..ab28dd2 100644
--- a/service/src/com/android/car/user/CarUserNoticeService.java
+++ b/service/src/com/android/car/user/CarUserNoticeService.java
@@ -47,6 +47,7 @@
import android.os.UserHandle;
import android.provider.Settings;
import android.util.Log;
+import android.util.Slog;
import android.view.IWindowManager;
import android.view.WindowManagerGlobal;
@@ -111,7 +112,7 @@
private final UserLifecycleListener mUserLifecycleListener = event -> {
if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG_USER, "onEvent(" + event + ")");
+ Slog.d(TAG_USER, "onEvent(" + event + ")");
}
if (CarUserManager.USER_LIFECYCLE_EVENT_TYPE_SWITCHING == event.getEventType()) {
CarUserNoticeService.this.mMainHandler.post(() -> {
@@ -143,17 +144,17 @@
// Runs in main thread, so do not use Handler.
if (Intent.ACTION_SCREEN_OFF.equals(intent.getAction())) {
if (isDisplayOn()) {
- Log.i(TAG_USER, "SCREEN_OFF while display is already on");
+ Slog.i(TAG_USER, "SCREEN_OFF while display is already on");
return;
}
- Log.i(TAG_USER, "Display off, stopping UI");
+ Slog.i(TAG_USER, "Display off, stopping UI");
stopUi(/* clearUiShown= */ true);
} else if (Intent.ACTION_SCREEN_ON.equals(intent.getAction())) {
if (!isDisplayOn()) {
- Log.i(TAG_USER, "SCREEN_ON while display is already off");
+ Slog.i(TAG_USER, "SCREEN_ON while display is already off");
return;
}
- Log.i(TAG_USER, "Display on, starting UI");
+ Slog.i(TAG_USER, "Display on, starting UI");
startNoticeUiIfNecessary();
}
}
@@ -179,7 +180,7 @@
try {
binder.setCallbackBinder(mIUserNotice);
} catch (RemoteException e) {
- Log.w(TAG_USER, "UserNoticeUI Service died", e);
+ Slog.w(TAG_USER, "UserNoticeUI Service died", e);
// Wait for reconnect
binder = null;
}
@@ -240,7 +241,7 @@
try {
locked = wm.isKeyguardLocked();
} catch (RemoteException e) {
- Log.w(TAG_USER, "system server crashed", e);
+ Slog.w(TAG_USER, "system server crashed", e);
}
}
if (locked) {
@@ -266,7 +267,7 @@
private boolean grantSystemAlertWindowPermission(@UserIdInt int userId) {
AppOpsManager appOpsManager = mContext.getSystemService(AppOpsManager.class);
if (appOpsManager == null) {
- Log.w(TAG_USER, "AppOpsManager not ready yet");
+ Slog.w(TAG_USER, "AppOpsManager not ready yet");
return false;
}
String packageName = mServiceIntent.getComponent().getPackageName();
@@ -274,13 +275,13 @@
try {
packageUid = mContext.getPackageManager().getPackageUidAsUser(packageName, userId);
} catch (PackageManager.NameNotFoundException e) {
- Log.wtf(TAG_USER, "Target package for config_userNoticeUiService not found:"
+ Slog.wtf(TAG_USER, "Target package for config_userNoticeUiService not found:"
+ packageName + " userId:" + userId);
return false;
}
appOpsManager.setMode(AppOpsManager.OP_SYSTEM_ALERT_WINDOW, packageUid, packageName,
AppOpsManager.MODE_ALLOWED);
- Log.i(TAG_USER, "Granted SYSTEM_ALERT_WINDOW permission to package:" + packageName
+ Slog.i(TAG_USER, "Granted SYSTEM_ALERT_WINDOW permission to package:" + packageName
+ " package uid:" + packageUid);
return true;
}
@@ -327,13 +328,13 @@
boolean bound = mContext.bindServiceAsUser(mServiceIntent, mUiServiceConnection,
Context.BIND_AUTO_CREATE, UserHandle.of(userId));
if (bound) {
- Log.i(TAG_USER, "Bound UserNoticeUI Service Service:" + mServiceIntent);
+ Slog.i(TAG_USER, "Bound UserNoticeUI Service Service:" + mServiceIntent);
synchronized (mLock) {
mServiceBound = true;
mUiShown = true;
}
} else {
- Log.w(TAG_USER, "Cannot bind to UserNoticeUI Service Service" + mServiceIntent);
+ Slog.w(TAG_USER, "Cannot bind to UserNoticeUI Service Service" + mServiceIntent);
}
}
@@ -349,7 +350,7 @@
}
}
if (serviceBound) {
- Log.i(TAG_USER, "Unbound UserNoticeUI Service");
+ Slog.i(TAG_USER, "Unbound UserNoticeUI Service");
mContext.unbindService(mUiServiceConnection);
}
}
diff --git a/service/src/com/android/car/user/CarUserService.java b/service/src/com/android/car/user/CarUserService.java
index 5f3daf5..6c85678 100644
--- a/service/src/com/android/car/user/CarUserService.java
+++ b/service/src/com/android/car/user/CarUserService.java
@@ -84,6 +84,7 @@
import android.text.TextUtils;
import android.util.EventLog;
import android.util.Log;
+import android.util.Slog;
import android.util.SparseArray;
import android.util.SparseBooleanArray;
import android.util.TimingsTraceLog;
@@ -291,8 +292,8 @@
@Nullable InitialUserSetter initialUserSetter,
@Nullable UserPreCreator userPreCreator,
@NonNull CarUxRestrictionsManagerService uxRestrictionService) {
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG_USER, "constructed");
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "constructed");
}
mContext = context;
mHal = hal;
@@ -314,8 +315,8 @@
@Override
public void init() {
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG_USER, "init()");
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "init()");
}
mCarUxRestrictionService.registerUxRestrictionsChangeListener(
mCarUxRestrictionsChangeListener, Display.DEFAULT_DISPLAY);
@@ -325,8 +326,8 @@
@Override
public void release() {
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG_USER, "release()");
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "release()");
}
mCarUxRestrictionService
.unregisterUxRestrictionsChangeListener(mCarUxRestrictionsChangeListener);
@@ -457,7 +458,7 @@
@Override
protected void onCompleted(UserCreationResult result, Throwable err) {
if (result == null) {
- Log.w(TAG, "createDriver(" + name + "," + admin + ") failed: " + err);
+ Slog.w(TAG, "createDriver(" + name + "," + admin + ") failed: " + err);
} else {
if (result.getStatus() == UserCreationResult.STATUS_SUCCESSFUL) {
assignDefaultIcon(result.getUser());
@@ -469,7 +470,7 @@
int flags = 0;
if (admin) {
if (!(mUserManager.isAdminUser() || mUserManager.isSystemUser())) {
- Log.e(TAG_USER, "Only admin users and system user can create other admins.");
+ Slog.e(TAG, "Only admin users and system user can create other admins.");
sendUserCreationResultFailure(future, UserCreationResult.STATUS_INVALID_REQUEST);
return future;
}
@@ -489,11 +490,11 @@
Objects.requireNonNull(name, "name cannot be null");
UserInfo driver = mUserManager.getUserInfo(driverId);
if (driver == null) {
- Log.w(TAG_USER, "the driver is invalid");
+ Slog.w(TAG, "the driver is invalid");
return null;
}
if (driver.isGuest()) {
- Log.w(TAG_USER, "a guest driver cannot create a passenger");
+ Slog.w(TAG, "a guest driver cannot create a passenger");
return null;
}
// createPassenger doesn't use user HAL because user HAL doesn't support profile user yet.
@@ -501,7 +502,7 @@
UserManager.USER_TYPE_PROFILE_MANAGED, /* flags */ 0, driverId);
if (user == null) {
// Couldn't create user, most likely because there are too many.
- Log.w(TAG_USER, "can't create a profile for user" + driverId);
+ Slog.w(TAG, "can't create a profile for user" + driverId);
return null;
}
// Passenger user should be a non-admin user.
@@ -518,13 +519,13 @@
checkManageUsersPermission("switchDriver");
if (UserHelperLite.isHeadlessSystemUser(driverId)) {
// System user doesn't associate with real person, can not be switched to.
- Log.w(TAG_USER, "switching to system user in headless system user mode is not allowed");
+ Slog.w(TAG, "switching to system user in headless system user mode is not allowed");
sendUserSwitchResult(receiver, UserSwitchResult.STATUS_INVALID_REQUEST);
return;
}
int userSwitchable = mUserManager.getUserSwitchability();
if (userSwitchable != UserManager.SWITCHABILITY_STATUS_OK) {
- Log.w(TAG_USER, "current process is not allowed to switch user");
+ Slog.w(TAG, "current process is not allowed to switch user");
sendUserSwitchResult(receiver, UserSwitchResult.STATUS_INVALID_REQUEST);
return;
}
@@ -569,16 +570,16 @@
synchronized (mLockUser) {
try {
if (!mAm.startUserInBackgroundWithListener(passengerId, null)) {
- Log.w(TAG_USER, "could not start passenger");
+ Slog.w(TAG, "could not start passenger");
return false;
}
} catch (RemoteException e) {
// ignore
- Log.w(TAG_USER, "error while starting passenger", e);
+ Slog.w(TAG, "error while starting passenger", e);
return false;
}
if (!assignUserToOccupantZone(passengerId, zoneId)) {
- Log.w(TAG_USER, "could not assign passenger to zone");
+ Slog.w(TAG, "could not assign passenger to zone");
return false;
}
mLastPassengerId = passengerId;
@@ -602,17 +603,17 @@
synchronized (mLockUser) {
UserInfo passenger = mUserManager.getUserInfo(passengerId);
if (passenger == null) {
- Log.w(TAG_USER, "passenger " + passengerId + " doesn't exist");
+ Slog.w(TAG, "passenger " + passengerId + " doesn't exist");
return false;
}
if (mLastPassengerId != passengerId) {
- Log.w(TAG_USER, "passenger " + passengerId + " hasn't been started");
+ Slog.w(TAG, "passenger " + passengerId + " hasn't been started");
return true;
}
if (checkCurrentDriver) {
int currentUser = ActivityManager.getCurrentUser();
if (passenger.profileGroupId != currentUser) {
- Log.w(TAG_USER, "passenger " + passengerId
+ Slog.w(TAG, "passenger " + passengerId
+ " is not a profile of the current user");
return false;
}
@@ -622,7 +623,7 @@
// unassigned from the zone.
stopAllTasks(passengerId);
if (!unassignUserFromOccupantZone(passengerId)) {
- Log.w(TAG_USER, "could not unassign user from occupant zone");
+ Slog.w(TAG, "could not unassign user from occupant zone");
return false;
}
mLastPassengerId = UserHandle.USER_NULL;
@@ -640,13 +641,13 @@
if (info.childTaskUserIds[i] == userId) {
int taskId = info.childTaskIds[i];
if (!mAm.removeTask(taskId)) {
- Log.w(TAG_USER, "could not remove task " + taskId);
+ Slog.w(TAG, "could not remove task " + taskId);
}
}
}
}
} catch (RemoteException e) {
- Log.e(TAG_USER, "could not get stack info", e);
+ Slog.e(TAG, "could not get stack info", e);
}
}
@@ -659,13 +660,13 @@
try {
listener.asBinder().linkToDeath(() -> onListenerDeath(uid), 0);
} catch (RemoteException e) {
- Log.wtf(TAG_USER, "Cannot listen to death of " + uid);
+ Slog.wtf(TAG, "Cannot listen to death of " + uid);
}
mHandler.post(() -> mAppLifecycleListeners.append(uid, listener));
}
private void onListenerDeath(int uid) {
- Log.i(TAG_USER, "Removing listeners for uid " + uid + " on binder death");
+ Slog.i(TAG, "Removing listeners for uid " + uid + " on binder death");
mHandler.post(() -> mAppLifecycleListeners.remove(uid));
}
@@ -714,7 +715,7 @@
// This mean InitialUserSetter failed and could not fallback, so the initial user was
// not switched (and most likely is SYSTEM_USER).
// TODO(b/153104378): should we set it to ActivityManager.getCurrentUser() instead?
- Log.wtf(TAG_USER, "Initial user set to null");
+ Slog.wtf(TAG, "Initial user set to null");
}
}
@@ -737,8 +738,8 @@
*
*/
public void onSuspend() {
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG_USER, "onSuspend called.");
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "onSuspend called.");
}
if (mSwitchGuestUserBeforeSleep) {
@@ -756,8 +757,8 @@
*
*/
public void onResume() {
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG_USER, "onResume called.");
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "onResume called.");
}
initBootUser(InitialUserInfoRequestType.RESUME);
@@ -796,7 +797,7 @@
case InitialUserInfoResponseAction.SWITCH:
int userId = resp.userToSwitchOrCreate.userId;
if (userId <= 0) {
- Log.w(TAG, "invalid (or missing) user id sent by HAL: " + userId);
+ Slog.w(TAG, "invalid (or missing) user id sent by HAL: " + userId);
fallbackToDefaultInitialUserBehavior(userLocales, replaceGuest);
break;
}
@@ -823,7 +824,7 @@
fallbackToDefaultInitialUserBehavior(userLocales, replaceGuest);
break;
default:
- Log.w(TAG_USER, "invalid response action on " + resp);
+ Slog.w(TAG, "invalid response action on " + resp);
fallbackToDefaultInitialUserBehavior(/* user locale */ null, replaceGuest);
break;
@@ -874,7 +875,7 @@
try {
helper.setSafetyMode(isSafe);
} catch (Exception e) {
- Log.e(TAG, "Exception calling helper.setDpmSafetyMode(" + isSafe + ")", e);
+ Slog.e(TAG, "Exception calling helper.setDpmSafetyMode(" + isSafe + ")", e);
}
}
@@ -882,10 +883,10 @@
boolean restricted = restrictions != null
&& (restrictions.getActiveRestrictions() & UX_RESTRICTIONS_NO_SETUP)
== UX_RESTRICTIONS_NO_SETUP;
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG_USER, "setUxRestrictions(" + restrictions + "): restricted=" + restricted);
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "setUxRestrictions(" + restrictions + "): restricted=" + restricted);
} else {
- Log.i(TAG_USER, "Setting UX restricted to " + restricted);
+ Slog.i(TAG, "Setting UX restricted to " + restricted);
}
ICarServiceHelper helper = null;
@@ -893,7 +894,7 @@
synchronized (mLockUser) {
mUxRestricted = restricted;
if (mICarServiceHelper == null) {
- Log.e(TAG, "onUxRestrictionsChanged(): no mICarServiceHelper");
+ Slog.e(TAG, "onUxRestrictionsChanged(): no mICarServiceHelper");
}
helper = mICarServiceHelper;
}
@@ -955,8 +956,8 @@
int currentUser = ActivityManager.getCurrentUser();
if (currentUser == targetUserId) {
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG_USER, "Current user is same as requested target user: " + targetUserId);
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "Current user is same as requested target user: " + targetUserId);
}
int resultStatus = UserSwitchResult.STATUS_OK_USER_ALREADY_IN_FOREGROUND;
sendUserSwitchResult(receiver, resultStatus);
@@ -977,16 +978,15 @@
}
} catch (RemoteException e) {
// ignore
- Log.w(TAG_USER,
- "error while switching user " + targetUser.toFullString(), e);
+ Slog.w(TAG, "error while switching user " + targetUser.toFullString(), e);
}
sendUserSwitchResult(receiver, UserSwitchResult.STATUS_ANDROID_FAILURE);
return;
}
synchronized (mLockUser) {
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG_USER, "switchUser(" + targetUserId + "): currentuser=" + currentUser
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "switchUser(" + targetUserId + "): currentuser=" + currentUser
+ ", mUserIdForUserSwitchInProcess=" + mUserIdForUserSwitchInProcess);
}
@@ -996,8 +996,8 @@
// user switch request in process for different target user, but that request is now
// ignored.
if (mUserIdForUserSwitchInProcess == targetUserId) {
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG_USER,
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG,
"Another user switch request in process for the requested target user: "
+ targetUserId);
}
@@ -1016,8 +1016,8 @@
SwitchUserRequest request = createUserSwitchRequest(targetUserId, usersInfo);
mHal.switchUser(request, timeoutMs, (halCallbackStatus, resp) -> {
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG, "switch response: status="
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "switch response: status="
+ UserHalHelper.halCallbackStatusToString(halCallbackStatus)
+ ", resp=" + resp);
}
@@ -1026,7 +1026,7 @@
synchronized (mLockUser) {
if (halCallbackStatus != HalCallback.STATUS_OK) {
- Log.w(TAG, "invalid callback status ("
+ Slog.w(TAG, "invalid callback status ("
+ UserHalHelper.halCallbackStatusToString(halCallbackStatus)
+ ") for response " + resp);
sendUserSwitchResult(receiver, resultStatus);
@@ -1037,9 +1037,9 @@
if (mUserIdForUserSwitchInProcess != targetUserId) {
// Another user switch request received while HAL responded. No need to process
// this request further
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG_USER, "Another user switch received while HAL responsed. Request "
- + "abondoned for : " + targetUserId + ". Current user in process: "
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "Another user switch received while HAL responsed. Request"
+ + " abondoned for : " + targetUserId + ". Current user in process: "
+ mUserIdForUserSwitchInProcess);
}
resultStatus =
@@ -1064,7 +1064,7 @@
}
} catch (RemoteException e) {
// ignore
- Log.w(TAG_USER,
+ Slog.w(TAG,
"error while switching user " + targetUser.toFullString(), e);
}
break;
@@ -1074,7 +1074,7 @@
break;
default:
// Shouldn't happen because UserHalService validates the status
- Log.wtf(TAG, "Received invalid user switch status from HAL: " + resp);
+ Slog.wtf(TAG, "Received invalid user switch status from HAL: " + resp);
}
if (mRequestIdForUserSwitchInProcess == 0) {
@@ -1150,7 +1150,7 @@
}
if (isLastAdmin) {
- Log.w(TAG_USER,
+ Slog.w(TAG,
"Last admin user successfully removed or set ephemeral. User Id: " + userId);
}
@@ -1173,8 +1173,8 @@
* Should be called by {@code ICarImpl} only.
*/
public void onUserRemoved(@NonNull UserInfo user) {
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG_USER, "onUserRemoved: " + user.toFullString());
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "onUserRemoved: " + user.toFullString());
}
notifyHalUserRemoved(user);
}
@@ -1183,21 +1183,21 @@
if (!isUserHalSupported()) return;
if (user == null) {
- Log.wtf(TAG, "notifyHalUserRemoved() called for null user");
+ Slog.wtf(TAG, "notifyHalUserRemoved() called for null user");
return;
}
int userId = user.id;
if (userId == UserHandle.USER_NULL) {
- Log.wtf(TAG, "notifyHalUserRemoved() called for UserHandle.USER_NULL");
+ Slog.wtf(TAG, "notifyHalUserRemoved() called for UserHandle.USER_NULL");
return;
}
synchronized (mLockUser) {
if (mFailedToCreateUserIds.get(userId)) {
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG, "notifyHalUserRemoved(): skipping " + userId);
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "notifyHalUserRemoved(): skipping " + userId);
}
mFailedToCreateUserIds.delete(userId);
return;
@@ -1223,7 +1223,7 @@
private void sendUserSwitchUiCallback(@UserIdInt int targetUserId) {
if (mUserSwitchUiReceiver == null) {
- Log.w(TAG_USER, "No User switch UI receiver.");
+ Slog.w(TAG, "No User switch UI receiver.");
return;
}
@@ -1231,7 +1231,7 @@
try {
mUserSwitchUiReceiver.send(targetUserId, null);
} catch (RemoteException e) {
- Log.e(TAG_USER, "Error calling user switch UI receiver.", e);
+ Slog.e(TAG, "Error calling user switch UI receiver.", e);
}
}
@@ -1242,14 +1242,14 @@
UserInfo createUserEvenWhenDisallowed(@Nullable String name, @NonNull String userType,
@UserInfoFlag int flags) {
if (mICarServiceHelper == null) {
- Log.wtf(TAG, "createUserEvenWhenDisallowed(): mICarServiceHelper not set yet",
+ Slog.wtf(TAG, "createUserEvenWhenDisallowed(): mICarServiceHelper not set yet",
new Exception());
return null;
}
try {
return mICarServiceHelper.createUserEvenWhenDisallowed(name, userType, flags);
} catch (RemoteException e) {
- Log.e(TAG, "createUserEvenWhenDisallowed(" + UserHelperLite.safeName(name) + ", "
+ Slog.e(TAG, "createUserEvenWhenDisallowed(" + UserHelperLite.safeName(name) + ", "
+ userType + ", " + UserInfo.flagsToString(flags) + ") failed", e);
return null;
}
@@ -1297,8 +1297,8 @@
validCombination = false;
}
if (!validCombination) {
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG, "Invalid combination of user type(" + userType
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "Invalid combination of user type(" + userType
+ ") and flags (" + UserInfo.flagsToString(flags)
+ ") for caller with restrictions");
}
@@ -1310,8 +1310,8 @@
int callingUserId = Binder.getCallingUserHandle().getIdentifier();
UserInfo callingUser = mUserManager.getUserInfo(callingUserId);
if (!callingUser.isAdmin() && (flags & UserInfo.FLAG_ADMIN) == UserInfo.FLAG_ADMIN) {
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG, "Non-admin user " + callingUserId
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "Non-admin user " + callingUserId
+ " can only create non-admin users");
}
sendUserCreationResultFailure(receiver, UserCreationResult.STATUS_INVALID_REQUEST);
@@ -1324,18 +1324,18 @@
try {
newUser = mUserManager.createUser(name, userType, flags);
if (newUser == null) {
- Log.w(TAG, "um.createUser() returned null for user of type " + userType
+ Slog.w(TAG, "um.createUser() returned null for user of type " + userType
+ " and flags " + UserInfo.flagsToString(flags));
sendUserCreationResultFailure(receiver, UserCreationResult.STATUS_ANDROID_FAILURE);
return;
}
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG, "Created user: " + newUser.toFullString());
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "Created user: " + newUser.toFullString());
}
EventLog.writeEvent(EventLogTags.CAR_USER_SVC_CREATE_USER_USER_CREATED, newUser.id,
UserHelperLite.safeName(newUser.name), newUser.userType, newUser.flags);
} catch (RuntimeException e) {
- Log.e(TAG_USER, "Error creating user of type " + userType + " and flags"
+ Slog.e(TAG, "Error creating user of type " + userType + " and flags"
+ UserInfo.flagsToString(flags), e);
sendUserCreationResultFailure(receiver, UserCreationResult.STATUS_ANDROID_FAILURE);
return;
@@ -1353,20 +1353,20 @@
}
request.newUserInfo.userId = newUser.id;
request.newUserInfo.flags = UserHalHelper.convertFlags(newUser);
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG, "Create user request: " + request);
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "Create user request: " + request);
}
try {
mHal.createUser(request, timeoutMs, (status, resp) -> {
int resultStatus = UserCreationResult.STATUS_HAL_INTERNAL_FAILURE;
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG, "createUserResponse: status="
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "createUserResponse: status="
+ UserHalHelper.halCallbackStatusToString(status) + ", resp=" + resp);
}
UserInfo user = null; // user returned in the result
if (status != HalCallback.STATUS_OK) {
- Log.w(TAG, "invalid callback status ("
+ Slog.w(TAG, "invalid callback status ("
+ UserHalHelper.halCallbackStatusToString(status) + ") for response "
+ resp);
EventLog.writeEvent(EventLogTags.CAR_USER_SVC_CREATE_USER_RESP, status,
@@ -1388,7 +1388,7 @@
break;
default:
// Shouldn't happen because UserHalService validates the status
- Log.wtf(TAG, "Received invalid user switch status from HAL: " + resp);
+ Slog.wtf(TAG, "Received invalid user switch status from HAL: " + resp);
}
EventLog.writeEvent(EventLogTags.CAR_USER_SVC_CREATE_USER_RESP, status,
resultStatus, resp.errorMessage);
@@ -1399,14 +1399,14 @@
sendUserCreationResult(receiver, resultStatus, user, resp.errorMessage);
});
} catch (Exception e) {
- Log.w(TAG, "mHal.createUser(" + request + ") failed", e);
+ Slog.w(TAG, "mHal.createUser(" + request + ") failed", e);
removeCreatedUser(newUser, "mHal.createUser() failed");
sendUserCreationResultFailure(receiver, UserCreationResult.STATUS_HAL_INTERNAL_FAILURE);
}
}
private void removeCreatedUser(@NonNull UserInfo user, @NonNull String reason) {
- Log.i(TAG, "removing " + user.toFullString() + "; reason: " + reason);
+ Slog.i(TAG, "removing " + user.toFullString() + "; reason: " + reason);
int userId = user.id;
EventLog.writeEvent(EventLogTags.CAR_USER_SVC_CREATE_USER_USER_REMOVED, userId, reason);
@@ -1417,10 +1417,10 @@
try {
if (!mUserManager.removeUser(userId)) {
- Log.w(TAG, "Failed to remove user " + user.toFullString());
+ Slog.w(TAG, "Failed to remove user " + user.toFullString());
}
} catch (Exception e) {
- Log.e(TAG, "Failed to remove user " + user.toFullString(), e);
+ Slog.e(TAG, "Failed to remove user " + user.toFullString(), e);
}
}
@@ -1449,7 +1449,7 @@
UserIdentificationResponse halResponse = mHal.getUserAssociation(request);
if (halResponse == null) {
- Log.w(TAG, "getUserIdentificationAssociation(): HAL returned null for "
+ Slog.w(TAG, "getUserIdentificationAssociation(): HAL returned null for "
+ Arrays.toString(types));
return UserIdentificationAssociationResponse.forFailure();
}
@@ -1500,7 +1500,7 @@
mHal.setUserAssociation(timeoutMs, request, (status, resp) -> {
if (status != HalCallback.STATUS_OK) {
- Log.w(TAG, "setUserIdentificationAssociation(): invalid callback status ("
+ Slog.w(TAG, "setUserIdentificationAssociation(): invalid callback status ("
+ UserHalHelper.halCallbackStatusToString(status) + ") for response "
+ resp);
if (resp == null || TextUtils.isEmpty(resp.errorMessage)) {
@@ -1524,8 +1524,8 @@
}
UserIdentificationAssociationResponse response = UserIdentificationAssociationResponse
.forSuccess(responseTypes, resp.errorMessage);
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG, "setUserIdentificationAssociation(): resp= " + resp
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "setUserIdentificationAssociation(): resp= " + resp
+ ", converted=" + response);
}
result.complete(response);
@@ -1549,7 +1549,7 @@
receiver.send(resultCode, resultData);
} catch (RemoteException e) {
// ignore
- Log.w(TAG_USER, "error while sending results", e);
+ Slog.w(TAG, "error while sending results", e);
}
}
@@ -1599,7 +1599,7 @@
public void switchAndroidUserFromHal(int requestId, @UserIdInt int targetUserId) {
EventLog.writeEvent(EventLogTags.CAR_USER_SVC_SWITCH_USER_FROM_HAL_REQ, requestId,
targetUserId);
- Log.i(TAG_USER, "User hal requested a user switch. Target user id " + targetUserId);
+ Slog.i(TAG, "User hal requested a user switch. Target user id " + targetUserId);
try {
boolean result = mAm.switchUser(targetUserId);
@@ -1610,7 +1610,7 @@
}
} catch (RemoteException e) {
// ignore
- Log.w(TAG_USER, "error while switching user " + targetUserId, e);
+ Slog.w(TAG, "error while switching user " + targetUserId, e);
}
}
@@ -1618,8 +1618,8 @@
synchronized (mLockUser) {
if (mUserIdForUserSwitchInProcess != UserHandle.USER_NULL) {
// Some other user switch is in process.
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG_USER, "User switch for user: " + mUserIdForUserSwitchInProcess
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "User switch for user: " + mUserIdForUserSwitchInProcess
+ " is in process. Abandoning it as a new user switch is requested"
+ " for the target user: " + targetUserId);
}
@@ -1710,7 +1710,7 @@
.getString(com.android.internal.R.string.config_systemUIServiceComponent));
return componentName.getPackageName();
} catch (RuntimeException e) {
- Log.w(TAG_USER, "error while getting system UI package name.", e);
+ Slog.w(TAG, "error while getting system UI package name.", e);
return null;
}
}
@@ -1792,7 +1792,7 @@
if (mBackgroundUsersToRestart.size() > (mMaxRunningUsers - 1)) {
int userToDrop = mBackgroundUsersToRestart.get(
mBackgroundUsersToRestart.size() - 1);
- Log.i(TAG_USER, "New user unlocked:" + userId
+ Slog.i(TAG, "New user unlocked:" + userId
+ ", dropping least recently user from restart list:" + userToDrop);
// Drop the least recently used user.
mBackgroundUsersToRestart.remove(mBackgroundUsersToRestart.size() - 1);
@@ -1801,7 +1801,7 @@
}
}
if (tasks != null && tasks.size() > 0) {
- Log.d(TAG_USER, "User0 unlocked, run queued tasks:" + tasks.size());
+ Slog.d(TAG, "User0 unlocked, run queued tasks:" + tasks.size());
for (Runnable r : tasks) {
r.run();
}
@@ -1834,7 +1834,7 @@
} else if (mAm.unlockUser(user, null, null, null)) {
startedUsers.add(user);
} else { // started but cannot unlock
- Log.w(TAG_USER, "Background user started but cannot be unlocked:" + user);
+ Slog.w(TAG, "Background user started but cannot be unlocked:" + user);
if (mUserManager.isUserRunning(user)) {
// add to started list so that it can be stopped later.
startedUsers.add(user);
@@ -1843,7 +1843,7 @@
}
} catch (RemoteException e) {
// ignore
- Log.w(TAG_USER, "error while starting user in background", e);
+ Slog.w(TAG, "error while starting user in background", e);
}
}
// Keep only users that were re-started in mBackgroundUsersRestartedHere
@@ -1869,7 +1869,7 @@
return false;
}
if (userId == ActivityManager.getCurrentUser()) {
- Log.i(TAG_USER, "stopBackgroundUser, already a FG user:" + userId);
+ Slog.i(TAG, "stopBackgroundUser, already a FG user:" + userId);
return false;
}
try {
@@ -1882,12 +1882,12 @@
} else if (r == ActivityManager.USER_OP_IS_CURRENT) {
return false;
} else {
- Log.i(TAG_USER, "stopBackgroundUser failed, user:" + userId + " err:" + r);
+ Slog.i(TAG, "stopBackgroundUser failed, user:" + userId + " err:" + r);
return false;
}
} catch (RemoteException e) {
// ignore
- Log.w(TAG_USER, "error while stopping user", e);
+ Slog.w(TAG, "error while stopping user", e);
}
return true;
}
@@ -1919,8 +1919,8 @@
if (mUserIdForUserSwitchInProcess == UserHandle.USER_NULL
|| mUserIdForUserSwitchInProcess != userId
|| mRequestIdForUserSwitchInProcess == 0) {
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG_USER, "No user switch request Id. No android post switch sent.");
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "No user switch request Id. No android post switch sent.");
}
return;
}
@@ -1932,17 +1932,17 @@
private void handleNotifyAppUserLifecycleListeners(UserLifecycleEvent event) {
int listenersSize = mAppLifecycleListeners.size();
if (listenersSize == 0) {
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG_USER, "No app listener to be notified of " + event);
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "No app listener to be notified of " + event);
}
return;
}
// Must use a different TimingsTraceLog because it's another thread
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG_USER, "Notifying " + listenersSize + " app listeners of " + event);
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "Notifying " + listenersSize + " app listeners of " + event);
}
int userId = event.getUserId();
- TimingsTraceLog t = new TimingsTraceLog(TAG_USER, Trace.TRACE_TAG_SYSTEM_SERVER);
+ TimingsTraceLog t = new TimingsTraceLog(TAG, Trace.TRACE_TAG_SYSTEM_SERVER);
int eventType = event.getEventType();
t.traceBegin("notify-app-listeners-user-" + userId + "-event-" + eventType);
for (int i = 0; i < listenersSize; i++) {
@@ -1957,8 +1957,8 @@
data.putInt(CarUserManager.BUNDLE_PARAM_PREVIOUS_USER_ID, fromUserId);
}
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG_USER, "Notifying listener for uid " + uid);
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "Notifying listener for uid " + uid);
}
EventLog.writeEvent(EventLogTags.CAR_USER_SVC_NOTIFY_APP_LIFECYCLE_LISTENER,
uid, eventType, fromUserId, userId);
@@ -1966,7 +1966,7 @@
t.traceBegin("notify-app-listener-uid-" + uid);
listener.send(userId, data);
} catch (RemoteException e) {
- Log.e(TAG_USER, "Error calling lifecycle listener", e);
+ Slog.e(TAG, "Error calling lifecycle listener", e);
} finally {
t.traceEnd();
}
@@ -1975,13 +1975,13 @@
}
private void handleNotifyServiceUserLifecycleListeners(UserLifecycleEvent event) {
- TimingsTraceLog t = new TimingsTraceLog(TAG_USER, Trace.TRACE_TAG_SYSTEM_SERVER);
+ TimingsTraceLog t = new TimingsTraceLog(TAG, Trace.TRACE_TAG_SYSTEM_SERVER);
if (mUserLifecycleListeners.isEmpty()) {
- Log.w(TAG_USER, "Not notifying internal UserLifecycleListeners");
+ Slog.w(TAG, "Not notifying internal UserLifecycleListeners");
return;
- } else if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG_USER, "Notifying " + mUserLifecycleListeners.size() + " service listeners of "
- + event);
+ } else if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "Notifying " + mUserLifecycleListeners.size()
+ + " service listeners of " + event);
}
int userId = event.getUserId();
@@ -1995,7 +1995,7 @@
t.traceBegin("notify-listener-" + listenerName);
listener.onEvent(event);
} catch (RuntimeException e) {
- Log.e(TAG_USER,
+ Slog.e(TAG,
"Exception raised when invoking onEvent for " + listenerName, e);
} finally {
t.traceEnd();
@@ -2005,8 +2005,8 @@
}
private void onUserSwitching(@UserIdInt int fromUserId, @UserIdInt int toUserId) {
- Log.i(TAG_USER, "onUserSwitching() callback for user " + toUserId);
- TimingsTraceLog t = new TimingsTraceLog(TAG_USER, Trace.TRACE_TAG_SYSTEM_SERVER);
+ Slog.i(TAG, "onUserSwitching() callback for user " + toUserId);
+ TimingsTraceLog t = new TimingsTraceLog(TAG, Trace.TRACE_TAG_SYSTEM_SERVER);
t.traceBegin("onUserSwitching-" + toUserId);
// Switch HAL users if user switch is not requested by CarUserService
@@ -2027,8 +2027,8 @@
private void notifyHalLegacySwitch(@UserIdInt int fromUserId, @UserIdInt int toUserId) {
synchronized (mLockUser) {
if (mUserIdForUserSwitchInProcess != UserHandle.USER_NULL) {
- if (Log.isLoggable(TAG_USER, Log.DEBUG)) {
- Log.d(TAG, "notifyHalLegacySwitch(" + fromUserId + ", " + toUserId
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Slog.d(TAG, "notifyHalLegacySwitch(" + fromUserId + ", " + toUserId
+ "): not needed, normal switch for " + mUserIdForUserSwitchInProcess);
}
return;
@@ -2145,19 +2145,19 @@
private boolean startFirstPassenger(@UserIdInt int driverId) {
int zoneId = getAvailablePassengerZone();
if (zoneId == OccupantZoneInfo.INVALID_ZONE_ID) {
- Log.w(TAG_USER, "passenger occupant zone is not found");
+ Slog.w(TAG, "passenger occupant zone is not found");
return false;
}
List<UserInfo> passengers = getPassengers(driverId);
if (passengers.size() < 1) {
- Log.w(TAG_USER, "passenger is not found");
+ Slog.w(TAG, "passenger is not found");
return false;
}
// Only one passenger is supported. If there are two or more passengers, the first passenger
// is chosen.
int passengerId = passengers.get(0).id;
if (!startPassenger(passengerId, zoneId)) {
- Log.w(TAG_USER, "cannot start passenger " + passengerId);
+ Slog.w(TAG, "cannot start passenger " + passengerId);
return false;
}
return true;
@@ -2182,7 +2182,7 @@
int currentUser = ActivityManager.getCurrentUser();
int profileCount = getNumberOfManagedProfiles(currentUser);
if (profileCount > 0) {
- Log.w(TAG_USER, "max profile of user" + currentUser
+ Slog.w(TAG, "max profile of user" + currentUser
+ " is exceeded: current profile count is " + profileCount);
return;
}
@@ -2190,7 +2190,7 @@
UserInfo passenger = createPassenger("Passenger", currentUser);
if (passenger == null) {
// Couldn't create user, most likely because there are too many.
- Log.w(TAG_USER, "cannot create a passenger user");
+ Slog.w(TAG, "cannot create a passenger user");
return;
}
}
@@ -2200,7 +2200,7 @@
ZoneUserBindingHelper helper = null;
synchronized (mLockHelper) {
if (mZoneUserBindingHelper == null) {
- Log.w(TAG_USER, "implementation is not delegated");
+ Slog.w(TAG, "implementation is not delegated");
return new ArrayList<OccupantZoneInfo>();
}
helper = mZoneUserBindingHelper;
@@ -2212,7 +2212,7 @@
ZoneUserBindingHelper helper = null;
synchronized (mLockHelper) {
if (mZoneUserBindingHelper == null) {
- Log.w(TAG_USER, "implementation is not delegated");
+ Slog.w(TAG, "implementation is not delegated");
return false;
}
helper = mZoneUserBindingHelper;
@@ -2224,7 +2224,7 @@
ZoneUserBindingHelper helper = null;
synchronized (mLockHelper) {
if (mZoneUserBindingHelper == null) {
- Log.w(TAG_USER, "implementation is not delegated");
+ Slog.w(TAG, "implementation is not delegated");
return false;
}
helper = mZoneUserBindingHelper;
@@ -2236,7 +2236,7 @@
ZoneUserBindingHelper helper = null;
synchronized (mLockHelper) {
if (mZoneUserBindingHelper == null) {
- Log.w(TAG_USER, "implementation is not delegated");
+ Slog.w(TAG, "implementation is not delegated");
return false;
}
helper = mZoneUserBindingHelper;
diff --git a/service/src/com/android/car/user/InitialUserSetter.java b/service/src/com/android/car/user/InitialUserSetter.java
index 10a6b2e..2ffcc13 100644
--- a/service/src/com/android/car/user/InitialUserSetter.java
+++ b/service/src/com/android/car/user/InitialUserSetter.java
@@ -34,7 +34,6 @@
import android.os.UserManager;
import android.provider.Settings;
import android.sysprop.CarProperties;
-import android.util.Log;
import android.util.Pair;
import android.util.Slog;
import android.util.TimingsTraceLog;
@@ -374,7 +373,7 @@
private void executeDefaultBehavior(@NonNull InitialUserInfo info, boolean fallback) {
if (!hasInitialUser()) {
- if (DBG) Log.d(TAG, "executeDefaultBehavior(): no initial user, creating it");
+ if (DBG) Slog.d(TAG, "executeDefaultBehavior(): no initial user, creating it");
createAndSwitchUser(new Builder(TYPE_CREATE)
.setNewUserName(mNewUserName)
.setNewUserFlags(UserFlags.ADMIN)
@@ -382,7 +381,7 @@
.setUserLocales(info.userLocales)
.build(), fallback);
} else {
- if (DBG) Log.d(TAG, "executeDefaultBehavior(): switching to initial user");
+ if (DBG) Slog.d(TAG, "executeDefaultBehavior(): switching to initial user");
int userId = getInitialUser(info.supportsOverrideUserIdProperty);
switchUser(new Builder(TYPE_SWITCH)
.setSwitchUserId(userId)
@@ -397,12 +396,12 @@
@NonNull String reason) {
if (!fallback) {
// Only log the error
- Log.w(TAG, reason);
+ Slog.w(TAG, reason);
// Must explicitly tell listener that initial user could not be determined
notifyListener(/*initialUser= */ null);
return;
}
- Log.w(TAG, "Falling back to default behavior. Reason: " + reason);
+ Slog.w(TAG, "Falling back to default behavior. Reason: " + reason);
executeDefaultBehavior(info, /* fallback= */ false);
}
@@ -411,7 +410,7 @@
boolean replaceGuest = info.replaceGuest;
if (DBG) {
- Log.d(TAG, "switchUser(): userId=" + userId + ", replaceGuest=" + replaceGuest
+ Slog.d(TAG, "switchUser(): userId=" + userId + ", replaceGuest=" + replaceGuest
+ ", fallback=" + fallback);
}
@@ -471,7 +470,7 @@
if (mLockPatternUtils.isSecure(user.id)) {
if (DBG) {
- Log.d(TAG, "replaceGuestIfNeeded(), skipped, since user "
+ Slog.d(TAG, "replaceGuestIfNeeded(), skipped, since user "
+ user.id + " has secure lock pattern");
}
return false;
@@ -498,7 +497,7 @@
return user;
}
- Log.i(TAG, "Replacing guest (" + user.toFullString() + ")");
+ Slog.i(TAG, "Replacing guest (" + user.toFullString() + ")");
int halFlags = UserFlags.GUEST;
if (user.isEphemeral()) {
@@ -507,13 +506,13 @@
// TODO(b/150413515): decide whether we should allow it or not. Right now we're
// just logging, as UserManagerService will automatically set it to ephemeral if
// platform is set to do so.
- Log.w(TAG, "guest being replaced is not ephemeral: " + user.toFullString());
+ Slog.w(TAG, "guest being replaced is not ephemeral: " + user.toFullString());
}
if (!mUm.markGuestForDeletion(user.id)) {
// Don't need to recover in case of failure - most likely create new user will fail
// because there is already a guest
- Log.w(TAG, "failed to mark guest " + user.id + " for deletion");
+ Slog.w(TAG, "failed to mark guest " + user.id + " for deletion");
}
Pair<UserInfo, String> result = createNewUser(new Builder(TYPE_CREATE)
@@ -523,7 +522,7 @@
String errorMessage = result.second;
if (errorMessage != null) {
- Log.w(TAG, "could not replace guest " + user.toFullString() + ": " + errorMessage);
+ Slog.w(TAG, "could not replace guest " + user.toFullString() + ": " + errorMessage);
return null;
}
@@ -556,7 +555,7 @@
int halFlags = info.newUserFlags;
if (DBG) {
- Log.d(TAG, "createUser(name=" + UserHelperLite.safeName(name) + ", flags="
+ Slog.d(TAG, "createUser(name=" + UserHelperLite.safeName(name) + ", flags="
+ userFlagsToString(halFlags) + ")");
}
@@ -567,11 +566,11 @@
if (UserHalHelper.isAdmin(halFlags)) {
boolean validAdmin = true;
if (UserHalHelper.isGuest(halFlags)) {
- Log.w(TAG, "Cannot create guest admin");
+ Slog.w(TAG, "Cannot create guest admin");
validAdmin = false;
}
if (UserHalHelper.isEphemeral(halFlags)) {
- Log.w(TAG, "Cannot create ephemeral admin");
+ Slog.w(TAG, "Cannot create ephemeral admin");
validAdmin = false;
}
if (!validAdmin) {
@@ -586,7 +585,7 @@
: UserManager.USER_TYPE_FULL_SECONDARY;
if (DBG) {
- Log.d(TAG, "calling am.createUser((name=" + UserHelperLite.safeName(name) + ", type="
+ Slog.d(TAG, "calling am.createUser((name=" + UserHelperLite.safeName(name) + ", type="
+ type + ", flags=" + UserInfo.flagsToString(flags) + ")");
}
@@ -596,11 +595,11 @@
+ userFlagsToString(halFlags) + "): failed to create user");
}
- if (DBG) Log.d(TAG, "user created: " + userInfo.id);
+ if (DBG) Slog.d(TAG, "user created: " + userInfo.id);
if (info.userLocales != null) {
if (DBG) {
- Log.d(TAG, "setting locale for user " + userInfo.id + " to " + info.userLocales);
+ Slog.d(TAG, "setting locale for user " + userInfo.id + " to " + info.userLocales);
}
Settings.System.putStringForUser(mContext.getContentResolver(),
Settings.System.SYSTEM_LOCALES, info.userLocales, userInfo.id);
@@ -611,7 +610,7 @@
@VisibleForTesting
void unlockSystemUser() {
- Log.i(TAG, "unlocking system user");
+ Slog.i(TAG, "unlocking system user");
IActivityManager am = ActivityManager.getService();
TimingsTraceLog t = new TimingsTraceLog(TAG, Trace.TRACE_TAG_SYSTEM_SERVER);
@@ -623,19 +622,19 @@
boolean started = am.startUserInBackground(UserHandle.USER_SYSTEM);
t.traceEnd();
if (!started) {
- Log.w(TAG, "could not restart system user in foreground; trying unlock instead");
+ Slog.w(TAG, "could not restart system user in foreground; trying unlock instead");
t.traceBegin("am.unlockUser");
boolean unlocked = am.unlockUser(UserHandle.USER_SYSTEM, /* token= */ null,
/* secret= */ null, /* listener= */ null);
t.traceEnd();
if (!unlocked) {
- Log.w(TAG, "could not unlock system user neither");
+ Slog.w(TAG, "could not unlock system user neither");
return;
}
}
} catch (RemoteException e) {
// should not happen for local call.
- Log.wtf("RemoteException from AMS", e);
+ Slog.wtf("RemoteException from AMS", e);
} finally {
t.traceEnd();
}
@@ -650,13 +649,13 @@
try {
return ActivityManager.getService().startUserInForegroundWithListener(userId, null);
} catch (RemoteException e) {
- Log.w(TAG, "failed to start user " + userId, e);
+ Slog.w(TAG, "failed to start user " + userId, e);
return false;
}
}
private void notifyListener(@Nullable UserInfo initialUser) {
- if (DBG) Log.d(TAG, "notifyListener(): " + initialUser);
+ if (DBG) Slog.d(TAG, "notifyListener(): " + initialUser);
mListener.accept(initialUser);
}
@@ -675,7 +674,7 @@
*/
public void setLastActiveUser(@UserIdInt int userId) {
if (UserHelperLite.isHeadlessSystemUser(userId)) {
- if (DBG) Log.d(TAG, "setLastActiveUser(): ignoring headless system user " + userId);
+ if (DBG) Slog.d(TAG, "setLastActiveUser(): ignoring headless system user " + userId);
return;
}
setUserIdGlobalProperty(CarSettings.Global.LAST_ACTIVE_USER_ID, userId);
@@ -683,7 +682,7 @@
// TODO(b/155918094): change method to receive a UserInfo instead
UserInfo user = mUm.getUserInfo(userId);
if (user == null) {
- Log.w(TAG, "setLastActiveUser(): user " + userId + " doesn't exist");
+ Slog.w(TAG, "setLastActiveUser(): user " + userId + " doesn't exist");
return;
}
if (!user.isEphemeral()) {
@@ -692,7 +691,7 @@
}
private void setUserIdGlobalProperty(@NonNull String name, @UserIdInt int userId) {
- if (DBG) Log.d(TAG, "setting global property " + name + " to " + userId);
+ if (DBG) Slog.d(TAG, "setting global property " + name + " to " + userId);
Settings.Global.putInt(mContext.getContentResolver(), name, userId);
}
@@ -732,7 +731,7 @@
// If an override user is present and a real user, return it
if (bootUserOverride != BOOT_USER_NOT_FOUND
&& allUsers.contains(bootUserOverride)) {
- Log.i(TAG, "Boot user id override found for initial user, user id: "
+ Slog.i(TAG, "Boot user id override found for initial user, user id: "
+ bootUserOverride);
return bootUserOverride;
}
@@ -741,7 +740,7 @@
// If the last active user is not the SYSTEM user and is a real user, return it
int lastActiveUser = getUserIdGlobalProperty(CarSettings.Global.LAST_ACTIVE_USER_ID);
if (allUsers.contains(lastActiveUser)) {
- Log.i(TAG, "Last active user loaded for initial user: " + lastActiveUser);
+ Slog.i(TAG, "Last active user loaded for initial user: " + lastActiveUser);
return lastActiveUser;
}
resetUserIdGlobalProperty(CarSettings.Global.LAST_ACTIVE_USER_ID);
@@ -749,7 +748,7 @@
int lastPersistentUser = getUserIdGlobalProperty(
CarSettings.Global.LAST_ACTIVE_PERSISTENT_USER_ID);
if (allUsers.contains(lastPersistentUser)) {
- Log.i(TAG, "Last active, persistent user loaded for initial user: "
+ Slog.i(TAG, "Last active, persistent user loaded for initial user: "
+ lastPersistentUser);
return lastPersistentUser;
}
@@ -760,8 +759,8 @@
// TODO(b/158101909): the smallest user id is not always the initial user; a better approach
// would be looking for the first ADMIN user, or keep track of all last active users (not
// just the very last)
- Log.w(TAG, "Last active user (" + lastActiveUser + ") not found. Returning smallest user id"
- + " instead: " + returnId);
+ Slog.w(TAG, "Last active user (" + lastActiveUser + ") not found. Returning smallest user "
+ + "id instead: " + returnId);
return returnId;
}
@@ -820,7 +819,7 @@
}
private void resetUserIdGlobalProperty(@NonNull String name) {
- if (DBG) Log.d(TAG, "resetting global property " + name);
+ if (DBG) Slog.d(TAG, "resetting global property " + name);
Settings.Global.putInt(mContext.getContentResolver(), name, UserHandle.USER_NULL);
}
@@ -828,7 +827,7 @@
private int getUserIdGlobalProperty(@NonNull String name) {
int userId = Settings.Global.getInt(mContext.getContentResolver(), name,
UserHandle.USER_NULL);
- if (DBG) Log.d(TAG, "getting global property " + name + ": " + userId);
+ if (DBG) Slog.d(TAG, "getting global property " + name + ": " + userId);
return userId;
}
diff --git a/service/src/com/android/car/vms/VmsBrokerService.java b/service/src/com/android/car/vms/VmsBrokerService.java
index 31c60bd..cae6d1f 100644
--- a/service/src/com/android/car/vms/VmsBrokerService.java
+++ b/service/src/com/android/car/vms/VmsBrokerService.java
@@ -38,7 +38,7 @@
import android.os.SharedMemory;
import android.util.ArrayMap;
import android.util.ArraySet;
-import android.util.Log;
+import android.util.Slog;
import com.android.car.CarServiceBase;
import com.android.car.stats.CarStatsService;
@@ -129,7 +129,7 @@
assertAnyVmsPermission(mContext);
int clientUid = mGetCallingUid.getAsInt();
String clientPackage = mPackageManager.getNameForUid(clientUid);
- if (DBG) Log.d(TAG, "registerClient uid: " + clientUid + " package: " + clientPackage);
+ if (DBG) Slog.d(TAG, "registerClient uid: " + clientUid + " package: " + clientPackage);
mStatsService.getVmsClientLogger(clientUid)
.logConnectionState(VmsClientLogger.ConnectionState.CONNECTED);
@@ -241,7 +241,7 @@
.collect(Collectors.toList());
}
- if (DBG) Log.d(TAG, String.format("Number of subscribers: %d", subscribers.size()));
+ if (DBG) Slog.d(TAG, String.format("Number of subscribers: %d", subscribers.size()));
if (subscribers.isEmpty()) {
// A negative UID signals that the packet had zero subscribers
@@ -257,7 +257,7 @@
} catch (RuntimeException e) {
mStatsService.getVmsClientLogger(subscriber.getUid())
.logPacketDropped(layer, packetLength);
- Log.e(TAG, String.format("Unable to publish to listener: %s",
+ Slog.e(TAG, String.format("Unable to publish to listener: %s",
subscriber.getPackageName()), e);
}
}
@@ -314,12 +314,12 @@
}
private void notifyOfAvailabilityChange(VmsAvailableLayers availableLayers) {
- Log.i(TAG, "Notifying clients of layer availability change: " + availableLayers);
+ Slog.i(TAG, "Notifying clients of layer availability change: " + availableLayers);
for (VmsClientInfo client : getActiveClients()) {
try {
client.getCallback().onLayerAvailabilityChanged(availableLayers);
} catch (RemoteException e) {
- Log.w(TAG, "onLayersAvailabilityChanged failed: " + client.getPackageName(),
+ Slog.w(TAG, "onLayersAvailabilityChanged failed: " + client.getPackageName(),
e);
}
}
@@ -369,12 +369,12 @@
}
private void notifyOfSubscriptionChange(VmsSubscriptionState subscriptionState) {
- Log.i(TAG, "Notifying clients of subscription state change: " + subscriptionState);
+ Slog.i(TAG, "Notifying clients of subscription state change: " + subscriptionState);
for (VmsClientInfo client : getActiveClients()) {
try {
client.getCallback().onSubscriptionStateChanged(subscriptionState);
} catch (RemoteException e) {
- Log.w(TAG, "onSubscriptionStateChanged failed: " + client.getPackageName(),
+ Slog.w(TAG, "onSubscriptionStateChanged failed: " + client.getPackageName(),
e);
}
}
diff --git a/service/src/com/android/car/vms/VmsLayerAvailability.java b/service/src/com/android/car/vms/VmsLayerAvailability.java
index 3521336..b1eeeda 100644
--- a/service/src/com/android/car/vms/VmsLayerAvailability.java
+++ b/service/src/com/android/car/vms/VmsLayerAvailability.java
@@ -21,7 +21,7 @@
import android.car.vms.VmsLayer;
import android.car.vms.VmsLayerDependency;
import android.car.vms.VmsLayersOffering;
-import android.util.Log;
+import android.util.Slog;
import com.android.internal.annotations.GuardedBy;
@@ -123,7 +123,7 @@
Set<VmsLayer> currentAvailableLayers,
Set<VmsLayer> cyclicAvoidanceSet) {
if (DBG) {
- Log.d(TAG, "addLayerToAvailabilityCalculationLocked: checking layer: " + layer);
+ Slog.d(TAG, "addLayerToAvailabilityCalculationLocked: checking layer: " + layer);
}
// If we already know that this layer is supported then we are done.
if (currentAvailableLayers.contains(layer)) {
@@ -135,7 +135,7 @@
}
// Avoid cyclic dependency.
if (cyclicAvoidanceSet.contains(layer)) {
- Log.e(TAG, "Detected a cyclic dependency: " + cyclicAvoidanceSet + " -> " + layer);
+ Slog.e(TAG, "Detected a cyclic dependency: " + cyclicAvoidanceSet + " -> " + layer);
return;
}
// A layer may have multiple dependency sets. The layer is available if any dependency
diff --git a/service/src/com/android/car/watchdog/CarWatchdogService.java b/service/src/com/android/car/watchdog/CarWatchdogService.java
index f4daf8f..3276291 100644
--- a/service/src/com/android/car/watchdog/CarWatchdogService.java
+++ b/service/src/com/android/car/watchdog/CarWatchdogService.java
@@ -45,7 +45,7 @@
import android.os.RemoteException;
import android.os.UserHandle;
import android.os.UserManager;
-import android.util.Log;
+import android.util.Slog;
import android.util.SparseArray;
import android.util.SparseBooleanArray;
@@ -132,7 +132,7 @@
mCarWatchdogDaemonHelper.addOnConnectionChangeListener(mConnectionListener);
mCarWatchdogDaemonHelper.connect();
if (DEBUG) {
- Log.d(TAG, "CarWatchdogService is initialized");
+ Slog.d(TAG, "CarWatchdogService is initialized");
}
}
@@ -180,7 +180,7 @@
public void registerClient(ICarWatchdogServiceCallback client, int timeout) {
ArrayList<ClientInfo> clients = mClientMap.get(timeout);
if (clients == null) {
- Log.w(TAG, "Cannot register the client: invalid timeout");
+ Slog.w(TAG, "Cannot register the client: invalid timeout");
return;
}
synchronized (mLock) {
@@ -188,7 +188,7 @@
for (int i = 0; i < clients.size(); i++) {
ClientInfo clientInfo = clients.get(i);
if (binder == clientInfo.client.asBinder()) {
- Log.w(TAG,
+ Slog.w(TAG,
"Cannot register the client: the client(pid:" + clientInfo.pid
+ ") has been already registered");
return;
@@ -200,12 +200,12 @@
try {
clientInfo.linkToDeath();
} catch (RemoteException e) {
- Log.w(TAG, "Cannot register the client: linkToDeath to the client failed");
+ Slog.w(TAG, "Cannot register the client: linkToDeath to the client failed");
return;
}
clients.add(clientInfo);
if (DEBUG) {
- Log.d(TAG, "Client(pid: " + pid + ") is registered");
+ Slog.d(TAG, "Client(pid: " + pid + ") is registered");
}
}
}
@@ -228,13 +228,13 @@
clientInfo.unlinkToDeath();
clients.remove(i);
if (DEBUG) {
- Log.d(TAG, "Client(pid: " + clientInfo.pid + ") is unregistered");
+ Slog.d(TAG, "Client(pid: " + clientInfo.pid + ") is unregistered");
}
return;
}
}
}
- Log.w(TAG, "Cannot unregister the client: the client has not been registered before");
+ Slog.w(TAG, "Cannot unregister the client: the client has not been registered before");
return;
}
@@ -270,10 +270,10 @@
try {
mCarWatchdogDaemonHelper.registerCarWatchdogService(mWatchdogServiceForSystem);
if (DEBUG) {
- Log.d(TAG, "CarWatchdogService registers to car watchdog daemon");
+ Slog.d(TAG, "CarWatchdogService registers to car watchdog daemon");
}
} catch (RemoteException | RuntimeException e) {
- Log.w(TAG, "Cannot register to car watchdog daemon: " + e);
+ Slog.w(TAG, "Cannot register to car watchdog daemon: " + e);
}
UserManager userManager = UserManager.get(mContext);
List<UserInfo> users = userManager.getUsers();
@@ -291,7 +291,7 @@
}
}
} catch (RemoteException | RuntimeException e) {
- Log.w(TAG, "Notifying system state change failed: " + e);
+ Slog.w(TAG, "Notifying system state change failed: " + e);
}
}
@@ -299,10 +299,10 @@
try {
mCarWatchdogDaemonHelper.unregisterCarWatchdogService(mWatchdogServiceForSystem);
if (DEBUG) {
- Log.d(TAG, "CarWatchdogService unregisters from car watchdog daemon");
+ Slog.d(TAG, "CarWatchdogService unregisters from car watchdog daemon");
}
} catch (RemoteException | RuntimeException e) {
- Log.w(TAG, "Cannot unregister from car watchdog daemon: " + e);
+ Slog.w(TAG, "Cannot unregister from car watchdog daemon: " + e);
}
}
@@ -366,7 +366,7 @@
try {
clientInfo.client.onCheckHealthStatus(clientInfo.sessionId, timeout);
} catch (RemoteException e) {
- Log.w(TAG, "Sending a ping message to client(pid: " + clientInfo.pid
+ Slog.w(TAG, "Sending a ping message to client(pid: " + clientInfo.pid
+ ") failed: " + e);
synchronized (mLock) {
pingedClients.remove(clientInfo.sessionId);
@@ -417,7 +417,7 @@
try {
clientInfo.client.onPrepareProcessTermination();
} catch (RemoteException e) {
- Log.w(TAG, "Notifying onPrepareProcessTermination to client(pid: " + clientInfo.pid
+ Slog.w(TAG, "Notifying onPrepareProcessTermination to client(pid: " + clientInfo.pid
+ ") failed: " + e);
}
}
@@ -426,7 +426,8 @@
mCarWatchdogDaemonHelper.tellCarWatchdogServiceAlive(
mWatchdogServiceForSystem, clientsNotResponding, sessionId);
} catch (RemoteException | RuntimeException e) {
- Log.w(TAG, "Cannot respond to car watchdog daemon (sessionId=" + sessionId + "): " + e);
+ Slog.w(TAG, "Cannot respond to car watchdog daemon (sessionId=" + sessionId + "): "
+ + e);
}
}
@@ -434,7 +435,7 @@
CarPowerManagementService powerService =
CarLocalServices.getService(CarPowerManagementService.class);
if (powerService == null) {
- Log.w(TAG, "Cannot get CarPowerManagementService");
+ Slog.w(TAG, "Cannot get CarPowerManagementService");
return;
}
powerService.registerListener(new ICarPowerStateListener.Stub() {
@@ -460,11 +461,11 @@
mCarWatchdogDaemonHelper.notifySystemStateChange(StateType.POWER_CYCLE,
powerCycle, /* arg2= */ -1);
if (DEBUG) {
- Log.d(TAG, "Notified car watchdog daemon a power cycle("
+ Slog.d(TAG, "Notified car watchdog daemon a power cycle("
+ powerCycle + ")");
}
} catch (RemoteException | RuntimeException e) {
- Log.w(TAG, "Notifying system state change failed: " + e);
+ Slog.w(TAG, "Notifying system state change failed: " + e);
}
}
});
@@ -473,7 +474,7 @@
private void subscribeUserStateChange() {
CarUserService userService = CarLocalServices.getService(CarUserService.class);
if (userService == null) {
- Log.w(TAG, "Cannot get CarUserService");
+ Slog.w(TAG, "Cannot get CarUserService");
return;
}
userService.addUserLifecycleListener((event) -> {
@@ -500,11 +501,11 @@
mCarWatchdogDaemonHelper.notifySystemStateChange(StateType.USER_STATE, userId,
userState);
if (DEBUG) {
- Log.d(TAG, "Notified car watchdog daemon a user state: userId = " + userId
+ Slog.d(TAG, "Notified car watchdog daemon a user state: userId = " + userId
+ ", userState = " + userStateDesc);
}
} catch (RemoteException | RuntimeException e) {
- Log.w(TAG, "Notifying system state change failed: " + e);
+ Slog.w(TAG, "Notifying system state change failed: " + e);
}
});
}
@@ -537,7 +538,7 @@
case TIMEOUT_NORMAL:
return "normal";
default:
- Log.w(TAG, "Unknown timeout value");
+ Slog.w(TAG, "Unknown timeout value");
return "unknown";
}
}
@@ -551,7 +552,7 @@
case TIMEOUT_NORMAL:
return 10000L;
default:
- Log.w(TAG, "Unknown timeout value");
+ Slog.w(TAG, "Unknown timeout value");
return 10000L;
}
}
@@ -568,7 +569,7 @@
public void checkIfAlive(int sessionId, int timeout) {
CarWatchdogService service = mService.get();
if (service == null) {
- Log.w(TAG, "CarWatchdogService is not available");
+ Slog.w(TAG, "CarWatchdogService is not available");
return;
}
service.postHealthCheckMessage(sessionId);
@@ -576,7 +577,7 @@
@Override
public void prepareProcessTermination() {
- Log.w(TAG, "CarWatchdogService is about to be killed by car watchdog daemon");
+ Slog.w(TAG, "CarWatchdogService is about to be killed by car watchdog daemon");
}
}
@@ -597,7 +598,7 @@
@Override
public void binderDied() {
- Log.w(TAG, "Client(pid: " + pid + ") died");
+ Slog.w(TAG, "Client(pid: " + pid + ") died");
onClientDeath(client, timeout);
}
diff --git a/tests/BugReportApp/Android.bp b/tests/BugReportApp/Android.bp
index 5c6d04b..079f433 100644
--- a/tests/BugReportApp/Android.bp
+++ b/tests/BugReportApp/Android.bp
@@ -31,6 +31,7 @@
privileged: true,
+ enforce_uses_libs: false,
dex_preopt: {
enabled: false,
},
diff --git a/tests/CarVoiceServiceTriggerApp/Android.bp b/tests/CarVoiceServiceTriggerApp/Android.bp
index 9355d7c..54514c1 100644
--- a/tests/CarVoiceServiceTriggerApp/Android.bp
+++ b/tests/CarVoiceServiceTriggerApp/Android.bp
@@ -31,6 +31,7 @@
enabled: false,
},
+ enforce_uses_libs: false,
dex_preopt: {
enabled: false,
},
diff --git a/tests/DefaultStorageMonitoringCompanionApp/Android.bp b/tests/DefaultStorageMonitoringCompanionApp/Android.bp
index 60a70b3..097914e 100644
--- a/tests/DefaultStorageMonitoringCompanionApp/Android.bp
+++ b/tests/DefaultStorageMonitoringCompanionApp/Android.bp
@@ -31,6 +31,7 @@
privileged: true,
+ enforce_uses_libs: false,
dex_preopt: {
enabled: false,
},
diff --git a/tests/DiagnosticTools/Android.bp b/tests/DiagnosticTools/Android.bp
index c988eb3..49f2083 100644
--- a/tests/DiagnosticTools/Android.bp
+++ b/tests/DiagnosticTools/Android.bp
@@ -30,6 +30,7 @@
enabled: false,
},
+ enforce_uses_libs: false,
dex_preopt: {
enabled: false,
},
diff --git a/tests/EmbeddedKitchenSinkApp/Android.bp b/tests/EmbeddedKitchenSinkApp/Android.bp
index 926221e..6492d78 100644
--- a/tests/EmbeddedKitchenSinkApp/Android.bp
+++ b/tests/EmbeddedKitchenSinkApp/Android.bp
@@ -31,6 +31,7 @@
enabled: false,
},
+ enforce_uses_libs: false,
dex_preopt: {
enabled: false,
},
diff --git a/tests/GarageModeTestApp/Android.bp b/tests/GarageModeTestApp/Android.bp
index fa0e987..1a60695 100644
--- a/tests/GarageModeTestApp/Android.bp
+++ b/tests/GarageModeTestApp/Android.bp
@@ -27,6 +27,7 @@
enabled: false,
},
+ enforce_uses_libs: false,
dex_preopt: {
enabled: false,
},
diff --git a/tests/MultiDisplayTest/Android.bp b/tests/MultiDisplayTest/Android.bp
index 6c7e553..7ce8950 100644
--- a/tests/MultiDisplayTest/Android.bp
+++ b/tests/MultiDisplayTest/Android.bp
@@ -20,6 +20,7 @@
// Only compile source java files in this apk.
srcs: ["src/**/*.java"],
+ enforce_uses_libs: false,
dex_preopt: {
enabled: false,
},
diff --git a/tests/MultiDisplayTestHelloActivity/Android.bp b/tests/MultiDisplayTestHelloActivity/Android.bp
index 4031ce4..05a19db 100644
--- a/tests/MultiDisplayTestHelloActivity/Android.bp
+++ b/tests/MultiDisplayTestHelloActivity/Android.bp
@@ -22,6 +22,7 @@
sdk_version: "current",
+ enforce_uses_libs: false,
dex_preopt: {
enabled: false,
},
diff --git a/tests/NetworkPreferenceApp/Android.bp b/tests/NetworkPreferenceApp/Android.bp
index 08e69f1..1ef04b4 100644
--- a/tests/NetworkPreferenceApp/Android.bp
+++ b/tests/NetworkPreferenceApp/Android.bp
@@ -27,6 +27,7 @@
enabled: false,
},
+ enforce_uses_libs: false,
dex_preopt: {
enabled: false,
},
diff --git a/tests/SampleCustomInputService/Android.bp b/tests/SampleCustomInputService/Android.bp
index 1762cde..9d2eaf6 100644
--- a/tests/SampleCustomInputService/Android.bp
+++ b/tests/SampleCustomInputService/Android.bp
@@ -26,8 +26,8 @@
sdk_version: "system_current",
- // This app should be platform signed because it requires android.permission.MONITOR_INPUT
- // permission, which is of type "signature".
+ // This app should be platform signed because it requires
+ // android.car.permission.CAR_MONITOR_INPUT permission, which is of type "signature".
certificate: "platform",
optimize: {
@@ -43,6 +43,7 @@
"androidx.annotation_annotation",
],
+ enforce_uses_libs: false,
dex_preopt: {
enabled: false,
},
@@ -56,16 +57,12 @@
android_test {
name: "SampleCustomInputServiceTest",
-
srcs: [
"tests/src/**/*.java",
":SampleCustomInputService-srcs",
],
-
manifest: "tests/AndroidManifest.xml",
-
platform_apis: true,
-
static_libs: [
"mockito-target-extended",
"androidx.test.core",
@@ -73,7 +70,6 @@
"androidx.test.rules",
"truth-prebuilt",
],
-
libs: [
"android.car-system-stubs",
"android.test.mock",
@@ -85,7 +81,6 @@
jni_libs: [
"libdexmakerjvmtiagent",
],
-
optimize: {
enabled: false,
},
diff --git a/tests/SampleCustomInputService/res/drawable/custom_input_ref_service.png b/tests/SampleCustomInputService/res/drawable/custom_input_ref_service.png
deleted file mode 100644
index 4814ff1..0000000
--- a/tests/SampleCustomInputService/res/drawable/custom_input_ref_service.png
+++ /dev/null
Binary files differ
diff --git a/tests/SampleCustomInputService/src/com/android/car/custominput/sample/SampleCustomInputService.java b/tests/SampleCustomInputService/src/com/android/car/custominput/sample/SampleCustomInputService.java
index eccbbd6..a4714ab 100644
--- a/tests/SampleCustomInputService/src/com/android/car/custominput/sample/SampleCustomInputService.java
+++ b/tests/SampleCustomInputService/src/com/android/car/custominput/sample/SampleCustomInputService.java
@@ -15,9 +15,6 @@
*/
package com.android.car.custominput.sample;
-import android.app.Notification;
-import android.app.NotificationChannel;
-import android.app.NotificationManager;
import android.app.Service;
import android.car.Car;
import android.car.CarOccupantZoneManager;
@@ -43,39 +40,19 @@
private static final String TAG = SampleCustomInputService.class.getSimpleName();
- private static final String CHANNEL_ID = SampleCustomInputService.class.getSimpleName();
- private static final int FOREGROUND_ID = 1;
-
private Car mCar;
private CarInputManager mCarInputManager;
private CustomInputEventListener mEventHandler;
@Override
- public void onCreate() {
- super.onCreate();
- startForeground();
- }
-
- private void startForeground() {
- // TODO(b/12219669): Start this service from carservice, then the code in below
- // won't be needed.
- NotificationChannel channel = new NotificationChannel(CHANNEL_ID,
- CHANNEL_ID,
- NotificationManager.IMPORTANCE_DEFAULT);
- NotificationManager notificationManager = getSystemService(NotificationManager.class);
- notificationManager.createNotificationChannel(channel);
- Notification notification = new Notification.Builder(getApplicationContext(), CHANNEL_ID)
- .setContentTitle("SampleCustomInputService")
- .setContentText("Processing...")
- .setSmallIcon(R.drawable.custom_input_ref_service)
- .build();
- startForeground(FOREGROUND_ID, notification);
- }
-
- @Override
- public int onStartCommand(Intent intent, int flags, int startId) {
- connectToCarService();
- return START_STICKY;
+ public IBinder onBind(Intent intent) {
+ if (Log.isLoggable(TAG, Log.DEBUG)) {
+ Log.d(TAG, "Entering onBind with intent={" + intent + "}");
+ }
+ if (intent != null) {
+ connectToCarService();
+ }
+ return null;
}
private void connectToCarService() {
@@ -107,7 +84,7 @@
@Override
public void onDestroy() {
if (Log.isLoggable(TAG, Log.DEBUG)) {
- Log.d(TAG, "Service destroyed");
+ Log.d(TAG, "Entering onDestroy");
}
if (mCarInputManager != null) {
mCarInputManager.releaseInputEventCapture(CarOccupantZoneManager.DISPLAY_TYPE_MAIN);
@@ -119,11 +96,6 @@
}
@Override
- public IBinder onBind(Intent intent) {
- return null;
- }
-
- @Override
public void onCustomInputEvents(int targetDisplayType,
@NonNull List<CustomInputEvent> events) {
for (CustomInputEvent event : events) {
diff --git a/tests/UxRestrictionsSample/Android.bp b/tests/UxRestrictionsSample/Android.bp
index 7da64f6..e4b9d96 100644
--- a/tests/UxRestrictionsSample/Android.bp
+++ b/tests/UxRestrictionsSample/Android.bp
@@ -27,6 +27,7 @@
enabled: false,
},
+ enforce_uses_libs: false,
dex_preopt: {
enabled: false,
},
diff --git a/tests/carservice_unit_test/src/com/android/car/power/CarPowerManagementServiceUnitTest.java b/tests/carservice_unit_test/src/com/android/car/power/CarPowerManagementServiceUnitTest.java
index 8e09b0d..ad527b1 100644
--- a/tests/carservice_unit_test/src/com/android/car/power/CarPowerManagementServiceUnitTest.java
+++ b/tests/carservice_unit_test/src/com/android/car/power/CarPowerManagementServiceUnitTest.java
@@ -21,9 +21,13 @@
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.fail;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.timeout;
import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.testng.Assert.assertThrows;
@@ -63,6 +67,7 @@
import com.android.car.test.utils.TemporaryFile;
import com.android.car.user.CarUserService;
import com.android.internal.app.IVoiceInteractionManagerService;
+import com.android.internal.os.IResultReceiver;
import org.junit.After;
import org.junit.Before;
@@ -352,6 +357,20 @@
}
@Test
+ public void testFactoryResetOnResume() throws Exception {
+ IResultReceiver callback = mock(IResultReceiver.class);
+ mService.setFactoryResetCallback(callback);
+
+ // TODO: shouldn't need to expose handleOn() but rather emulate the steps as it's done on
+ // suspendAndResume(), but that method is making too many expectations that won't happen
+ // it's factory reset
+ mService.handleOn();
+
+ // Arguments don't matter
+ verify(callback).send(anyInt(), any());
+ }
+
+ @Test
public void testDefinePowerPolicyFromCommand() throws Exception {
String policyId = "policy_id_valid";
String errMsg = mService.definePowerPolicy(policyId, new String[]{"AUDIO", "BLUETOOTH"},
diff --git a/tests/obd2_app/Android.bp b/tests/obd2_app/Android.bp
index bde35b2..607a429 100644
--- a/tests/obd2_app/Android.bp
+++ b/tests/obd2_app/Android.bp
@@ -29,6 +29,7 @@
enabled: false,
},
+ enforce_uses_libs: false,
dex_preopt: {
enabled: false,
},
diff --git a/tests/obd2_test/Android.bp b/tests/obd2_test/Android.bp
index 499455c..6b3a495 100644
--- a/tests/obd2_test/Android.bp
+++ b/tests/obd2_test/Android.bp
@@ -27,6 +27,11 @@
enabled: false,
},
+ enforce_uses_libs: false,
+ dex_preopt: {
+ enabled: false,
+ },
+
static_libs: [
"com.android.car.obd2",
"androidx.test.rules",
diff --git a/tests/usb/AoapHostApp/Android.bp b/tests/usb/AoapHostApp/Android.bp
index f6dedf6..183ffc7 100644
--- a/tests/usb/AoapHostApp/Android.bp
+++ b/tests/usb/AoapHostApp/Android.bp
@@ -29,6 +29,11 @@
enabled: false,
},
+ enforce_uses_libs: false,
+ dex_preopt: {
+ enabled: false,
+ },
+
static_libs: [
"android.car",
],