Merge "Fix a race condition in DeviceOwnerProvisioningService"
diff --git a/res/layout/delete_managed_profile_dialog.xml b/res/layout/delete_managed_profile_dialog.xml
new file mode 100644
index 0000000..795d3eb
--- /dev/null
+++ b/res/layout/delete_managed_profile_dialog.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (C) 2015 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.
+ */
+-->
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ style="@style/DialogFragmentTextContainer">
+
+ <ScrollView
+ android:layout_weight="1"
+ android:layout_height="0dp"
+ style="@style/ScrollView">
+
+ <LinearLayout
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/delete_managed_profile_opening_paragraph"
+ android:text="@string/opening_paragraph_delete_profile_unknown_company"
+ style="@style/MainText"/>
+
+ <LinearLayout
+ android:layout_width="wrap_content"
+ android:layout_height="@dimen/row_height"
+ android:paddingTop="@dimen/row_padding_top"
+ android:layout_alignParentLeft="true"
+ android:layout_centerInParent="true"
+ android:layout_gravity="center_vertical">
+ <ImageView
+ android:id="@+id/delete_managed_profile_mdm_icon_view"
+ android:layout_width="@dimen/icon_width_height"
+ android:layout_height="@dimen/icon_width_height"
+ android:scaleType="center"/>
+ <TextView
+ android:id="@+id/delete_managed_profile_device_manager_name"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:paddingLeft="@dimen/main_text_padding_left_right"
+ android:gravity="center_vertical"
+ android:textColor="@color/text_black"
+ android:textSize="@dimen/main_text_size"/>
+ </LinearLayout>
+
+ <TextView
+ android:id="@+id/delete_managed_profile_read_more_link"
+ android:text="@string/read_more_delete_profile"
+ android:visibility="gone"
+ style="@style/MainText"/>
+
+ <TextView
+ android:id="@+id/delete_managed_profile_closing_paragraph"
+ android:text="@string/sure_you_want_to_delete_profile"
+ style="@style/MainText"/>
+
+ </LinearLayout>
+
+ </ScrollView>
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/row_height"
+ android:paddingTop="@dimen/row_padding_top">
+
+ <Button
+ android:id="@+id/delete_managed_profile_positive_button"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentBottom="true"
+ android:text="@string/delete_profile"
+ android:textColor="@color/colored_button"
+ style="@style/TransparentButton" />
+
+ <Button
+ android:id="@+id/delete_managed_profile_negative_button"
+ android:layout_alignParentBottom="true"
+ android:layout_toLeftOf="@id/delete_managed_profile_positive_button"
+ android:text="@string/cancel_delete_profile"
+ style="@style/TransparentButton" />
+
+ </RelativeLayout>
+
+</LinearLayout>
\ No newline at end of file
diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml
index 90079e4..05b9771 100644
--- a/res/values-af/strings.xml
+++ b/res/values-af/strings.xml
@@ -32,9 +32,12 @@
<string name="cancel_setup" msgid="2949928239276274745">"Kanselleer"</string>
<string name="ok_setup" msgid="5148111905838329307">"Goed"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Werkprofiel"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
- <skip />
- <string name="delete_profile" msgid="7107020982626129151">"Verwyder"</string>
+ <string name="delete_profile_title" msgid="3097803266123463699">"Verwyder werkprofiel?"</string>
+ <string name="opening_paragraph_delete_profile_unknown_company" msgid="1132833578783368037">"Hierdie werkprofiel word bestuur deur:"</string>
+ <string name="opening_paragraph_delete_profile_known_company" msgid="3126629826260821264">"Hierdie werkprofiel word vir %s bestuur met behulp van:"</string>
+ <string name="read_more_delete_profile" msgid="8108077458455321659"><a href="#read_this_link">"Lees dit asseblief"</a>" voordat jy voortgaan."</string>
+ <string name="sure_you_want_to_delete_profile" msgid="1336653819166266605">"Alle programme en data in hierdie profiel sal uitgevee word as jy voortgaan."</string>
+ <string name="delete_profile" msgid="2299218578684663459">"Vee uit"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Kanselleer"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Jy moet jou toestel enkripteer om voort te gaan om jou werkprofiel op te stel. Dit kan \'n ruk duur."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Jy moet jou toestel enkripteer om voort te gaan om jou toestel op te stel. Dit kan \'n ruk duur."</string>
diff --git a/res/values-am/strings.xml b/res/values-am/strings.xml
index cb5ef35..d3bb1d9 100644
--- a/res/values-am/strings.xml
+++ b/res/values-am/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"ይቅር"</string>
<string name="ok_setup" msgid="5148111905838329307">"እሺ"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"የስራ መገለጫ"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"አስወግድ"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"ሰርዝ"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"ይቅር"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"የስራ መገለጫዎን ማዋቀር ለመቀጠል መሣሪያዎን ማመስጠር አለብዎት። ይሄ የተወሰነ ጊዜ ሊወስድ ይችላል።"</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"መሣሪያዎን ማዋቀርዎን ለመቀጠል መሣሪያዎን ማመሳጠር ያስፈልግዎታል። ይህ የተወሰነ ጊዜ ሊወስድ ይችላል።"</string>
diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml
index 8fb49f1..2e6a4ad 100644
--- a/res/values-ar/strings.xml
+++ b/res/values-ar/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"إلغاء"</string>
<string name="ok_setup" msgid="5148111905838329307">"موافق"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"الملف الشخصي للعمل"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"إزالة"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"حذف"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"إلغاء"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"لمتابعة إعداد الملف الشخصي للعمل، يجب عليك تشفير الجهاز. قد يستغرق هذا بعض الوقت."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"لمتابعة إعداد جهازك، يجب عليك تشفير الجهاز. قد يستغرق هذا بعض الوقت."</string>
diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml
index 5d19c39..d59898c 100644
--- a/res/values-bg/strings.xml
+++ b/res/values-bg/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Отказ"</string>
<string name="ok_setup" msgid="5148111905838329307">"ОK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Служебен потребителски профил"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Премахване"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Изтриване"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Отказ"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"За да продължите с настройването на служебния си потребителски профил, трябва да шифровате устройството си. Това може да отнеме известно време."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"За да продължите с настройването на устройството си, трябва да го шифровате. Това може да отнеме известно време."</string>
diff --git a/res/values-bn-rBD/strings.xml b/res/values-bn-rBD/strings.xml
index efa0445..9f6a432 100644
--- a/res/values-bn-rBD/strings.xml
+++ b/res/values-bn-rBD/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"বাতিল করুন"</string>
<string name="ok_setup" msgid="5148111905838329307">"ঠিক আছে"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"কর্মস্থলের প্রোফাইল"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"সরান"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"মুছুন"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"বাতিল করুন"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"আপনার কর্মস্থলের প্রোফাইল সেট আপ করা অবিরত রাখতে, আপনাকে আপনার ডিভাইস এনক্রিপ্ট করতে হবে। এর জন্য কিছুক্ষণ সময় লাগবে।"</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"আপনার ডিভাইস সেট আপ করা চালিয়ে যেতে, আপনাকে আপনার ডিভাইস এনক্রিপ্ট করতে হবে৷ এটি কিছুটা সময় নিতে পারে৷"</string>
diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml
index 4faaf47..77c8124 100644
--- a/res/values-ca/strings.xml
+++ b/res/values-ca/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Cancel·la"</string>
<string name="ok_setup" msgid="5148111905838329307">"D\'ACORD"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Perfil professional"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Suprimeix"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Suprimeix"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Cancel·la"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Per continuar amb la configuració del perfil professional, hauràs d\'encriptar el dispositiu. És possible que tardis una estona a fer-ho."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Per continuar configurant el dispositiu, hauràs d\'encriptar-lo. És possible que tardis una estona a fer-ho."</string>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index e883c33..4c27ced 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Zrušit"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Pracovní profil"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Odstranit"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Smazat"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Zrušit"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Chcete-li v nastavování pracovního profilu pokračovat, bude třeba zařízení zašifrovat. Může to chvíli trvat."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Chcete-li v nastavování zařízení pokračovat, budete jej muset zašifrovat. Může to chvíli trvat."</string>
diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml
index 6793e63..dc2a472 100644
--- a/res/values-da/strings.xml
+++ b/res/values-da/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Annuller"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Arbejdsprofil"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Fjern"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Slet"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Annuller"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Du skal kryptere din enhed, inden du kan fortsætte konfigurationen af din arbejdsprofil. Dette kan tage et stykke tid."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Du skal kryptere din enhed, inden du kan fortsætte konfigurationen. Dette kan tage et stykke tid."</string>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 6982dbb..49857a3 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Abbrechen"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Arbeitsprofil"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Entfernen"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Löschen"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Abbrechen"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Um mit dem Einrichten Ihres Arbeitsprofils fortzufahren, müssen Sie Ihr Gerät verschlüsseln. Dies kann einige Zeit dauern."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Um mit dem Einrichten Ihres Geräts fortzufahren, müssen Sie Ihr Gerät verschlüsseln. Dies kann einige Zeit dauern."</string>
diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml
index 375de10..f202df9 100644
--- a/res/values-el/strings.xml
+++ b/res/values-el/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Ακύρωση"</string>
<string name="ok_setup" msgid="5148111905838329307">"ΟΚ"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Προφίλ εργασίας"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Κατάργηση"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Διαγραφή"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Ακύρωση"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Για να συνεχίσετε με τη ρύθμιση του προφίλ εργασίας σας, θα πρέπει να κρυπτογραφήσετε τη συσκευή σας. Αυτό μπορεί να διαρκέσει λίγη ώρα."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Για να συνεχίσετε με τη ρύθμιση της συσκευής σας, θα πρέπει να την κρυπτογραφήσετε. Αυτό μπορεί να διαρκέσει λίγη ώρα."</string>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index 4b7a4bf..010e8f2 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -32,9 +32,12 @@
<string name="cancel_setup" msgid="2949928239276274745">"Cancel"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Work profile"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
- <skip />
- <string name="delete_profile" msgid="7107020982626129151">"Remove"</string>
+ <string name="delete_profile_title" msgid="3097803266123463699">"Remove work profile?"</string>
+ <string name="opening_paragraph_delete_profile_unknown_company" msgid="1132833578783368037">"This work profile is managed by:"</string>
+ <string name="opening_paragraph_delete_profile_known_company" msgid="3126629826260821264">"This work profile is managed for %s using:"</string>
+ <string name="read_more_delete_profile" msgid="8108077458455321659">"Please "<a href="#read_this_link">"read this"</a>" before proceeding."</string>
+ <string name="sure_you_want_to_delete_profile" msgid="1336653819166266605">"All apps and data in this profile will be deleted if you continue."</string>
+ <string name="delete_profile" msgid="2299218578684663459">"Delete"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Cancel"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"To continue setting up your work profile, you\'ll need to encrypt your device. This may take some time."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"To continue setting up your device, you\'ll need to encrypt your device. This may take some time."</string>
diff --git a/res/values-en-rIN/strings.xml b/res/values-en-rIN/strings.xml
index 4b7a4bf..010e8f2 100644
--- a/res/values-en-rIN/strings.xml
+++ b/res/values-en-rIN/strings.xml
@@ -32,9 +32,12 @@
<string name="cancel_setup" msgid="2949928239276274745">"Cancel"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Work profile"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
- <skip />
- <string name="delete_profile" msgid="7107020982626129151">"Remove"</string>
+ <string name="delete_profile_title" msgid="3097803266123463699">"Remove work profile?"</string>
+ <string name="opening_paragraph_delete_profile_unknown_company" msgid="1132833578783368037">"This work profile is managed by:"</string>
+ <string name="opening_paragraph_delete_profile_known_company" msgid="3126629826260821264">"This work profile is managed for %s using:"</string>
+ <string name="read_more_delete_profile" msgid="8108077458455321659">"Please "<a href="#read_this_link">"read this"</a>" before proceeding."</string>
+ <string name="sure_you_want_to_delete_profile" msgid="1336653819166266605">"All apps and data in this profile will be deleted if you continue."</string>
+ <string name="delete_profile" msgid="2299218578684663459">"Delete"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Cancel"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"To continue setting up your work profile, you\'ll need to encrypt your device. This may take some time."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"To continue setting up your device, you\'ll need to encrypt your device. This may take some time."</string>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
index 59a55fa..0e16a3d 100644
--- a/res/values-es-rUS/strings.xml
+++ b/res/values-es-rUS/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Cancelar"</string>
<string name="ok_setup" msgid="5148111905838329307">"Aceptar"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Perfil de trabajo"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Eliminar"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Eliminar"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Cancelar"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Para continuar con la configuración del perfil de trabajo, deberás encriptar el dispositivo. Esto podría tardar un poco."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Para continuar con la configuración del dispositivo, deberás encriptarlo. Esto podría tardar un poco."</string>
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
index 8e14afb..d364b26 100644
--- a/res/values-es/strings.xml
+++ b/res/values-es/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Cancelar"</string>
<string name="ok_setup" msgid="5148111905838329307">"Aceptar"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Perfil de trabajo"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Eliminar"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Eliminar"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Cancelar"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Para seguir configurando tu perfil de trabajo, tendrás que cifrar el dispositivo. Este proceso puede tardar unos minutos."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Para seguir configurando tu dispositivo, tendrás que cifrarlo. Este proceso puede tardar unos minutos."</string>
diff --git a/res/values-et-rEE/strings.xml b/res/values-et-rEE/strings.xml
index 245d2b7..c406086 100644
--- a/res/values-et-rEE/strings.xml
+++ b/res/values-et-rEE/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Tühista"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Tööprofiil"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Eemalda"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Kustuta"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Tühista"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Tööprofiili seadistamise jätkamiseks peate seadme krüpteerima. Selleks võib kuluda pisut aega."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Seadme seadistamise jätkamiseks peate selle krüpteerima. Selleks võib kuluda pisut aega."</string>
diff --git a/res/values-eu-rES/strings.xml b/res/values-eu-rES/strings.xml
index 34b620e..737ab7e 100644
--- a/res/values-eu-rES/strings.xml
+++ b/res/values-eu-rES/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Utzi"</string>
<string name="ok_setup" msgid="5148111905838329307">"Ados"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Laneko profila"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Kendu"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Ezabatu"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Utzi"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Laneko profila konfiguratzen jarraitzeko, gailua enkriptatu beharko duzu. Minutu batzuk behar izan ditzakegu horretarako."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Gailua konfiguratzen jarraitzeko, gailua enkriptatu beharko duzu. Denbora pixka bat behar izan daiteke horretarako."</string>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index 43b0bc4..6c4d76e 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"لغو"</string>
<string name="ok_setup" msgid="5148111905838329307">"تأیید"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"نمایه کاری"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"حذف"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"حذف"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"لغو"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"برای ادامه تنظیم نمایه کاریتان، باید دستگاهتان را رمزگذاری کنید. شاید این کار مدتی طول بکشد."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"برای ادامه تنظیم دستگاهتان، باید دستگاهتان را رمزگذاری کنید. شاید این کار مدتی طول بکشد."</string>
diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml
index 618161f..453edc5 100644
--- a/res/values-fi/strings.xml
+++ b/res/values-fi/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Peruuta"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Työprofiili"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Poista"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Poista"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Peruuta"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Työprofiilin määritysten jatkaminen edellyttää laitteen salaamista. Tämä voi kestää hetken."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Jos haluat jatkaa laitteen asennusta, sinun on salattava se. Tämä voi kestää hetken."</string>
diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml
index d20730d..b2eb546 100644
--- a/res/values-fr-rCA/strings.xml
+++ b/res/values-fr-rCA/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Annuler"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Profil professionnel"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Supprimer"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Supprimer"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Annuler"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Pour continuer la configuration de votre profil professionnel, vous devrez chiffrer votre appareil. Cela peut prendre un certain temps."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Pour continuer la configuration de votre appareil, vous devrez le chiffrer. Cela peut prendre un certain temps."</string>
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 6efac6f..0e836e1 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Annuler"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Profil professionnel"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Supprimer"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Supprimer"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Annuler"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Pour poursuivre la configuration de votre profil professionnel, vous devez chiffrer les données de votre appareil. Cette opération peut prendre un certain temps."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Pour poursuivre la configuration de votre appareil, vous devez chiffrer les données qu\'il contient. Cette opération peut prendre un certain temps."</string>
diff --git a/res/values-gl-rES/strings.xml b/res/values-gl-rES/strings.xml
index bf28b33..9b47919 100644
--- a/res/values-gl-rES/strings.xml
+++ b/res/values-gl-rES/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Cancelar"</string>
<string name="ok_setup" msgid="5148111905838329307">"Aceptar"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Perfil do traballo"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Eliminar"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Eliminar"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Cancelar"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Para continuar coa configuración do teu perfil de traballo, terás que encriptar o teu dispositivo. Este proceso pode tardar uns minutos."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Para continuar coa configuración do dispositivo, terás que encriptar o dispositivo. Este proceso pode tardar uns minutos."</string>
diff --git a/res/values-hi/strings.xml b/res/values-hi/strings.xml
index 668055c..eefdda1 100644
--- a/res/values-hi/strings.xml
+++ b/res/values-hi/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"रहने दें"</string>
<string name="ok_setup" msgid="5148111905838329307">"ठीक"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"कार्य प्रोफ़ाइल"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"निकालें"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"हटाएं"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"रहने दें"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"अपनी कार्य प्रोफ़ाइल सेट करना जारी रखने के लिए, आपको अपने डिवाइस को एन्क्रिप्ट करना होगा. इसमें कुछ समय लग सकता है."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"अपना डिवाइस सेट करना जारी रखने के लिए, आपको अपने डिवाइस को एन्क्रिप्ट करना होगा. इसमें कुछ समय लग सकता है."</string>
diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml
index a71b326..acf32c3 100644
--- a/res/values-hr/strings.xml
+++ b/res/values-hr/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Odustani"</string>
<string name="ok_setup" msgid="5148111905838329307">"U redu"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Radni profil"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Ukloni"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Izbriši"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Odustani"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Da biste nastavili s postavljanjem svog radnog profila, morat ćete kriptirati uređaj. To može potrajati."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Da biste nastavili s postavljanjem uređaja, morat ćete ga kriptirati. To može potrajati."</string>
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
index 39dcb0e..00cb5ac 100644
--- a/res/values-hu/strings.xml
+++ b/res/values-hu/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Mégse"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Munkaprofil"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Eltávolítás"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Törlés"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Mégse"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"A munkaprofil beállításának folytatásához titkosítania kell eszközét. Ez időigényes lehet."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"A beállítás folytatásához titkosítania kell eszközét. Ez időigényes lehet."</string>
diff --git a/res/values-hy-rAM/strings.xml b/res/values-hy-rAM/strings.xml
index 0e793a2..c378fab 100644
--- a/res/values-hy-rAM/strings.xml
+++ b/res/values-hy-rAM/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Չեղարկել"</string>
<string name="ok_setup" msgid="5148111905838329307">"Լավ"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Աշխատանքային պրոֆիլ"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Հեռացնել"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Ջնջել"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Չեղարկել"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Աշխատանքային պրոֆիլի կարգավորումը շարունակելու համար դուք պետք է կոդավորեք ձեր սարքը: Կոդավորումը կարող է որոշ ժամանակ պահանջել:"</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Սարքի կարգավորումը շարունակելու համար դուք պետք է կոդավորեք այն: Կոդավորումը կարող է որոշ ժամանակ պահանջել:"</string>
diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml
index 2025120..7cb6e5c 100644
--- a/res/values-in/strings.xml
+++ b/res/values-in/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Batal"</string>
<string name="ok_setup" msgid="5148111905838329307">"Oke"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Profil kerja"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Buang"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Hapus"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Batal"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Untuk melanjutkan penyiapan profil kerja, Anda perlu mengenkripsi perangkat. Tindakan ini mungkin sedikit memakan waktu."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Untuk melanjutkan penyiapan perangkat, Anda perlu mengenkripsi perangkat. Tindakan ini mungkin sedikit memakan waktu."</string>
diff --git a/res/values-is-rIS/strings.xml b/res/values-is-rIS/strings.xml
index 3292816..557ea50 100644
--- a/res/values-is-rIS/strings.xml
+++ b/res/values-is-rIS/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Hætta við"</string>
<string name="ok_setup" msgid="5148111905838329307">"Í lagi"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Vinnusnið"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Fjarlægja"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Eyða"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Hætta við"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Til að halda uppsetningu vinnusniðsins áfram þarftu að dulkóða tækið þitt. Þetta getur tekið svolitla stund."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Til að halda uppsetningu tækisins áfram þarftu að dulkóða tækið þitt. Þetta getur tekið svolitla stund."</string>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index 703d4fd..04d71e4 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Annulla"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Profilo di lavoro"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Rimuovi"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Elimina"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Annulla"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Per continuare la configurazione del profilo di lavoro, dovrai crittografare il dispositivo. L\'operazione potrebbe richiedere del tempo."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Per continuare la configurazione del dispositivo, dovrai crittografarlo. Questa operazione potrebbe richiedere del tempo."</string>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index 13f8724..a339294 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -32,9 +32,12 @@
<string name="cancel_setup" msgid="2949928239276274745">"בטל"</string>
<string name="ok_setup" msgid="5148111905838329307">"אישור"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"פרופיל עבודה"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
- <skip />
- <string name="delete_profile" msgid="7107020982626129151">"הסר"</string>
+ <string name="delete_profile_title" msgid="3097803266123463699">"האם להסיר את פרופיל העבודה?"</string>
+ <string name="opening_paragraph_delete_profile_unknown_company" msgid="1132833578783368037">"פרופיל העבודה הזה מנוהל על ידי:"</string>
+ <string name="opening_paragraph_delete_profile_known_company" msgid="3126629826260821264">"פרופיל העבודה הזה מנוהל בשביל %s באמצעות:"</string>
+ <string name="read_more_delete_profile" msgid="8108077458455321659"><a href="#read_this_link">"קרא את המידע הזה"</a>" לפני שתמשיך."</string>
+ <string name="sure_you_want_to_delete_profile" msgid="1336653819166266605">"אם תמשיך, כל האפליקציות והנתונים בפרופיל הזה יימחקו."</string>
+ <string name="delete_profile" msgid="2299218578684663459">"מחק"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"בטל"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"כדי להמשיך בהגדרת פרופיל העבודה, יהיה עליך להצפין את המכשיר. הפעולה הזו עשויה להימשך זמן מה."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"כדי להמשיך בהגדרת המכשיר, עליך להצפין אותו. הפעולה הזו עשויה להימשך זמן מה."</string>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index bcb865f..decba0d 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"キャンセル"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"ワークプロフィール"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"削除"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"削除"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"キャンセル"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"ワークプロフィールのセットアップを続行するには、端末を暗号化する必要があります。これにはしばらく時間がかかる場合があります。"</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"端末のセットアップを続行するには、端末を暗号化する必要があります。これにはしばらく時間がかかる場合があります。"</string>
diff --git a/res/values-ka-rGE/strings.xml b/res/values-ka-rGE/strings.xml
index 410f075..52352fe 100644
--- a/res/values-ka-rGE/strings.xml
+++ b/res/values-ka-rGE/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"გაუქმება"</string>
<string name="ok_setup" msgid="5148111905838329307">"კარგი"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"სამუშაო პროფილი"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"ამოშლა"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"წაშლა"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"გაუქმება"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"თქვენი სამუშაო პროფილის შექმნის გასაგრძელებლად, უნდა დაშიფროთ თქვენი მოწყობილობა. ამას შესაძლოა გარკვეული დრო დასჭირდეს."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"თქვენი მოწყობილობის პარამეტრების დაყენების გაგრძელებისათვის, თქვენ უნდა დაშიფროთ თქვენი მოწყობილობა. ამას შესაძლოა დაჭირდეს გარკვეული დრო."</string>
diff --git a/res/values-kk-rKZ/strings.xml b/res/values-kk-rKZ/strings.xml
index d274757..bba96d1 100644
--- a/res/values-kk-rKZ/strings.xml
+++ b/res/values-kk-rKZ/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Бас тарту"</string>
<string name="ok_setup" msgid="5148111905838329307">"Жарайды"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Жұмыс профилі"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Алып тастау"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Жою"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Бас тарту"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Жұмыс профиліңізді реттеуді жалғастыру үшін құрылғыңызды шифрлауыңыз керек. Бұл біраз уақыт алуы мүмкін."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Құрылғыны реттеуді жалғастыру үшін құрылғыны шифрлау керек. Бұл біраз уақыт алуы мүмкін."</string>
diff --git a/res/values-km-rKH/strings.xml b/res/values-km-rKH/strings.xml
index 479ff08..0ab33de 100644
--- a/res/values-km-rKH/strings.xml
+++ b/res/values-km-rKH/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"បោះបង់"</string>
<string name="ok_setup" msgid="5148111905838329307">"យល់ព្រម"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"ប្រវត្តិរូបការងារ"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"លុបចេញ"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"លុប"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"បោះបង់"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"ដើម្បីបន្តរៀបចំទម្រង់ការងាររបស់អ្នក អ្នកត្រូវអ៊ិនគ្រីបឧបករណ៍របស់អ្នក។ វាអាចប្រើពេលមួយរយៈ។"</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"ដើម្បីបន្តការរៀបចំឧបករណ៍របស់អ្នក អ្នកត្រូវអ៊ិនគ្រីបឧបករណ៍របស់អ្នក។ វាអាចចំណាយពេលបន្តិច។"</string>
diff --git a/res/values-kn-rIN/strings.xml b/res/values-kn-rIN/strings.xml
index 5cab78d..13f7e38 100644
--- a/res/values-kn-rIN/strings.xml
+++ b/res/values-kn-rIN/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"ರದ್ದುಮಾಡು"</string>
<string name="ok_setup" msgid="5148111905838329307">"ಸರಿ"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"ಕೆಲಸದ ಪ್ರೊಫೈಲ್"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"ತೆಗೆದುಹಾಕಿ"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"ಅಳಿಸಿ"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"ರದ್ದುಮಾಡು"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"ನಿಮ್ಮ ಕೆಲಸದ ಪ್ರೊಫೈಲ್ ಹೊಂದಿಸುವುದನ್ನು ಮುಂದುವರಿಸಲು, ನಿಮ್ಮ ಸಾಧನವನ್ನು ನೀವು ಎನ್ಕ್ರಿಪ್ಟ್ ಮಾಡಬೇಕಾದ ಅಗತ್ಯವಿದೆ. ಇದು ಸ್ವಲ್ಪ ಸಮಯವನ್ನು ತೆಗೆದುಕೊಳ್ಳಬಹುದು."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"ನಿಮ್ಮ ಸಾಧನವನ್ನು ಹೊಂದಿಸುವುದನ್ನು ಮುಂದುವರಿಸಲು, ನಿಮ್ಮ ಸಾಧನವನ್ನು ನೀವು ಎನ್ಕ್ರಿಪ್ಟ್ ಮಾಡಬೇಕಾದ ಅಗತ್ಯವಿದೆ. ಇದಕ್ಕೆ ಸ್ವಲ್ಪ ಸಮಯ ತೆಗೆದುಕೊಳ್ಳಬಹುದು."</string>
diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml
index 6926579..3993b81 100644
--- a/res/values-ko/strings.xml
+++ b/res/values-ko/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"취소"</string>
<string name="ok_setup" msgid="5148111905838329307">"확인"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"직장 프로필"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"삭제"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"삭제"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"취소"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"직장 프로필 설정을 계속하려면 기기를 암호화해야 합니다. 이 작업은 다소 시간이 걸릴 수 있습니다."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"설정을 계속하려면 기기를 암호화해야 합니다. 이 작업은 다소 시간이 걸릴 수 있습니다."</string>
diff --git a/res/values-ky-rKG/strings.xml b/res/values-ky-rKG/strings.xml
index 99de378..7669bad 100644
--- a/res/values-ky-rKG/strings.xml
+++ b/res/values-ky-rKG/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Жокко чыгаруу"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Жумуш профили"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Алып салуу"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Жок кылуу"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Жокко чыгаруу"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Жумуш профилиңизди орнотууну улантуу үчүн, түзмөгүңүздү шифрлешиңиз керек. Буга бир аз убакыт талап кылынышы мүмкүн."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Түзмөгүңүздү орнотууну улантуу үчүн, түзмөгүңүздү шифрлешиңиз керек болот. Ал бир нече убакыт алышы мүмкүн."</string>
diff --git a/res/values-lo-rLA/strings.xml b/res/values-lo-rLA/strings.xml
index f2a13d3..5100c21 100644
--- a/res/values-lo-rLA/strings.xml
+++ b/res/values-lo-rLA/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"ຍົກເລີກ"</string>
<string name="ok_setup" msgid="5148111905838329307">"ຕົກລົງ"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"ໂປຣໄຟລ໌ບ່ອນເຮັດວຽກ"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"ລຶບ"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"ລຶບ"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"ຍົກເລີກ"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"ເພື່ອສືບຕໍ່ຕັ້ງຄ່າໂປຣໄຟລ໌ບ່ອນເຮັດວຽກຂອງທ່ານ, ທ່ານຈະຕ້ອງເຂົ້າລະຫັດອຸປະກອນຂອງທ່ານກ່ອນ. ຂັ້ນຕອນນີ້ຈະໃຊ້ເວລາໄລຍະນຶ່ງ."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"ເພື່ອສືບຕໍ່ການຕັ້ງອຸປະກອນຂອງທ່ານ, ທ່ານຈະຕ້ອງໃສ່ລະຫັດອຸປະກອນຂອງທ່ານ. ອັນນີ້ອາດຈະໃຊ້ເວລາຈັກໜ້ອຍ."</string>
diff --git a/res/values-lt/strings.xml b/res/values-lt/strings.xml
index 56165dc..3f1a572 100644
--- a/res/values-lt/strings.xml
+++ b/res/values-lt/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Atšaukti"</string>
<string name="ok_setup" msgid="5148111905838329307">"Gerai"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Darbo profilis"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Pašalinti"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Ištrinti"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Atšaukti"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Jei norite tęsti darbo profilio sąranką, turite šifruoti įrenginį. Tai gali šiek tiek užtrukti."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Jei norite tęsti įrenginio sąranką, turite šifruoti įrenginį. Tai gali šiek tiek užtrukti."</string>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index 30c6dd5..c62dc18 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Atcelt"</string>
<string name="ok_setup" msgid="5148111905838329307">"Labi"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Darba profils"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Noņemt"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Dzēst"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Atcelt"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Lai turpinātu darba profila iestatīšanu, jums ir jāšifrē sava ierīce. Tas var ilgt kādu laiku."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Lai turpinātu ierīces iestatīšanu, jums ir jāšifrē sava ierīce. Tas var ilgt kādu laiku."</string>
diff --git a/res/values-mk-rMK/strings.xml b/res/values-mk-rMK/strings.xml
index b18b8e1..725c25b 100644
--- a/res/values-mk-rMK/strings.xml
+++ b/res/values-mk-rMK/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Откажи"</string>
<string name="ok_setup" msgid="5148111905838329307">"Во ред"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Работен профил"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Отстрани"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Избриши"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Откажи"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"За да продолжите со поставување на работниот профил, ќе треба да го шифрирате уредот. Тоа може да потрае."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"За да продолжите со поставување на уредот, ќе треба да го шифрирате уредот. Тоа може да потрае."</string>
diff --git a/res/values-ml-rIN/strings.xml b/res/values-ml-rIN/strings.xml
index 02d4f5c..4bef9c6 100644
--- a/res/values-ml-rIN/strings.xml
+++ b/res/values-ml-rIN/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"റദ്ദാക്കുക"</string>
<string name="ok_setup" msgid="5148111905838329307">"ശരി"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"ഔദ്യോഗിക പ്രൊഫൈൽ"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"നീക്കംചെയ്യുക"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"ഇല്ലാതാക്കുക"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"റദ്ദാക്കുക"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"നിങ്ങളുടെ ഔദ്യോഗിക പ്രൊഫൈൽ സജ്ജീകരിക്കുന്നത് തുടരാൻ, നിങ്ങളുടെ ഉപകരണം എൻക്രിപ്റ്റ് ചെയ്യേണ്ടതുണ്ട്. ഇതിന് കുറച്ച് സമയമെടുത്തേക്കാം."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"നിങ്ങളുടെ ഉപകരണം സജ്ജീകരിക്കുന്നത് തുടരാൻ, ഉപകരണം എൻക്രിപ്റ്റ് ചെയ്യേണ്ടതുണ്ട്. ഇതിന് കുറച്ച് സമയമെടുക്കാം."</string>
diff --git a/res/values-mn-rMN/strings.xml b/res/values-mn-rMN/strings.xml
index d6a8bb2..fe71ba9 100644
--- a/res/values-mn-rMN/strings.xml
+++ b/res/values-mn-rMN/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Цуцлах"</string>
<string name="ok_setup" msgid="5148111905838329307">"ТИЙМ"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Ажлын профайл"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Хасах"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Устгах"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Цуцлах"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Ажлын профайлыг үргэлжлүүлэн суулгахын тулд өөрийн төхөөрөмжийг шифрлэх шаардлагатай. .Энэ процессийг гүйцэтгэхэд тодорхой хугацаа шаардагдах магадлалтай."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Та төхөөрөмж дээрх тохиргоог хийхийн тулд өөрийн төхөөрөмжийг шифрлэх шаардлагатай. Энэ процессийг гүйцэтгэхэд тодорхой хугацаа шаардагдах магадлалтай."</string>
diff --git a/res/values-mr-rIN/strings.xml b/res/values-mr-rIN/strings.xml
index bae5b47..a46f7db 100644
--- a/res/values-mr-rIN/strings.xml
+++ b/res/values-mr-rIN/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"रद्द करा"</string>
<string name="ok_setup" msgid="5148111905838329307">"ठीक आहे"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"कार्य प्रोफाईल"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"काढा"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"हटवा"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"रद्द करा"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"आपले कार्य प्रोफाईल सेट करणे सुरु ठेवण्यासाठी, आपल्याला आपले डिव्हाइस कूटबद्ध करणे आवश्यक असेल. यास कदाचित काही वेळ लागू शकतो."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"आपले डिव्हाइस सेट करणे सुरु ठेवण्यासाठी, आपल्याला आपले डिव्हाइस कूटबद्ध करणे आवश्यक असेल. यास कदाचित काही वेळ लागू शकतो."</string>
diff --git a/res/values-ms-rMY/strings.xml b/res/values-ms-rMY/strings.xml
index 2a3f495..7e51386 100644
--- a/res/values-ms-rMY/strings.xml
+++ b/res/values-ms-rMY/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Batal"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Profil kerja"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Alih keluar"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Padam"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Batal"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Untuk meneruskan penyediaan profil kerja anda, anda perlu menyulitkan peranti anda. Proses ini boleh mengambil masa yang lama."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Untuk meneruskan penyediaan peranti anda, anda perlu menyulitkan peranti itu. Proses ini boleh mengambil masa yang lama."</string>
diff --git a/res/values-my-rMM/strings.xml b/res/values-my-rMM/strings.xml
index 22c4f08..b8deed7 100644
--- a/res/values-my-rMM/strings.xml
+++ b/res/values-my-rMM/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"ထားတော့"</string>
<string name="ok_setup" msgid="5148111905838329307">"အိုကေ"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"အလုပ် ပရိုဖိုင်"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"ဖယ်ရှားရန်"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"ဖျက်ရန်"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"ထားတော့"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"သင့် အလုပ်ပရိုဖိုင်ကို ဆက်လက် တပ်ဆင်သတ်မှတ်ရန်၊ သင့်စက်အား လျှို့ဝှက်ကုဒ် သွင်းရမည်။ အချိန်အနည်းငယ် ကြာနိုင်သည်။"</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"သင့်စက်ပစ္စည်းအား ဆက်လက် တပ်ဆင်ရန်၊ သင့်စက်ပစ္စည်းအား လုံခြုံအောင်ပြုလုပ်ရန် လိုအပ်သည်။ ၎င်းသည် အချိန်အနည်းငယ် ယူရပါမည်။"</string>
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
index 0ea9263..367caf0 100644
--- a/res/values-nb/strings.xml
+++ b/res/values-nb/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Avbryt"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Arbeidsprofil"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Fjern"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Slett"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Avbryt"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Hvis du vil fortsette konfigurasjonen av arbeidsprofilen, må du kryptere enheten din. Dette kan ta en stund."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Hvis du vil fortsette konfigurasjonen av enheten, må du kryptere den. Dette kan ta en stund."</string>
diff --git a/res/values-ne-rNP/strings.xml b/res/values-ne-rNP/strings.xml
index 0597015..886ba2d 100644
--- a/res/values-ne-rNP/strings.xml
+++ b/res/values-ne-rNP/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"रद्द गर्नुहोस्"</string>
<string name="ok_setup" msgid="5148111905838329307">"ठीक छ"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"कार्य प्रोफाइल"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"हटाउनुहोस्"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"मेटाउनुहोस्"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"रद्द गर्नुहोस्"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"आफ्नो कार्य प्रोफाइल सेटिङ गर्ने काम जारी राख्न, तपाईंले आफ्नो यन्त्रलाई इनक्रिप्ट गर्नु पर्नेछ। यसले केही समय लिन सक्छ।"</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"आफ्नो यन्त्र सेटिङ गर्ने काम जारी राख्न, तपाईंले आफ्नो यन्त्रलाई इनक्रिप्ट गर्नु पर्नेछ। यसले केही समय लिन सक्छ।"</string>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 3f03a82..0a03e92 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Annuleren"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Werkprofiel"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Verwijderen"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Verwijderen"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Annuleren"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Als u wilt doorgaan met het instellen van uw werkprofiel, moet u uw apparaat versleutelen. Dit kan even duren."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Als u wilt doorgaan met het instellen van uw apparaat, moet u uw apparaat versleutelen. Dit kan even duren."</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 792eb28..807a55f 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Anuluj"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Profil do pracy"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Usuń"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Usuń"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Anuluj"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Aby kontynuować konfigurowanie profilu do pracy, musisz zaszyfrować swoje urządzenie. Może to trochę potrwać."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Aby kontynuować konfigurowanie urządzenia, musisz je zaszyfrować. Może to trochę potrwać."</string>
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
index d119804..bdbdef9 100644
--- a/res/values-pt-rPT/strings.xml
+++ b/res/values-pt-rPT/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Cancelar"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Perfil de trabalho"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Remover"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Eliminar"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Cancelar"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Para continuar a configuração do seu perfil de trabalho, tem de encriptar o dispositivo. Esta ação poderá demorar algum tempo."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Para continuar a configuração do seu dispositivo, tem de o encriptar. Esta ação pode demorar algum tempo."</string>
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
index 6025bb2..9fdfb67 100644
--- a/res/values-pt/strings.xml
+++ b/res/values-pt/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Cancelar"</string>
<string name="ok_setup" msgid="5148111905838329307">"Ok"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Perfil de trabalho"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Remover"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Excluir"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Cancelar"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Para continuar a configuração do perfil de trabalho, você precisará criptografar o dispositivo. Isso pode demorar algum tempo."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Para continuar a configuração do seu dispositivo, você precisará criptografá-lo. Isso pode demorar algum tempo."</string>
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
index 184e883..a513516 100644
--- a/res/values-ro/strings.xml
+++ b/res/values-ro/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Anulați"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Profilul de serviciu"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Ștergeți"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Ștergeți"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Anulați"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Pentru a continua configurarea profilului de serviciu, va trebui să criptați dispozitivul. Acest proces poate dura un timp."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Pentru a continua configurarea dispozitivului, va trebui să criptați dispozitivul. Acest proces poate dura un timp."</string>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 7fa5c6d..2726715 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Отмена"</string>
<string name="ok_setup" msgid="5148111905838329307">"ОК"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Рабочий профиль"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Удалить"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Удалить"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Отмена"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Чтобы продолжить настройку рабочего профиля, зашифруйте данные на устройстве. Шифрование займет некоторое время."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Чтобы продолжить настройку, зашифруйте данные на устройстве. Шифрование займет некоторое время."</string>
diff --git a/res/values-si-rLK/strings.xml b/res/values-si-rLK/strings.xml
index 46f1dc8..560c58e 100644
--- a/res/values-si-rLK/strings.xml
+++ b/res/values-si-rLK/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"අවලංගු කරන්න"</string>
<string name="ok_setup" msgid="5148111905838329307">"හරි"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"කාර්යාල පැතිකඩ"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"ඉවත් කරන්න"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"මකන්න"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"අවලංගු කරන්න"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"ඔබගේ කාර්යාල පැතිකඩේ සැකසීම ඉදිරියට කරගෙන යෑමට, ඔබගේ උපාංගය සංකේතනය කිරීමට ඔබට අවශ්ය වේ. මෙයට ටික වෙලාවක් ගත වේ."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"ඔබගේ උපාංගය සකස් කිරීම ඉදිරියට යෑමට, ඔබගේ උපාංගය සංකේතනය කිරීමට ඔබට අවශ්ය වේ. මෙයට ටික වේලාවක් ගනී."</string>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index f4ef6c1..34930e1 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Zrušiť"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Pracovný profil"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Odstrániť"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Odstrániť"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Zrušiť"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Ak chcete v nastavovaní pracovného profilu pokračovať, bude potrebné zariadenie zašifrovať. To môže chvíľu trvať."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Ak chcete v nastavovaní zariadenia pokračovať, budete ho musieť zašifrovať. To môže chvíľu trvať."</string>
diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml
index 10afba4..9175e35 100644
--- a/res/values-sl/strings.xml
+++ b/res/values-sl/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Prekliči"</string>
<string name="ok_setup" msgid="5148111905838329307">"V redu"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Delovni profil"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Odstrani"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Izbriši"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Prekliči"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Če želite nadaljevati nastavitev delovnega profila, morate šifrirati napravo. To bo morda trajalo nekaj časa."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Če želite nadaljevati nastavitev naprave, jo morate šifrirati. To bo morda trajalo nekaj časa."</string>
diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml
index 6fa9894..cff9283 100644
--- a/res/values-sr/strings.xml
+++ b/res/values-sr/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Откажи"</string>
<string name="ok_setup" msgid="5148111905838329307">"Потврди"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Профил за посао"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Уклони"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Избриши"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Откажи"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Да бисте наставили са подешавањем пословног профила, морате да шифрујете уређај. То може да потраје."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Да бисте наставили са подешавањем уређаја, треба да шифрујете уређај. То може да потраје."</string>
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
index 189f663..cd1dab2 100644
--- a/res/values-sv/strings.xml
+++ b/res/values-sv/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Avbryt"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Arbetsprofil"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Ta bort"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Radera"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Avbryt"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Innan du kan fortsätta med att konfigurera arbetsprofilen måste enheten krypteras. Det kan ta en stund."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Innan du kan fortsätta med konfigureringen måste enheten krypteras. Det kan ta en stund."</string>
@@ -65,7 +73,7 @@
<string name="device_owner_error_already_provisioned" msgid="1902305486832057049">"Enheten har redan konfigurerats"</string>
<string name="device_owner_error_wifi" msgid="4256310285761332378">"Det gick inte att ansluta till Wi-Fi"</string>
<string name="device_owner_error_hash_mismatch" msgid="184518450016295596">"Det gick inte att använda administrationsappen på grund av en felaktig kontrollsumma. Kontakta IT-avdelningen."</string>
- <string name="device_owner_error_download_failed" msgid="4520111971592657116">"Det gick inte att hämta administrationsappen"</string>
+ <string name="device_owner_error_download_failed" msgid="4520111971592657116">"Det gick inte att ladda ned administrationsappen"</string>
<string name="device_owner_error_package_invalid" msgid="3816725179069202140">"Administrationsappen kan inte användas. Komponenter saknas eller appen har skadats. Kontakta IT-avdelningen."</string>
<string name="device_owner_error_installation_failed" msgid="684566845601079360">"Det gick inte att installera administrationsappen"</string>
<string name="device_owner_error_package_not_installed" msgid="6095079346537408556">"Administrationsappen har inte installerats på enheten"</string>
diff --git a/res/values-sw/strings.xml b/res/values-sw/strings.xml
index fd7cc2d..e1110cc 100644
--- a/res/values-sw/strings.xml
+++ b/res/values-sw/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Ghairi"</string>
<string name="ok_setup" msgid="5148111905838329307">"SAWA"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Wasifu wa kazini"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Ondoa"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Futa"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Ghairi"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Ili uendelee kusanidi wasifu wako wa kazini, utahitaji kusimba kifaa chako kwa njia fiche. Hatua hii inaweza kuchukua muda."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Ili uendelee kusanidi kifaa chako, itabidi usimbe kifaa chako kwa njia fiche. Hatua hii inaweza kuchukua muda."</string>
diff --git a/res/values-ta-rIN/strings.xml b/res/values-ta-rIN/strings.xml
index eae5888..38e468f 100644
--- a/res/values-ta-rIN/strings.xml
+++ b/res/values-ta-rIN/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"ரத்துசெய்"</string>
<string name="ok_setup" msgid="5148111905838329307">"சரி"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"பணி சுயவிவரம்"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"அகற்று"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"நீக்கு"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"ரத்துசெய்"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"பணி சுயவிவரத்தை அமைப்பதைத் தொடர, சாதனத்தை மறையாக்க வேண்டும். அதற்குச் சிறிது நேரம் ஆகலாம்."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"சாதனத்தை அமைப்பதைத் தொடர, சாதனத்தை மறையாக்க வேண்டும். அதற்குச் சிறிது நேரம் ஆகலாம்."</string>
diff --git a/res/values-te-rIN/strings.xml b/res/values-te-rIN/strings.xml
index e641989..35a6f5b 100644
--- a/res/values-te-rIN/strings.xml
+++ b/res/values-te-rIN/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"రద్దు చేయి"</string>
<string name="ok_setup" msgid="5148111905838329307">"సరే"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"కార్యాలయ ప్రొఫైల్"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"తీసివేయి"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"తొలగించు"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"రద్దు చేయి"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"మీ కార్యాలయ ప్రొఫైల్ని సెటప్ చేయడం కొనసాగించడానికి, మీరు మీ పరికరాన్ని గుప్తీకరించాలి. దీనికి కొంత సమయం పట్టవచ్చు."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"మీ పరికరాన్ని సెటప్ చేయడం కొనసాగించడానికి, మీరు మీ పరికరాన్ని గుప్తీకరించాలి. దీనికి కొంత సమయం పట్టవచ్చు."</string>
diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml
index 8b3d6b4..3c66900 100644
--- a/res/values-th/strings.xml
+++ b/res/values-th/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"ยกเลิก"</string>
<string name="ok_setup" msgid="5148111905838329307">"ตกลง"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"โปรไฟล์งาน"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"นำออก"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"ลบ"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"ยกเลิก"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"หากต้องการตั้งค่าโปรไฟล์งานต่อ คุณต้องเข้ารหัสอุปกรณ์ ซึ่งอาจใช้เวลาสักครู่หนึ่ง"</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"หากต้องการตั้งค่าอุปกรณ์ต่อ คุณต้องเข้ารหัสอุปกรณ์ ซึ่งอาจใช้เวลาสักครู่หนึ่ง"</string>
diff --git a/res/values-tl/strings.xml b/res/values-tl/strings.xml
index 375bfc2..0269e43 100644
--- a/res/values-tl/strings.xml
+++ b/res/values-tl/strings.xml
@@ -32,9 +32,12 @@
<string name="cancel_setup" msgid="2949928239276274745">"Kanselahin"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Profile sa trabaho"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
- <skip />
- <string name="delete_profile" msgid="7107020982626129151">"Alisin"</string>
+ <string name="delete_profile_title" msgid="3097803266123463699">"Alisin ang profile sa trabaho?"</string>
+ <string name="opening_paragraph_delete_profile_unknown_company" msgid="1132833578783368037">"Ang profile sa trabahong ito ay pinamamahalaan ng:"</string>
+ <string name="opening_paragraph_delete_profile_known_company" msgid="3126629826260821264">"Pinamamahalaan ang profile sa trabahong ito para sa %s gamit ang:"</string>
+ <string name="read_more_delete_profile" msgid="8108077458455321659"><a href="#read_this_link">"Pakibasa ito"</a>" bago magpatuloy."</string>
+ <string name="sure_you_want_to_delete_profile" msgid="1336653819166266605">"Ide-delete ang lahat ng app at data sa profile na ito kung magpapatuloy ka."</string>
+ <string name="delete_profile" msgid="2299218578684663459">"I-delete"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Kanselahin"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Upang magpatuloy sa pagse-set up ng iyong profile sa trabaho, kakailanganin mong i-encrypt ang iyong device. Maaaring medyo matagalan ang paggawa nito."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Upang magpatuloy sa pagse-set up ng iyong device, kakailanganin mong i-encrypt ang iyong device. Maaaring medyo matagalan ang paggawa nito."</string>
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
index 3180ff8..aac762f 100644
--- a/res/values-tr/strings.xml
+++ b/res/values-tr/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"İptal"</string>
<string name="ok_setup" msgid="5148111905838329307">"Tamam"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"İş profili"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Kaldır"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Sil"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"İptal"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"İş profilinizin kurulum işlemlerine devam etmek için cihazınızı şifrelemelisiniz. Bu işlem biraz zaman alabilir."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Cihazınızın kurulumuna devam etmek için cihazınızı şifrelemelisiniz. Bu işlem biraz zaman alabilir."</string>
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
index 1495d57..aeb4118 100644
--- a/res/values-uk/strings.xml
+++ b/res/values-uk/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Скасувати"</string>
<string name="ok_setup" msgid="5148111905838329307">"ОК"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Робочий профіль"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Видалити"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Видалити"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Скасувати"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Щоб налаштувати робочий профіль, потрібно зашифрувати пристрій. Це може зайняти деякий час."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Щоб налаштувати пристрій, його потрібно зашифрувати. Це може зайняти деякий час."</string>
diff --git a/res/values-ur-rPK/strings.xml b/res/values-ur-rPK/strings.xml
index addc576..98e49bf 100644
--- a/res/values-ur-rPK/strings.xml
+++ b/res/values-ur-rPK/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"منسوخ کریں"</string>
<string name="ok_setup" msgid="5148111905838329307">"ٹھیک ہے"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"دفتر کا پروفائل"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"ہٹائیں"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"حذف کریں"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"منسوخ کریں"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"اپنے دفتری پروفائل کو ترتیب دینا جاری رکھنے کیلئے، آپ کو اپنے آلہ کو مرموز کرنے کی ضرورت ہوگی۔ اس میں کچھ وقت لگ سکتا ہے۔"</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"اپنے آلہ کو ترتیب دینا جاری رکھنے کیلئے، آپ کو اپنے آلہ کو مرموز کرنے کی ضرورت ہوگی۔ اس میں کچھ وقت لگ سکتا ہے۔"</string>
diff --git a/res/values-uz-rUZ/strings.xml b/res/values-uz-rUZ/strings.xml
index a5644ad..25f9260 100644
--- a/res/values-uz-rUZ/strings.xml
+++ b/res/values-uz-rUZ/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Bekor qilish"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Ishchi profil"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"O‘chirish"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"O‘chirish"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Bekor qilish"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Qurilmani sozlashda davom etish uchun qurilmangizni shifrlashingiz lozim. Bu biroz vaqt olishi mumkin."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Qurilmani sozlashda davom etish uchun qurilmangizni shifrlashingiz lozim. Bu biroz vaqt olishi mumkin."</string>
diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml
index 392b573..2f1d771 100644
--- a/res/values-vi/strings.xml
+++ b/res/values-vi/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Hủy"</string>
<string name="ok_setup" msgid="5148111905838329307">"OK"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Hồ sơ công việc"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Xóa"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Xóa"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Hủy"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Để tiếp tục thiết lập hồ sơ công việc, bạn cần mã hóa thiết bị của mình. Quá trình này có thể mất vài phút."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Để tiếp tục thiết lập thiết bị, bạn cần mã hóa thiết bị của mình. Quá trình này có thể mất vài phút."</string>
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
index f5b24ad..80ac0b7 100644
--- a/res/values-zh-rCN/strings.xml
+++ b/res/values-zh-rCN/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"取消"</string>
<string name="ok_setup" msgid="5148111905838329307">"确定"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"工作资料"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"移除"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"删除"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"取消"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"要继续设置工作资料,您需要对设备进行加密。此过程可能需要一段时间。"</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"要继续设置您的设备,您需要对其进行加密。此过程可能需要一段时间。"</string>
diff --git a/res/values-zh-rHK/strings.xml b/res/values-zh-rHK/strings.xml
index d5ed077..fe5be40 100644
--- a/res/values-zh-rHK/strings.xml
+++ b/res/values-zh-rHK/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"取消"</string>
<string name="ok_setup" msgid="5148111905838329307">"確定"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"公司檔案"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"移除"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"刪除"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"取消"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"如要繼續設定公司檔案,您必須為裝置加密。這項操作可能需要一段時間才能完成。"</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"如要繼續設定您的裝置,您必須為裝置加密。這項操作可能需要一段時間才能完成。"</string>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 92bc24a..25ee5b4 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"取消"</string>
<string name="ok_setup" msgid="5148111905838329307">"確定"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"工作設定檔"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"移除"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"刪除"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"取消"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"您必須為裝置加密才能繼續設定 Work 設定檔,這項程序需要一段時間。"</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"您必須為裝置加密才能繼續設定裝置,這項程序需要一段時間。"</string>
diff --git a/res/values-zu/strings.xml b/res/values-zu/strings.xml
index 78cccc3..18d41d6 100644
--- a/res/values-zu/strings.xml
+++ b/res/values-zu/strings.xml
@@ -32,9 +32,17 @@
<string name="cancel_setup" msgid="2949928239276274745">"Khansela"</string>
<string name="ok_setup" msgid="5148111905838329307">"KULUNGILE"</string>
<string name="default_managed_profile_name" msgid="5370257687074907055">"Iphrofayela yomsebenzi"</string>
- <!-- no translation found for sure_you_want_to_delete_profile (7224378572575035461) -->
+ <!-- no translation found for delete_profile_title (3097803266123463699) -->
<skip />
- <string name="delete_profile" msgid="7107020982626129151">"Susa"</string>
+ <!-- no translation found for opening_paragraph_delete_profile_unknown_company (1132833578783368037) -->
+ <skip />
+ <!-- no translation found for opening_paragraph_delete_profile_known_company (3126629826260821264) -->
+ <skip />
+ <!-- no translation found for read_more_delete_profile (8108077458455321659) -->
+ <skip />
+ <!-- no translation found for sure_you_want_to_delete_profile (1336653819166266605) -->
+ <skip />
+ <string name="delete_profile" msgid="2299218578684663459">"Susa"</string>
<string name="cancel_delete_profile" msgid="5155447537894046036">"Khansela"</string>
<string name="encrypt_device_text_for_profile_owner_setup" msgid="4325067657681168120">"Ukuze uqhubeke ngokusetha iphrofayela yakho yomsebenzi, uzodinga ukubethela idivayisi yakho. Lokhu kungatha isikhashana."</string>
<string name="encrypt_device_text_for_device_owner_setup" msgid="7279768314707033707">"Ukuze uqhubeke nokusehta idivayisi yakho, uzodinga ukubethela idivayisi yakho. Lokhu kungathatha isikhathi."</string>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index b366e19..7bde082 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -53,10 +53,23 @@
<!-- Default profile name used for the creation of work profiles. [CHAR LIMIT=NONE] -->
<string name="default_managed_profile_name">Work profile</string>
+ <!-- Title on the dialog that prompts the user to confirm that they really want to delete their existing work profile-->
+ <string name="delete_profile_title">Remove work profile?</string>
+ <!-- Opening string on the dialog that prompts the user to confirm that they really want to delete
+ their existing work profile. The administration app icon and name appear after the final
+ colon. [CHAR LIMIT=NONE] -->
+ <string name="opening_paragraph_delete_profile_unknown_company">This work profile is managed by:</string>
+ <!-- Opening string on the dialog that prompts the user to confirm that they really want to delete
+ their existing work profile. The administration app icon and name appear after the final
+ colon, the %s is replaced by the domain name of the organization that owns the work
+ profile. [CHAR LIMIT=NONE] -->
+ <string name="opening_paragraph_delete_profile_known_company">This work profile is managed for %s using:</string>
+ <!-- String on the dialog that links through to more information about the profile management application. -->
+ <string name="read_more_delete_profile">Please <a href="#read_this_link">read this</a> before proceeding.</string>
<!-- String on the dialog that prompts the user to confirm that they really want to delete their existing work profile-->
- <string name="sure_you_want_to_delete_profile">You already have a work profile on your device, it must be removed to setup a new profile. All apps and data in this profile will be deleted if you continue.</string>
+ <string name="sure_you_want_to_delete_profile">All apps and data in this profile will be deleted if you continue.</string>
<!-- String on the button that triggers the deletion of a work profile.-->
- <string name="delete_profile">Remove</string>
+ <string name="delete_profile">Delete</string>
<!-- String on the button that cancels out of the deletion of a work profile.-->
<string name="cancel_delete_profile">Cancel</string>
diff --git a/src/com/android/managedprovisioning/BootReminder.java b/src/com/android/managedprovisioning/BootReminder.java
index 85c6511..b91d144 100644
--- a/src/com/android/managedprovisioning/BootReminder.java
+++ b/src/com/android/managedprovisioning/BootReminder.java
@@ -17,6 +17,7 @@
import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_ACCOUNT_TO_MIGRATE;
import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE;
+import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME;
import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME;
import android.app.Notification;
@@ -46,6 +47,11 @@
EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME
};
+ private static final String[] PROFILE_OWNER_COMPONENT_NAME_EXTRAS = {
+ // Key for the device admin component name
+ EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME
+ };
+
private static final String[] PROFILE_OWNER_PERSISTABLE_BUNDLE_EXTRAS = {
// Key for the admin extras bundle
EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE
@@ -104,8 +110,8 @@
* and {@link EncryptDeviceActivity.TARGET_DEVICE_OWNER}
*
* <p> In case of TARGET_PROFILE_OWNER {@code extras} should further contain a value for at
- * least the key: {@link EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME}, a {@link String} which
- * specifies the package to set as profile owner.
+ * least the key: {@link EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME}, a {@link String}
+ * which, when unflattened to a componentName, specifies the component to set as profile owner.
*
* <p>
* See {@link MessageParser} for the TARGET_DEVICE_OWNER case.
@@ -142,6 +148,7 @@
private static IntentStore getProfileOwnerIntentStore(Context context) {
return new IntentStore(context,PROFILE_OWNER_INTENT_TARGET, PROFILE_OWNER_PREFERENCES_NAME)
+ .setComponentNameKeys(PROFILE_OWNER_COMPONENT_NAME_EXTRAS)
.setStringKeys(PROFILE_OWNER_STRING_EXTRAS)
.setPersistableBundleKeys(PROFILE_OWNER_PERSISTABLE_BUNDLE_EXTRAS)
.setAccountKeys(PROFILE_OWNER_ACCOUNT_EXTRAS);
@@ -149,6 +156,7 @@
private static IntentStore getDeviceOwnerIntentStore(Context context) {
return new IntentStore(context, DEVICE_OWNER_INTENT_TARGET, DEVICE_OWNER_PREFERENCES_NAME)
+ .setComponentNameKeys(MessageParser.DEVICE_OWNER_COMPONENT_NAME_EXTRAS)
.setStringKeys(MessageParser.DEVICE_OWNER_STRING_EXTRAS)
.setLongKeys(MessageParser.DEVICE_OWNER_LONG_EXTRAS)
.setIntKeys(MessageParser.DEVICE_OWNER_INT_EXTRAS)
diff --git a/src/com/android/managedprovisioning/DeleteManagedProfileDialog.java b/src/com/android/managedprovisioning/DeleteManagedProfileDialog.java
new file mode 100644
index 0000000..f32787f
--- /dev/null
+++ b/src/com/android/managedprovisioning/DeleteManagedProfileDialog.java
@@ -0,0 +1,142 @@
+package com.android.managedprovisioning;
+/*
+ * Copyright 2015, 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.
+ */
+
+import android.app.Dialog;
+import android.app.DialogFragment;
+import android.content.ComponentName;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.android.managedprovisioning.Utils.MdmPackageInfo;
+
+/**
+ * Displays information about an existing managed profile and asks the user if it should be deleted.
+ *
+ * <p>Expects parent component to implement {@link DeleteManagedProfileCallback} for user-response
+ * handling.
+ */
+public class DeleteManagedProfileDialog extends DialogFragment {
+ private static final String KEY_USER_PROFILE_CALLBACK_ID = "user_profile_callback_id";
+ private static final String KEY_MDM_PACKAGE_NAME = "mdm_package_name";
+ private static final String KEY_PROFILE_OWNER_DOMAIN = "profile_owner_domain";
+
+ /**
+ * @param managedProfileUserId user-id for the managed profile which will be passed back to the
+ * parent component in the {@link DeleteManagedProfileCallback#onRemoveProfileApproval(int)}
+ * call
+ * @param mdmPackagename package name of the MDM application for the current managed profile
+ * @param profileOwnerDomain domain name of the organization which owns the managed profile, or
+ * null if not known
+ * @return initialized dialog
+ */
+ public static DeleteManagedProfileDialog newInstance(
+ int managedProfileUserId, ComponentName mdmPackagename, String profileOwnerDomain) {
+ Bundle args = new Bundle();
+ args.putInt(KEY_USER_PROFILE_CALLBACK_ID, managedProfileUserId);
+ args.putString(KEY_MDM_PACKAGE_NAME, mdmPackagename.getPackageName());
+ args.putString(KEY_PROFILE_OWNER_DOMAIN, profileOwnerDomain);
+
+ DeleteManagedProfileDialog dialog = new DeleteManagedProfileDialog();
+ dialog.setArguments(args);
+ return dialog;
+ }
+
+ @Override
+ public Dialog onCreateDialog(Bundle savedInstanceState) {
+ if (!(getActivity() instanceof DeleteManagedProfileCallback)) {
+ throw new IllegalStateException("Calling activity must implement " +
+ "DeleteManagedProfileCallback, found: " + getActivity().getLocalClassName());
+ }
+
+ Bundle arguments = getArguments();
+ final int callbackUserProfileId = arguments.getInt(KEY_USER_PROFILE_CALLBACK_ID);
+ String mdmPackageName = arguments.getString(KEY_MDM_PACKAGE_NAME);
+
+ MdmPackageInfo mdmPackageInfo = Utils.getMdmPackageInfo(
+ getActivity().getPackageManager(), mdmPackageName);
+
+ final Dialog dialog = new Dialog(getActivity(), R.style.ManagedProvisioningDialogTheme);
+ dialog.setTitle(R.string.delete_profile_title);
+ dialog.setContentView(R.layout.delete_managed_profile_dialog);
+ dialog.setCanceledOnTouchOutside(false);
+
+ ImageView imageView = (ImageView) dialog.findViewById(
+ R.id.delete_managed_profile_mdm_icon_view);
+ imageView.setImageDrawable(mdmPackageInfo.getPackageIcon());
+
+ TextView deviceManagerName = (TextView) dialog.findViewById(
+ R.id.delete_managed_profile_device_manager_name);
+ deviceManagerName.setText(mdmPackageInfo.getAppLabel());
+
+ Button positiveButton = (Button) dialog.findViewById(
+ R.id.delete_managed_profile_positive_button);
+ positiveButton.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ dialog.dismiss();
+ ((DeleteManagedProfileCallback) getActivity())
+ .onRemoveProfileApproval(callbackUserProfileId);
+ }
+ });
+
+ Button negativeButton = (Button) dialog.findViewById(
+ R.id.delete_managed_profile_negative_button);
+ negativeButton.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ dialog.dismiss();
+ ((DeleteManagedProfileCallback) getActivity()).onRemoveProfileCancel();
+ }
+ });
+
+ dialog.getWindow().getDecorView().setSystemUiVisibility(
+ View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY |
+ View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
+ return dialog;
+ }
+
+ @Override
+ public void onCancel(DialogInterface dialog) {
+ dialog.dismiss();
+ ((DeleteManagedProfileCallback) getActivity()).onRemoveProfileCancel();
+ }
+
+ /**
+ * Callback interface for outcome of {@link DeleteManagedProfileDialog} presentation.
+ */
+ public interface DeleteManagedProfileCallback {
+
+ /**
+ * Invoked if the user hits the positive response (perform removal) button.
+ *
+ * @param managedProfileUserId user-id of the managed-profile that the dialog was presented
+ * for
+ */
+ public abstract void onRemoveProfileApproval(int managedProfileUserId);
+
+ /**
+ * Invoked if the user hits the negative response (DO NOT perform removal) button, or the
+ * dialog was otherwise dismissed.
+ */
+ public abstract void onRemoveProfileCancel();
+ }
+}
diff --git a/src/com/android/managedprovisioning/DeviceOwnerProvisioningActivity.java b/src/com/android/managedprovisioning/DeviceOwnerProvisioningActivity.java
index ba7685b..78c5557 100644
--- a/src/com/android/managedprovisioning/DeviceOwnerProvisioningActivity.java
+++ b/src/com/android/managedprovisioning/DeviceOwnerProvisioningActivity.java
@@ -16,6 +16,9 @@
package com.android.managedprovisioning;
+import static android.app.admin.DeviceAdminReceiver.ACTION_READY_FOR_USER_INITIALIZATION;
+import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE;
+
import android.app.Activity;
import android.app.AlertDialog;
import android.content.BroadcastReceiver;
@@ -23,6 +26,7 @@
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
+import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.os.UserHandle;
import android.os.SystemProperties;
@@ -40,6 +44,7 @@
import com.android.setupwizard.navigationbar.SetupWizardNavBar.NavigationBarListener;
import java.util.ArrayList;
+import java.util.List;
/**
* This activity starts device owner provisioning:
@@ -148,9 +153,9 @@
MessageParser parser = new MessageParser();
try {
mParams = parser.parseIntent(getIntent());
- } catch (MessageParser.ParseException e) {
+ } catch (Utils.IllegalProvisioningArgumentException e) {
ProvisionLogger.loge("Could not read data from intent", e);
- error(e.getErrorMessageId(), false /* no factory reset */);
+ error(R.string.device_owner_error_general, false /* no factory reset */);
return;
}
@@ -260,17 +265,43 @@
private void onProvisioningSuccess() {
- // The Setup wizards listens to this flag and finishes itself when it is set.
- // It then fires a home intent, which we catch in the HomeReceiverActivity before sending
- // the intent to notify the mdm that provisioning is complete.
- Global.putInt(getContentResolver(), Global.DEVICE_PROVISIONED, 1);
- Secure.putInt(getContentResolver(), Secure.USER_SETUP_COMPLETE, 1);
-
+ if (mParams.mDeviceInitializerComponentName != null) {
+ Intent result = new Intent(ACTION_READY_FOR_USER_INITIALIZATION);
+ result.setComponent(mParams.mDeviceInitializerComponentName);
+ result.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES |
+ Intent.FLAG_RECEIVER_FOREGROUND);
+ if (mParams.mAdminExtrasBundle != null) {
+ result.putExtra(EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE,
+ mParams.mAdminExtrasBundle);
+ }
+ List<ResolveInfo> matchingReceivers =
+ getPackageManager().queryBroadcastReceivers(result, 0);
+ if (matchingReceivers.size() > 0) {
+ // Notify the device initializer that it can now perform pre-user-setup tasks.
+ sendBroadcast(result);
+ } else {
+ ProvisionLogger.logi("Initializer component doesn't have a receiver for "
+ + "android.app.action.READY_FOR_USER_INITIALIZATION. Skipping broadcast "
+ + "and finishing user initialization.");
+ provisionDevice();
+ }
+ } else {
+ // No initializer, set the device provisioned ourselves.
+ provisionDevice();
+ }
// Note: the DeviceOwnerProvisioningService will stop itself.
setResult(Activity.RESULT_OK);
finish();
}
+ private void provisionDevice() {
+ // The Setup wizards listens to this flag and finishes itself when it is set.
+ // It then fires a home intent, which we catch in the HomeReceiverActivity before
+ // sending the intent to notify the mdm that provisioning is complete.
+ Global.putInt(getContentResolver(), Global.DEVICE_PROVISIONED, 1);
+ Secure.putInt(getContentResolver(), Secure.USER_SETUP_COMPLETE, 1);
+ }
+
private void requestEncryption(MessageParser messageParser, ProvisioningParams params) {
Intent encryptIntent = new Intent(DeviceOwnerProvisioningActivity.this,
EncryptDeviceActivity.class);
diff --git a/src/com/android/managedprovisioning/DeviceOwnerProvisioningService.java b/src/com/android/managedprovisioning/DeviceOwnerProvisioningService.java
index 9b3b6f8..fd90682 100644
--- a/src/com/android/managedprovisioning/DeviceOwnerProvisioningService.java
+++ b/src/com/android/managedprovisioning/DeviceOwnerProvisioningService.java
@@ -125,7 +125,7 @@
// Send success if provisioning was successful.
if (mDone) {
- onProvisioningSuccess(mParams.mDeviceAdminPackageName);
+ onProvisioningSuccess();
}
} else {
mProvisioningInFlight = true;
@@ -175,7 +175,13 @@
// Send complete intent to mdm.
Intent result = new Intent(ACTION_PROFILE_PROVISIONING_COMPLETE);
- result.setPackage(mParams.mDeviceAdminPackageName);
+ try {
+ result.setComponent(mParams.inferDeviceAdminComponentName(context));
+ } catch (Utils.IllegalProvisioningArgumentException e) {
+ stopSelf();
+ ProvisionLogger.loge("Failed to infer the device admin component name", e);
+ return;
+ }
result.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES |
Intent.FLAG_RECEIVER_FOREGROUND);
if (mParams.mAdminExtrasBundle != null) {
@@ -187,7 +193,6 @@
}
}
-
/**
* This is the core method of this class. It goes through every provisioning step.
* Each task checks if it is required and executes if it is.
@@ -196,30 +201,33 @@
if (DEBUG) ProvisionLogger.logd("Starting device owner provisioning");
// Construct Tasks. Do not start them yet.
- mAddWifiNetworkTask = new AddWifiNetworkTask(this, params.mWifiSsid,
- params.mWifiHidden, params.mWifiSecurityType, params.mWifiPassword,
- params.mWifiProxyHost, params.mWifiProxyPort, params.mWifiProxyBypassHosts,
- params.mWifiPacUrl, new AddWifiNetworkTask.Callback() {
+ mAddWifiNetworkTask = new AddWifiNetworkTask(this, params.mWifiSsid,
+ params.mWifiHidden, params.mWifiSecurityType, params.mWifiPassword,
+ params.mWifiProxyHost, params.mWifiProxyPort, params.mWifiProxyBypassHosts,
+ params.mWifiPacUrl, new AddWifiNetworkTask.Callback() {
+ @Override
+ public void onSuccess() {
+ progressUpdate(R.string.progress_download);
+ mDownloadPackageTask.run();
+ }
+
+ @Override
+ public void onError(){
+ error(R.string.device_owner_error_wifi);
+ }
+ });
+
+
+ mDownloadPackageTask = new DownloadPackageTask(
+ this, params, new DownloadPackageTask.Callback() {
@Override
public void onSuccess() {
- mDownloadPackageTask.run();
- }
-
- @Override
- public void onError(){
- error(R.string.device_owner_error_wifi);
- }
- });
-
- mDownloadPackageTask = new DownloadPackageTask(this,
- params.mDeviceAdminPackageDownloadLocation, params.mDeviceAdminPackageChecksum,
- params.mDeviceAdminPackageDownloadCookieHeader, new DownloadPackageTask.Callback() {
- @Override
- public void onSuccess() {
- String downloadLocation =
- mDownloadPackageTask.getDownloadedPackageLocation();
progressUpdate(R.string.progress_install);
- mInstallPackageTask.run(downloadLocation);
+ mInstallPackageTask.run(
+ mDownloadPackageTask.getDownloadedPackageLocation(
+ DownloadPackageTask.DEVICE_OWNER),
+ mDownloadPackageTask.getDownloadedPackageLocation(
+ DownloadPackageTask.INITIALIZER));
}
@Override
@@ -238,13 +246,22 @@
}
});
- mInstallPackageTask = new InstallPackageTask(this,
- params.mDeviceAdminPackageName, params.mDeviceAdminPackageDownloadLocation,
- new InstallPackageTask.Callback() {
+ mInstallPackageTask = new InstallPackageTask(
+ this, params, new InstallPackageTask.Callback() {
@Override
public void onSuccess() {
progressUpdate(R.string.progress_set_owner);
- mSetDevicePolicyTask.run();
+ try {
+ // Now that the app has been installed, we can look for the device admin
+ // component in it.
+ mSetDevicePolicyTask.run(mParams.inferDeviceAdminComponentName(
+ DeviceOwnerProvisioningService.this));
+ } catch (Utils.IllegalProvisioningArgumentException e) {
+ error(R.string.device_owner_error_general);
+ ProvisionLogger.loge("Failed to infer the device admin component name",
+ e);
+ return;
+ }
}
@Override
@@ -262,9 +279,9 @@
}
}
});
-
mSetDevicePolicyTask = new SetDevicePolicyTask(this,
- params.mDeviceAdminPackageName,
+ getResources().getString(R.string.default_owned_device_username),
+ params.mDeviceInitializerComponentName,
getResources().getString(R.string.default_owned_device_username),
new SetDevicePolicyTask.Callback() {
@Override
@@ -289,14 +306,14 @@
});
mDeleteNonRequiredAppsTask = new DeleteNonRequiredAppsTask(
- this, params.mDeviceAdminPackageName, R.array.required_apps_managed_device,
+ this, params.inferDeviceAdminPackageName(), R.array.required_apps_managed_device,
R.array.vendor_required_apps_managed_device, true /* creating new profile */,
UserHandle.USER_OWNER, params.mLeaveAllSystemAppsEnabled,
new DeleteNonRequiredAppsTask.Callback() {
@Override
public void onSuccess() {
// Done with provisioning. Success.
- onProvisioningSuccess(params.mDeviceAdminPackageName);
+ onProvisioningSuccess();
}
@Override
@@ -343,7 +360,7 @@
LocalBroadcastManager.getInstance(this).sendBroadcast(intent);
}
- private void onProvisioningSuccess(String deviceAdminPackage) {
+ private void onProvisioningSuccess() {
if (DEBUG) ProvisionLogger.logd("Reporting success.");
mDone = true;
diff --git a/src/com/android/managedprovisioning/IntentStore.java b/src/com/android/managedprovisioning/IntentStore.java
index ae5839a..3656f09 100644
--- a/src/com/android/managedprovisioning/IntentStore.java
+++ b/src/com/android/managedprovisioning/IntentStore.java
@@ -49,6 +49,7 @@
private String[] mBooleanKeys = new String[0];
private String[] mPersistableBundleKeys = new String[0];
private String[] mAccountKeys = new String[0];
+ private String[] mComponentNameKeys = new String[0];
private static final String TAG_PERSISTABLEBUNDLE = "persistable_bundle";
private static final String TAG_ACCOUNT = "account";
@@ -94,6 +95,11 @@
return this;
}
+ public IntentStore setComponentNameKeys(String[] keys) {
+ mComponentNameKeys = (keys == null) ? new String[0] : keys;
+ return this;
+ }
+
public void clear() {
mPrefs.edit().clear().commit();
}
@@ -130,6 +136,12 @@
editor.putString(key, bundleString);
}
}
+ for (String key : mComponentNameKeys) {
+ ComponentName cn = (ComponentName) data.getParcelable(key);
+ if (cn != null) {
+ editor.putString(key, cn.flattenToString());
+ }
+ }
editor.putBoolean(IS_SET, true);
editor.commit();
}
@@ -179,6 +191,14 @@
}
}
}
+ for (String key : mComponentNameKeys) {
+ if (mPrefs.contains(key)) {
+ String st = mPrefs.getString(key, null);
+ if (st != null) {
+ result.putExtra(key, ComponentName.unflattenFromString(st));
+ }
+ }
+ }
return result;
}
diff --git a/src/com/android/managedprovisioning/MessageParser.java b/src/com/android/managedprovisioning/MessageParser.java
index c73685c..26fce8c 100644
--- a/src/com/android/managedprovisioning/MessageParser.java
+++ b/src/com/android/managedprovisioning/MessageParser.java
@@ -28,15 +28,23 @@
import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_WIFI_PROXY_BYPASS;
import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_WIFI_PAC_URL;
import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE;
-import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME;
+import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME;
+import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM;
import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION;
import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER;
+import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME;
import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM;
+import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_INITIALIZER_COMPONENT_NAME;
+import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_DOWNLOAD_LOCATION;
+import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_DOWNLOAD_COOKIE_HEADER;
+import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_CHECKSUM;
import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_LEAVE_ALL_SYSTEM_APPS_ENABLED;
import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_SKIP_ENCRYPTION;
import static android.app.admin.DevicePolicyManager.MIME_TYPE_PROVISIONING_NFC;
import static java.nio.charset.StandardCharsets.UTF_8;
+import android.content.ComponentName;
+import android.content.Context;
import android.content.Intent;
import android.nfc.NdefMessage;
import android.nfc.NdefRecord;
@@ -47,6 +55,8 @@
import android.text.TextUtils;
import android.util.Base64;
+import com.android.managedprovisioning.Utils.IllegalProvisioningArgumentException;
+
import java.io.IOException;
import java.io.StringReader;
import java.util.Enumeration;
@@ -71,17 +81,26 @@
*
* <p>
* Intent was received directly.
- * The intent contains the extra {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME},
- * and may contain {@link #EXTRA_PROVISIONING_TIME_ZONE},
- * {@link #EXTRA_PROVISIONING_LOCAL_TIME}, and {@link #EXTRA_PROVISIONING_LOCALE}. A download
- * location may be specified in {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION}
- * together with an optional http cookie header
- * {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER} accompanied by the SHA-1
- * sum of the target file {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM}.
- * Additional information to send through to the device admin may be specified in
+ * The intent contains the extra {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME} or
+ * {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME} (which is deprecated and supported for
+ * legacy reasons only), and may contain {@link #EXTRA_PROVISIONING_TIME_ZONE},
+ * {@link #EXTRA_PROVISIONING_LOCAL_TIME}, {@link #EXTRA_PROVISIONING_LOCALE}, and
+ * {@link #EXTRA_PROVISIONING_DEVICE_INITIALIZER_COMPONENT_NAME}. A download
+ * location for the device admin may be specified in
+ * {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION} together with an optional
+ * http cookie header {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER}
+ * accompanied by the SHA-1 sum of the target file
+ * {@link #EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM}. A download location for the device
+ * initializer may be specified in
+ * {@link #EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_DOWNLOAD_LOCATION} together with an
+ * optional http cookie header
+ * {@link #EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_DOWNLOAD_COOKIE_HEADER} accompanied by the
+ * SHA-1 sum of the target file {@link #EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_CHECKSUM}.
+ * Additional information to send through to the device initializer and admin may be specified in
* {@link #EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE}.
- * The boolean {@link #EXTRA_PROVISIONING_LEAVE_ALL_SYSTEM_APPS_ENABLED} indicates wheter system
- * apps should not be disabled.
+ * The optional boolean {@link #EXTRA_PROVISIONING_LEAVE_ALL_SYSTEM_APPS_ENABLED} indicates whether
+ * system apps should not be disabled. The optional boolean
+ * {@link #EXTRA_PROVISIONING_SKIP_ENCRYPTION} specifies whether the device should be encrypted.
* Furthermore a wifi network may be specified in {@link #EXTRA_PROVISIONING_WIFI_SSID}, and if
* applicable {@link #EXTRA_PROVISIONING_WIFI_HIDDEN},
* {@link #EXTRA_PROVISIONING_WIFI_SECURITY_TYPE}, {@link #EXTRA_PROVISIONING_WIFI_PASSWORD},
@@ -111,7 +130,10 @@
EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME,
EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION,
EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER,
- EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM
+ EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM,
+ EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_DOWNLOAD_LOCATION,
+ EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_DOWNLOAD_COOKIE_HEADER,
+ EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_CHECKSUM
};
protected static final String[] DEVICE_OWNER_LONG_EXTRAS = {
@@ -133,6 +155,11 @@
EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE
};
+ protected static final String[] DEVICE_OWNER_COMPONENT_NAME_EXTRAS = {
+ EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME,
+ EXTRA_PROVISIONING_DEVICE_INITIALIZER_COMPONENT_NAME
+ };
+
public void addProvisioningParamsToBundle(Bundle bundle, ProvisioningParams params) {
bundle.putString(EXTRA_PROVISIONING_TIME_ZONE, params.mTimeZone);
bundle.putString(EXTRA_PROVISIONING_LOCALE, params.getLocaleAsString());
@@ -144,12 +171,22 @@
bundle.putString(EXTRA_PROVISIONING_WIFI_PAC_URL, params.mWifiPacUrl);
bundle.putString(EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME,
params.mDeviceAdminPackageName);
+ bundle.putParcelable(EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME,
+ params.mDeviceAdminComponentName);
bundle.putString(EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION,
params.mDeviceAdminPackageDownloadLocation);
bundle.putString(EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER,
params.mDeviceAdminPackageDownloadCookieHeader);
bundle.putString(EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM,
params.getDeviceAdminPackageChecksumAsString());
+ bundle.putParcelable(EXTRA_PROVISIONING_DEVICE_INITIALIZER_COMPONENT_NAME,
+ params.mDeviceInitializerComponentName);
+ bundle.putString(EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_DOWNLOAD_LOCATION,
+ params.mDeviceInitializerPackageDownloadLocation);
+ bundle.putString(EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_DOWNLOAD_COOKIE_HEADER,
+ params.mDeviceInitializerPackageDownloadCookieHeader);
+ bundle.putString(EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_CHECKSUM,
+ params.getDeviceInitializerPackageChecksumAsString());
bundle.putLong(EXTRA_PROVISIONING_LOCAL_TIME, params.mLocalTime);
@@ -164,7 +201,8 @@
bundle.putBoolean(EXTRA_PROVISIONING_SKIP_ENCRYPTION, params.mSkipEncryption);
}
- public ProvisioningParams parseIntent(Intent intent) throws ParseException {
+ public ProvisioningParams parseIntent(Intent intent)
+ throws IllegalProvisioningArgumentException {
ProvisionLogger.logi("Processing intent.");
if (intent.hasExtra(NfcAdapter.EXTRA_NDEF_MESSAGES)) {
return parseNfcIntent(intent);
@@ -174,7 +212,7 @@
}
public ProvisioningParams parseNfcIntent(Intent nfcIntent)
- throws ParseException {
+ throws IllegalProvisioningArgumentException {
ProvisionLogger.logi("Processing Nfc Payload.");
// Only one first message with NFC_MIME_TYPE is used.
for (Parcelable rawMsg : nfcIntent
@@ -192,16 +230,15 @@
return params;
}
}
- throw new ParseException(
- "Intent does not contain NfcRecord with the correct MIME type.",
- R.string.device_owner_error_general);
+ throw new IllegalProvisioningArgumentException(
+ "Intent does not contain NfcRecord with the correct MIME type.");
}
// Note: EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE property contains a Properties object
// serialized into String. See Properties.store() and Properties.load() for more details.
// The property value is optional.
private ProvisioningParams parseProperties(String data)
- throws ParseException {
+ throws IllegalProvisioningArgumentException {
ProvisioningParams params = new ProvisioningParams();
try {
Properties props = new Properties();
@@ -221,6 +258,12 @@
params.mWifiPacUrl = props.getProperty(EXTRA_PROVISIONING_WIFI_PAC_URL);
params.mDeviceAdminPackageName
= props.getProperty(EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME);
+ String componentNameString = props.getProperty(
+ EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME);
+ if (componentNameString != null) {
+ params.mDeviceAdminComponentName = ComponentName.unflattenFromString(
+ componentNameString);
+ }
params.mDeviceAdminPackageDownloadLocation
= props.getProperty(EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_LOCATION);
params.mDeviceAdminPackageDownloadCookieHeader = props.getProperty(
@@ -228,6 +271,19 @@
if ((s = props.getProperty(EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM)) != null) {
params.mDeviceAdminPackageChecksum = stringToByteArray(s);
}
+ String name = props.getProperty(
+ EXTRA_PROVISIONING_DEVICE_INITIALIZER_COMPONENT_NAME);
+ if (name != null) {
+ params.mDeviceInitializerComponentName = ComponentName.unflattenFromString(name);
+ }
+ params.mDeviceInitializerPackageDownloadLocation = props.getProperty(
+ EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_DOWNLOAD_LOCATION);
+ params.mDeviceInitializerPackageDownloadCookieHeader = props.getProperty(
+ EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_DOWNLOAD_COOKIE_HEADER);
+ if ((s = props.getProperty(
+ EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_CHECKSUM)) != null) {
+ params.mDeviceInitializerPackageChecksum = stringToByteArray(s);
+ }
if ((s = props.getProperty(EXTRA_PROVISIONING_LOCAL_TIME)) != null) {
params.mLocalTime = Long.parseLong(s);
@@ -253,14 +309,11 @@
checkValidityOfProvisioningParams(params);
return params;
} catch (IOException e) {
- throw new ParseException("Couldn't load payload",
- R.string.device_owner_error_general, e);
+ throw new Utils.IllegalProvisioningArgumentException("Couldn't load payload", e);
} catch (NumberFormatException e) {
- throw new ParseException("Incorrect numberformat.",
- R.string.device_owner_error_general, e);
+ throw new Utils.IllegalProvisioningArgumentException("Incorrect numberformat.", e);
} catch (IllformedLocaleException e) {
- throw new ParseException("Invalid locale.",
- R.string.device_owner_error_general, e);
+ throw new Utils.IllegalProvisioningArgumentException("Invalid locale.", e);
}
}
@@ -279,7 +332,7 @@
}
public ProvisioningParams parseNonNfcIntent(Intent intent)
- throws ParseException {
+ throws IllegalProvisioningArgumentException {
ProvisionLogger.logi("Processing intent.");
ProvisioningParams params = new ProvisioningParams();
@@ -294,6 +347,8 @@
params.mWifiProxyHost = intent.getStringExtra(EXTRA_PROVISIONING_WIFI_PROXY_HOST);
params.mWifiProxyBypassHosts = intent.getStringExtra(EXTRA_PROVISIONING_WIFI_PROXY_BYPASS);
params.mWifiPacUrl = intent.getStringExtra(EXTRA_PROVISIONING_WIFI_PAC_URL);
+ params.mDeviceAdminComponentName = (ComponentName) intent.getParcelableExtra(
+ EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME);
params.mDeviceAdminPackageName
= intent.getStringExtra(EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME);
params.mDeviceAdminPackageDownloadLocation
@@ -304,6 +359,19 @@
if (hashString != null) {
params.mDeviceAdminPackageChecksum = stringToByteArray(hashString);
}
+ String name = intent.getStringExtra(
+ EXTRA_PROVISIONING_DEVICE_INITIALIZER_COMPONENT_NAME);
+ if (name != null) {
+ params.mDeviceInitializerComponentName = ComponentName.unflattenFromString(name);
+ }
+ params.mDeviceInitializerPackageDownloadLocation = intent.getStringExtra(
+ EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_DOWNLOAD_LOCATION);
+ params.mDeviceInitializerPackageDownloadCookieHeader = intent.getStringExtra(
+ EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_DOWNLOAD_COOKIE_HEADER);
+ hashString = intent.getStringExtra(EXTRA_PROVISIONING_DEVICE_INITIALIZER_PACKAGE_CHECKSUM);
+ if (hashString != null) {
+ params.mDeviceInitializerPackageChecksum = stringToByteArray(hashString);
+ }
params.mLocalTime = intent.getLongExtra(EXTRA_PROVISIONING_LOCAL_TIME,
ProvisioningParams.DEFAULT_LOCAL_TIME);
@@ -326,9 +394,9 @@
params.mAdminExtrasBundle = (PersistableBundle) intent.getParcelableExtra(
EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE);
} catch (ClassCastException e) {
- throw new ParseException("Extra " + EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE
- + " must be of type PersistableBundle.",
- R.string.device_owner_error_general, e);
+ throw new IllegalProvisioningArgumentException("Extra "
+ + EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE
+ + " must be of type PersistableBundle.", e);
}
checkValidityOfProvisioningParams(params);
@@ -339,45 +407,21 @@
* Check whether necessary fields are set.
*/
private void checkValidityOfProvisioningParams(ProvisioningParams params)
- throws ParseException {
- if (TextUtils.isEmpty(params.mDeviceAdminPackageName)) {
- throw new ParseException("Must provide the name of the device admin package.",
- R.string.device_owner_error_general);
+ throws IllegalProvisioningArgumentException {
+ if (TextUtils.isEmpty(params.mDeviceAdminPackageName)
+ && params.mDeviceAdminComponentName == null) {
+ throw new IllegalProvisioningArgumentException("Must provide the name of the device"
+ + " admin package or component name");
}
if (!TextUtils.isEmpty(params.mDeviceAdminPackageDownloadLocation)) {
if (params.mDeviceAdminPackageChecksum == null ||
params.mDeviceAdminPackageChecksum.length == 0) {
- throw new ParseException("Checksum of installer file is required for downloading " +
- "device admin file, but not provided.",
- R.string.device_owner_error_general);
+ throw new IllegalProvisioningArgumentException("Checksum of installer file is"
+ + " required for downloading device admin file, but not provided.");
}
}
}
- /**
- * Exception thrown when the ProvisioningParams initialization failed completely.
- *
- * Note: We're using a custom exception to avoid catching subsequent exceptions that might be
- * significant.
- */
- public static class ParseException extends Exception {
- private int mErrorMessageId;
-
- public ParseException(String message, int errorMessageId) {
- super(message);
- mErrorMessageId = errorMessageId;
- }
-
- public ParseException(String message, int errorMessageId, Throwable t) {
- super(message, t);
- mErrorMessageId = errorMessageId;
- }
-
- public int getErrorMessageId() {
- return mErrorMessageId;
- }
- }
-
public static byte[] stringToByteArray(String s)
throws NumberFormatException {
try {
diff --git a/src/com/android/managedprovisioning/PreBootListener.java b/src/com/android/managedprovisioning/PreBootListener.java
index b984fe1..692dbec 100644
--- a/src/com/android/managedprovisioning/PreBootListener.java
+++ b/src/com/android/managedprovisioning/PreBootListener.java
@@ -95,6 +95,9 @@
continue;
}
+ // always set the DISALLOW_WALLPAPER user restriction
+ um.setUserRestriction(UserManager.DISALLOW_WALLPAPER, true, userInfo.getUserHandle());
+
final DeleteNonRequiredAppsTask deleteNonRequiredAppsTask;
final DisableInstallShortcutListenersTask disableInstallShortcutListenersTask;
diff --git a/src/com/android/managedprovisioning/ProfileOwnerPreProvisioningActivity.java b/src/com/android/managedprovisioning/ProfileOwnerPreProvisioningActivity.java
index 5ad071e..c77777c 100644
--- a/src/com/android/managedprovisioning/ProfileOwnerPreProvisioningActivity.java
+++ b/src/com/android/managedprovisioning/ProfileOwnerPreProvisioningActivity.java
@@ -16,15 +16,9 @@
package com.android.managedprovisioning;
-import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE;
-import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME;
-import static com.android.managedprovisioning.EncryptDeviceActivity.EXTRA_RESUME;
-import static com.android.managedprovisioning.EncryptDeviceActivity.EXTRA_RESUME_TARGET;
-import static com.android.managedprovisioning.EncryptDeviceActivity.TARGET_PROFILE_OWNER;
-
import android.app.Activity;
-import android.app.admin.DevicePolicyManager;
import android.app.AlertDialog;
+import android.app.admin.DevicePolicyManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
@@ -32,9 +26,7 @@
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
-import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.UserInfo;
-import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.os.PersistableBundle;
@@ -42,25 +34,34 @@
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;
-import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
+import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
-import android.widget.Button;
+import com.android.managedprovisioning.DeleteManagedProfileDialog.DeleteManagedProfileCallback;
+import com.android.managedprovisioning.UserConsentDialog.ConsentCallback;
+import com.android.managedprovisioning.Utils.IllegalProvisioningArgumentException;
+import com.android.managedprovisioning.Utils.MdmPackageInfo;
import com.android.setupwizard.navigationbar.SetupWizardNavBar;
import com.android.setupwizard.navigationbar.SetupWizardNavBar.NavigationBarListener;
import java.util.List;
+import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE;
+import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME;
+import static com.android.managedprovisioning.EncryptDeviceActivity.EXTRA_RESUME;
+import static com.android.managedprovisioning.EncryptDeviceActivity.EXTRA_RESUME_TARGET;
+import static com.android.managedprovisioning.EncryptDeviceActivity.TARGET_PROFILE_OWNER;
+
/**
* The activity sets up the environment in which the {@link ProfileOwnerProvisioningActivity} can be run.
* It makes sure the device is encrypted, the current launcher supports managed profiles, the
* provisioning intent extras are valid, and that the already present managed profile is removed.
*/
public class ProfileOwnerPreProvisioningActivity extends Activity
- implements UserConsentDialog.ConsentCallback, NavigationBarListener {
+ implements ConsentCallback, DeleteManagedProfileCallback, NavigationBarListener {
private static final String MANAGE_USERS_PERMISSION = "android.permission.MANAGE_USERS";
@@ -86,8 +87,12 @@
private String mMdmPackageName;
+ private ComponentName mMdmComponentName;
+
private Button mSetupButton;
+ private DeleteManagedProfileDialog mDeleteDialog;
+
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -115,7 +120,7 @@
// Initialize member variables from the intent, stop if the intent wasn't valid.
try {
initialize(getIntent());
- } catch (ProvisioningFailedException e) {
+ } catch (IllegalProvisioningArgumentException e) {
showErrorAndClose(R.string.managed_provisioning_error_text, e.getMessage());
return;
}
@@ -152,11 +157,11 @@
return;
}
- // If there is already a managed profile, allow the user to cancel or delete it.
+ // If there is already a managed profile, setup the profile deletion dialog.
// Otherwise, check whether system has reached maximum user limit.
int existingManagedProfileUserId = alreadyHasManagedProfile();
if (existingManagedProfileUserId != -1) {
- showManagedProfileExistsDialog(existingManagedProfileUserId);
+ createDeleteManagedProfileDialog(dpm, existingManagedProfileUserId);
} else if (isMaximumUserLimitReached()) {
showErrorAndClose(R.string.maximum_user_limit_reached,
"Exiting managed profile provisioning, cannot add more users.");
@@ -165,6 +170,22 @@
}
}
+ @Override
+ protected void onResume() {
+ super.onResume();
+
+ if (alreadyHasManagedProfile() != -1) {
+ showDeleteManagedProfileDialog();
+ }
+ }
+
+ @Override
+ protected void onPause() {
+ super.onPause();
+
+ hideDeleteManagedProfileDialog();
+ }
+
private void showStartProvisioningButton() {
mSetupButton.setVisibility(View.VISIBLE);
}
@@ -212,23 +233,13 @@
}
private void setMdmIcon(String packageName) {
- if (packageName != null) {
- PackageManager pm = getPackageManager();
- try {
- ApplicationInfo ai = pm.getApplicationInfo(packageName, /* default flags */ 0);
- if (ai != null) {
- Drawable packageIcon = pm.getApplicationIcon(packageName);
- ImageView imageView = (ImageView) findViewById(R.id.mdm_icon_view);
- imageView.setImageDrawable(packageIcon);
+ MdmPackageInfo packageInfo = Utils.getMdmPackageInfo(getPackageManager(), packageName);
+ if (packageInfo != null) {
+ ImageView imageView = (ImageView) findViewById(R.id.mdm_icon_view);
+ imageView.setImageDrawable(packageInfo.getPackageIcon());
- String appLabel = pm.getApplicationLabel(ai).toString();
- TextView deviceManagerName = (TextView) findViewById(R.id.device_manager_name);
- deviceManagerName.setText(appLabel);
- }
- } catch (PackageManager.NameNotFoundException e) {
- // Package does not exist, ignore. Should never happen.
- ProvisionLogger.loge("Package does not exist. Should never happen.");
- }
+ TextView deviceManagerName = (TextView) findViewById(R.id.device_manager_name);
+ deviceManagerName.setText(packageInfo.getAppLabel());
}
}
@@ -239,30 +250,20 @@
*
* @param intent The intent that started provisioning
*/
- private void initialize(Intent intent) throws ProvisioningFailedException {
+ private void initialize(Intent intent) throws IllegalProvisioningArgumentException {
// Check if the admin extras bundle is of the right type.
try {
PersistableBundle bundle = (PersistableBundle) getIntent().getParcelableExtra(
EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE);
} catch (ClassCastException e) {
- throw new ProvisioningFailedException("Extra "
+ throw new IllegalProvisioningArgumentException("Extra "
+ EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE
+ " must be of type PersistableBundle.", e);
}
- // Validate package name and check if the package is installed
- mMdmPackageName = intent.getStringExtra(EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME);
- if (TextUtils.isEmpty(mMdmPackageName)) {
- throw new ProvisioningFailedException("Missing intent extra: "
- + EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME);
- } else {
- try {
- this.getPackageManager().getPackageInfo(mMdmPackageName, 0);
- } catch (NameNotFoundException e) {
- throw new ProvisioningFailedException("Mdm "+ mMdmPackageName
- + " is not installed. ", e);
- }
- }
+ mMdmComponentName = Utils.findDeviceAdminFromIntent(intent, this);
+ mMdmPackageName = mMdmComponentName.getPackageName();
+
}
/**
@@ -278,7 +279,7 @@
UserConsentDialog.newInstance(UserConsentDialog.PROFILE_OWNER)
.show(getFragmentManager(), "UserConsentDialogFragment");
} else {
- Bundle resumeExtras = getIntent().getExtras();
+ Bundle resumeExtras = getNewExtras();
resumeExtras.putString(EXTRA_RESUME_TARGET, TARGET_PROFILE_OWNER);
Intent encryptIntent = new Intent(this, EncryptDeviceActivity.class)
.putExtra(EXTRA_RESUME, resumeExtras);
@@ -297,6 +298,19 @@
// Do nothing.
}
+ @Override
+ public void onRemoveProfileApproval(int existingManagedProfileUserId) {
+ mDeleteDialog = null;
+ UserManager userManager = (UserManager) getSystemService(Context.USER_SERVICE);
+ userManager.removeUser(existingManagedProfileUserId);
+ showStartProvisioningButton();
+ }
+
+ @Override
+ public void onRemoveProfileCancel() {
+ finish();
+ }
+
private void setupEnvironmentAndProvision() {
// Remove any pre-provisioning UI in favour of progress display
BootReminder.cancelProvisioningReminder(this);
@@ -318,12 +332,21 @@
private void startProfileOwnerProvisioning() {
Intent intent = new Intent(this, ProfileOwnerProvisioningActivity.class);
- intent.putExtras(getIntent());
+ intent.putExtras(getNewExtras());
startActivityForResult(intent, PROVISIONING_REQUEST_CODE);
// Set cross-fade transition animation into the interstitial progress activity.
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
}
+ private Bundle getNewExtras() {
+ Bundle bundle = getIntent().getExtras();
+ // The original intent may have contained the package name but not the component name.
+ // But now, we know what the component name is. So let's pass it.
+ bundle.putParcelable(EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME,
+ mMdmComponentName);
+ return bundle;
+ }
+
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == ENCRYPT_DEVICE_REQUEST_CODE) {
@@ -406,53 +429,38 @@
/**
* Builds a dialog that allows the user to remove an existing managed profile.
*/
- private void showManagedProfileExistsDialog(
- final int existingManagedProfileUserId) {
+ private void createDeleteManagedProfileDialog(DevicePolicyManager dpm,
+ int existingManagedProfileUserId) {
+ if (mDeleteDialog != null) {
+ return;
+ }
- DialogInterface.OnClickListener deleteListener =
- new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- UserManager userManager =
- (UserManager) getSystemService(Context.USER_SERVICE);
- userManager.removeUser(existingManagedProfileUserId);
- showStartProvisioningButton();
- }
- };
+ ComponentName mdmPackageName = dpm.getProfileOwnerAsUser(existingManagedProfileUserId);
+ String domainName = dpm.getProfileOwnerNameAsUser(existingManagedProfileUserId);
- DialogInterface.OnClickListener cancelListener =
- new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- ProfileOwnerPreProvisioningActivity.this.finish();
- }
- };
-
- AlertDialog.Builder builder = new AlertDialog.Builder(this);
- builder.setMessage(getString(R.string.sure_you_want_to_delete_profile))
- .setCancelable(false)
- .setPositiveButton(getString(R.string.delete_profile), deleteListener)
- .setNegativeButton(getString(R.string.cancel_delete_profile), cancelListener)
- .show()
- .getWindow().getDecorView().setSystemUiVisibility(IMMERSIVE_FLAGS);
+ mDeleteDialog = DeleteManagedProfileDialog.newInstance(existingManagedProfileUserId,
+ mdmPackageName, domainName);
}
- /**
- * Exception thrown when the provisioning has failed completely.
- *
- * We're using a custom exception to avoid catching subsequent exceptions that might be
- * significant.
- */
- private class ProvisioningFailedException extends Exception {
- public ProvisioningFailedException(String message) {
- super(message);
+ private void showDeleteManagedProfileDialog() {
+ if (mDeleteDialog == null) {
+ return;
}
- public ProvisioningFailedException(String message, Throwable t) {
- super(message, t);
+ if (!mDeleteDialog.isVisible()) {
+ mDeleteDialog.show(getFragmentManager(), "DeleteManagedProfileDialogFragment");
}
}
+ private void hideDeleteManagedProfileDialog() {
+ if (mDeleteDialog == null) {
+ return;
+ }
+
+ mDeleteDialog.dismiss();
+ mDeleteDialog = null;
+ }
+
@Override
public void onNavigationBarCreated(SetupWizardNavBar bar) {
mSetupButton = bar.getNextButton();
diff --git a/src/com/android/managedprovisioning/ProfileOwnerProvisioningActivity.java b/src/com/android/managedprovisioning/ProfileOwnerProvisioningActivity.java
index e45060f..dd3dcf5 100644
--- a/src/com/android/managedprovisioning/ProfileOwnerProvisioningActivity.java
+++ b/src/com/android/managedprovisioning/ProfileOwnerProvisioningActivity.java
@@ -17,6 +17,7 @@
package com.android.managedprovisioning;
import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_ACCOUNT_TO_MIGRATE;
+import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME;
import android.accounts.Account;
import android.accounts.AccountManager;
@@ -26,6 +27,7 @@
import android.app.Activity;
import android.app.AlertDialog;
import android.app.ProgressDialog;
+import android.app.admin.DevicePolicyManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
@@ -33,6 +35,7 @@
import android.content.IntentFilter;
import android.os.AsyncTask;
import android.os.Bundle;
+import android.os.ConditionVariable;
import android.os.Handler;
import android.os.UserHandle;
import android.os.UserManager;
@@ -44,6 +47,8 @@
import android.widget.TextView;
import java.io.IOException;
+import java.util.concurrent.ExecutionException;
+
import com.android.setupwizard.navigationbar.SetupWizardNavBar;
import com.android.setupwizard.navigationbar.SetupWizardNavBar.NavigationBarListener;
@@ -66,6 +71,8 @@
private BroadcastReceiver mServiceMessageReceiver;
+ private static final int BROADCAST_TIMEOUT = 2 * 60 * 1000;
+
// Provisioning service started
private static final int CANCELSTATUS_PROVISIONING = 1;
// Back button pressed during provisioning, confirm dialog showing.
@@ -165,14 +172,7 @@
ProvisionLogger.logd("Successfully provisioned."
+ "Finishing ProfileOwnerProvisioningActivity");
- Intent pendingIntent = (Intent) intent.getParcelableExtra(
- ProfileOwnerProvisioningService.EXTRA_PENDING_SUCCESS_INTENT);
- int serialNumber = intent.getIntExtra(
- ProfileOwnerProvisioningService.EXTRA_PROFILE_USER_SERIAL_NUMBER, -1);
-
- int userId = intent.getIntExtra(ProfileOwnerProvisioningService.EXTRA_PROFILE_USER_ID,
- -1);
- onProvisioningSuccess(pendingIntent, userId, serialNumber);
+ onProvisioningSuccess();
} else if (ProfileOwnerProvisioningService.ACTION_PROVISIONING_ERROR.equals(action)) {
if (mCancelStatus == CANCELSTATUS_CANCELLING){
return;
@@ -181,27 +181,33 @@
ProfileOwnerProvisioningService.EXTRA_LOG_MESSAGE_KEY);
ProvisionLogger.logd("Error reported: " + errorLogMessage);
error(R.string.managed_provisioning_error_text, errorLogMessage);
- } if (ProfileOwnerProvisioningService.ACTION_PROVISIONING_CANCELLED.equals(action)) {
+ // Note that this will be reported as a canceled action
+ mCancelStatus = CANCELSTATUS_FINALIZING;
+ } else if (ProfileOwnerProvisioningService.ACTION_PROVISIONING_CANCELLED.equals(action)) {
if (mCancelStatus != CANCELSTATUS_CANCELLING) {
return;
}
mCancelProgressDialog.dismiss();
- ProfileOwnerProvisioningActivity.this.setResult(Activity.RESULT_CANCELED);
- stopService(new Intent(ProfileOwnerProvisioningActivity.this,
- ProfileOwnerProvisioningService.class));
- ProfileOwnerProvisioningActivity.this.finish();
+ onProvisioningAborted();
}
}
+ private void onProvisioningAborted() {
+ ProfileOwnerProvisioningActivity.this.setResult(Activity.RESULT_CANCELED);
+ stopService(new Intent(ProfileOwnerProvisioningActivity.this,
+ ProfileOwnerProvisioningService.class));
+ ProfileOwnerProvisioningActivity.this.finish();
+ }
+
@Override
public void onBackPressed() {
- if (mCancelStatus == CANCELSTATUS_PROVISIONING) {
+ if (mCancelStatus != CANCELSTATUS_PROVISIONING) {
+ mCancelStatus = CANCELSTATUS_CONFIRMING;
showCancelProvisioningDialog();
}
}
private void showCancelProvisioningDialog() {
- mCancelStatus = CANCELSTATUS_CONFIRMING;
AlertDialog alertDialog = new AlertDialog.Builder(this)
.setCancelable(false)
.setTitle(R.string.profile_owner_cancel_title)
@@ -246,7 +252,7 @@
.setPositiveButton(R.string.device_owner_error_ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,int id) {
- confirmCancel();
+ onProvisioningAborted();
}
})
.show()
@@ -254,6 +260,10 @@
}
private void confirmCancel() {
+ if (mCancelStatus != CANCELSTATUS_CONFIRMING) {
+ // Can only cancel if provisioning hasn't finished at this point.
+ return;
+ }
mCancelStatus = CANCELSTATUS_CANCELLING;
Intent intent = new Intent(ProfileOwnerProvisioningActivity.this,
ProfileOwnerProvisioningService.class);
@@ -263,65 +273,14 @@
}
/**
- * Notify the mdm that provisioning has completed. When the mdm has received the intent, stop
- * the service and notify the {@link ProfileOwnerProvisioningActivity} so that it can finish itself.
+ * Finish activity and stop service.
*/
- private void onProvisioningSuccess(Intent pendingSuccessIntent, int userId, int serialNumber) {
+ private void onProvisioningSuccess() {
mBackButton.setVisibility(View.INVISIBLE);
mCancelStatus = CANCELSTATUS_FINALIZING;
- Settings.Secure.putIntForUser(getContentResolver(), Settings.Secure.USER_SETUP_COMPLETE,
- 1 /* true- > setup complete */, userId);
+ setResult(Activity.RESULT_OK);
- UserManager userManager = (UserManager) getSystemService(Context.USER_SERVICE);
- UserHandle userHandle = userManager.getUserForSerialNumber(serialNumber);
-
- // Use an ordered broadcast, so that we only finish when the mdm has received it.
- // Avoids a lag in the transition between provisioning and the mdm.
- BroadcastReceiver mdmReceivedSuccessReceiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- ProvisionLogger.logd("ACTION_PROFILE_PROVISIONING_COMPLETE broadcast received by"
- + " mdm");
- ProfileOwnerProvisioningActivity.this.setResult(Activity.RESULT_OK);
-
- // Now cleanup the primary profile if necessary
- if (getIntent().hasExtra(EXTRA_PROVISIONING_ACCOUNT_TO_MIGRATE)) {
- ProvisionLogger.logd("Cleaning up account from the primary user.");
- final Account account = (Account) getIntent().getParcelableExtra(
- EXTRA_PROVISIONING_ACCOUNT_TO_MIGRATE);
- new AsyncTask<Void, Void, Void>() {
- @Override
- protected Void doInBackground(Void... params) {
- removeAccount(account);
- return null;
- }
- }.execute();
- }
-
- ProfileOwnerProvisioningActivity.this.finish();
- stopService(new Intent(ProfileOwnerProvisioningActivity.this,
- ProfileOwnerProvisioningService.class));
- }
- };
-
- sendOrderedBroadcastAsUser(pendingSuccessIntent, userHandle, null,
- mdmReceivedSuccessReceiver, null, Activity.RESULT_OK, null, null);
- ProvisionLogger.logd("Provisioning complete broadcast has been sent to user "
- + userHandle.getIdentifier());
- }
-
- private void removeAccount(Account account) {
- try {
- AccountManagerFuture<Bundle> bundle = mAccountManager.removeAccount(account,
- this, null /* callback */, null /* handler */);
- if (bundle.getResult().getBoolean(AccountManager.KEY_BOOLEAN_RESULT, false)) {
- ProvisionLogger.logw("Account removed from the primary user.");
- } else {
- ProvisionLogger.logw("Could not remove account from the primary user.");
- }
- } catch (OperationCanceledException | AuthenticatorException | IOException e) {
- ProvisionLogger.logw("Exception removing account from the primary user.", e);
- }
+ finish();
}
@Override
diff --git a/src/com/android/managedprovisioning/ProfileOwnerProvisioningService.java b/src/com/android/managedprovisioning/ProfileOwnerProvisioningService.java
index 595b9d5..ecd32f3 100644
--- a/src/com/android/managedprovisioning/ProfileOwnerProvisioningService.java
+++ b/src/com/android/managedprovisioning/ProfileOwnerProvisioningService.java
@@ -19,17 +19,20 @@
import static android.app.admin.DeviceAdminReceiver.ACTION_PROFILE_PROVISIONING_COMPLETE;
import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_ACCOUNT_TO_MIGRATE;
import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE;
-import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME;
+import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME;
import static android.Manifest.permission.BIND_DEVICE_ADMIN;
import android.accounts.Account;
import android.accounts.AccountManager;
+import android.accounts.AccountManagerFuture;
import android.accounts.AuthenticatorException;
import android.accounts.OperationCanceledException;
+import android.app.Activity;
import android.app.ActivityManagerNative;
import android.app.IActivityManager;
import android.app.Service;
import android.app.admin.DevicePolicyManager;
+import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -40,14 +43,18 @@
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.UserInfo;
import android.os.AsyncTask;
+import android.os.Bundle;
import android.os.IBinder;
import android.os.PersistableBundle;
import android.os.Process;
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.os.UserHandle;
import android.os.UserManager;
+import android.provider.Settings;
import android.support.v4.content.LocalBroadcastManager;
import android.text.TextUtils;
+import android.view.View;
import com.android.managedprovisioning.CrossProfileIntentFiltersHelper;
import com.android.managedprovisioning.task.DeleteNonRequiredAppsTask;
@@ -63,14 +70,6 @@
* which contains the provisioning UI.
*/
public class ProfileOwnerProvisioningService extends Service {
- // Extra keys for reporting back success to the activity.
- public static final String EXTRA_PROFILE_USER_ID =
- "com.android.managedprovisioning.extra.profile_user_id";
- public static final String EXTRA_PROFILE_USER_SERIAL_NUMBER =
- "com.android.managedprovisioning.extra.profile_user_serial_number";
- public static final String EXTRA_PENDING_SUCCESS_INTENT =
- "com.android.managedprovisioning.extra.pending_success_intent";
-
// Intent actions for communication with DeviceOwnerProvisioningService.
public static final String ACTION_PROVISIONING_SUCCESS =
"com.android.managedprovisioning.provisioning_success";
@@ -80,6 +79,21 @@
"com.android.managedprovisioning.cancelled";
public static final String EXTRA_LOG_MESSAGE_KEY = "ProvisioingErrorLogMessage";
+ // Status flags for the provisioning process.
+ /** Provisioning not started. */
+ private static final int STATUS_UNKNOWN = 0;
+ /** Provisioning started, no errors or cancellation requested received. */
+ private static final int STATUS_STARTED = 1;
+ /** Provisioning in progress, but user has requested cancellation. */
+ private static final int STATUS_CANCELLING = 2;
+ // Final possible states for the provisioning process.
+ /** Provisioning completed successfully. */
+ private static final int STATUS_DONE = 3;
+ /** Provisioning failed and cleanup complete. */
+ private static final int STATUS_ERROR = 4;
+ /** Provisioning cancelled and cleanup complete. */
+ private static final int STATUS_CANCELLED = 5;
+
private String mMdmPackageName;
private ComponentName mActiveAdminComponentName;
@@ -93,20 +107,40 @@
private AccountManager mAccountManager;
private UserManager mUserManager;
- private int mStartIdProvisioning;
private AsyncTask<Intent, Void, Void> runnerTask;
// MessageId of the last error message.
private String mLastErrorMessage = null;
- private boolean mDone = false;
- private boolean mCancelInFuture = false;
+ // Current status of the provisioning process.
+ private int mProvisioningStatus = STATUS_UNKNOWN;
private class RunnerTask extends AsyncTask<Intent, Void, Void> {
@Override
protected Void doInBackground(Intent ... intents) {
- initialize(intents[0]);
- startManagedProfileProvisioning();
+ // Atomically move to STATUS_STARTED at most once.
+ synchronized (ProfileOwnerProvisioningService.this) {
+ if (mProvisioningStatus == STATUS_UNKNOWN) {
+ mProvisioningStatus = STATUS_STARTED;
+ } else {
+ // Process already started, don't start again.
+ return null;
+ }
+ }
+
+ try {
+ initialize(intents[0]);
+ startManagedProfileProvisioning();
+ } catch (ProvisioningException e) {
+ // Handle internal errors.
+ error(e.getMessage(), e);
+ finish();
+ } catch (Exception e) {
+ // General catch-all to ensure process cleans up in all cases.
+ error("Failed to initialize managed profile, aborting.", e);
+ finish();
+ }
+
return null;
}
}
@@ -145,28 +179,62 @@
}
private void reportStatus() {
- if (mLastErrorMessage != null) {
- sendError();
- }
synchronized (this) {
- if (mDone) {
- notifyActivityOfSuccess();
+ switch (mProvisioningStatus) {
+ case STATUS_DONE:
+ notifyActivityOfSuccess();
+ break;
+ case STATUS_CANCELLED:
+ notifyActivityCancelled();
+ break;
+ case STATUS_ERROR:
+ notifyActivityError();
+ break;
+ case STATUS_UNKNOWN:
+ case STATUS_STARTED:
+ case STATUS_CANCELLING:
+ // Don't notify UI of status when just-started/in-progress.
+ break;
}
}
}
private void cancelProvisioning() {
synchronized (this) {
- if (!mDone) {
- mCancelInFuture = true;
- return;
+ switch (mProvisioningStatus) {
+ case STATUS_DONE:
+ // Process completed, we should honor user request to cancel
+ // though.
+ mProvisioningStatus = STATUS_CANCELLING;
+ cleanupUserProfile();
+ mProvisioningStatus = STATUS_CANCELLED;
+ reportStatus();
+ break;
+ case STATUS_UNKNOWN:
+ // Process hasn't started, move straight to cancelled state.
+ mProvisioningStatus = STATUS_CANCELLED;
+ reportStatus();
+ break;
+ case STATUS_STARTED:
+ // Process is mid-flow, flag up that the user has requested
+ // cancellation.
+ mProvisioningStatus = STATUS_CANCELLING;
+ break;
+ case STATUS_CANCELLING:
+ // Cancellation already being processed.
+ break;
+ case STATUS_CANCELLED:
+ case STATUS_ERROR:
+ // Process already completed, nothing left to cancel.
+ break;
}
- cleanup();
}
}
private void initialize(Intent intent) {
- mMdmPackageName = intent.getStringExtra(EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME);
+ mActiveAdminComponentName = (ComponentName) intent.getParcelableExtra(
+ EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME);
+ mMdmPackageName = mActiveAdminComponentName.getPackageName();
mAccountToMigrate = (Account) intent.getParcelableExtra(
EXTRA_PROVISIONING_ACCOUNT_TO_MIGRATE);
if (mAccountToMigrate != null) {
@@ -176,37 +244,12 @@
// Cast is guaranteed by check in Activity.
mAdminExtrasBundle = (PersistableBundle) intent.getParcelableExtra(
EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE);
-
- mActiveAdminComponentName = getAdminReceiverComponent(mMdmPackageName);
- }
-
- /**
- * Find the Device admin receiver component from the manifest.
- */
- private ComponentName getAdminReceiverComponent(String packageName) {
- ComponentName adminReceiverComponent = null;
-
- try {
- PackageInfo pi = getPackageManager().getPackageInfo(packageName,
- PackageManager.GET_RECEIVERS);
- for (ActivityInfo ai : pi.receivers) {
- if (!TextUtils.isEmpty(ai.permission) &&
- ai.permission.equals(BIND_DEVICE_ADMIN)) {
- adminReceiverComponent = new ComponentName(packageName, ai.name);
-
- }
- }
- } catch (NameNotFoundException e) {
- error("Error: The provided mobile device management package does not define a device"
- + "admin receiver component in its manifest.");
- }
- return adminReceiverComponent;
}
/**
* This is the core method of this class. It goes through every provisioning step.
*/
- private void startManagedProfileProvisioning() {
+ private void startManagedProfileProvisioning() throws ProvisioningException {
ProvisionLogger.logd("Starting managed profile provisioning");
@@ -232,14 +275,26 @@
@Override
public void onSuccess() {
- disableBluetoothSharingTask.run();
- disableInstallShortcutListenersTask.run();
- setUpProfileAndFinish();
+ // Need to explicitly handle exceptions here, as
+ // onError() is not invoked for failures in
+ // onSuccess().
+ try {
+ disableBluetoothSharingTask.run();
+ disableInstallShortcutListenersTask.run();
+ setUpProfile();
+ } catch (ProvisioningException e) {
+ error(e.getMessage(), e);
+ } catch (Exception e) {
+ error("Provisioning failed", e);
+ }
+ finish();
}
@Override
public void onError() {
- error("Delete non required apps task failed.");
+ // Raise an error with a tracing exception attached.
+ error("Delete non required apps task failed.", new Exception());
+ finish();
}
});
@@ -251,27 +306,67 @@
* Called when the new profile is ready for provisioning (the profile is created and all the
* apps not needed have been deleted).
*/
- private void setUpProfileAndFinish() {
+ private void setUpProfile() throws ProvisioningException {
installMdmOnManagedProfile();
setMdmAsActiveAdmin();
setMdmAsManagedProfileOwner();
+ setDefaultUserRestrictions();
CrossProfileIntentFiltersHelper.setFilters(
getPackageManager(), getUserId(), mManagedProfileUserInfo.id);
if (!startManagedProfile(mManagedProfileUserInfo.id)) {
- error("Could not start user in background");
- return;
+ throw raiseError("Could not start user in background");
}
copyAccount(mAccountToMigrate);
+ }
+
+ /**
+ * Notify the calling activity of our final status, perform any cleanup if
+ * the process didn't succeed.
+ */
+ private void finish() {
+ ProvisionLogger.logi("Finishing provisioing process, status: "
+ + mProvisioningStatus);
+ // Reached the end of the provisioning process, take appropriate action
+ // based on current mProvisioningStatus.
synchronized (this) {
- mDone = true;
- if (mCancelInFuture) {
- cleanup();
- } else {
- // Notify activity of success.
- notifyActivityOfSuccess();
+ switch (mProvisioningStatus) {
+ case STATUS_STARTED:
+ // Provisioning process completed normally.
+ notifyMdmAndCleanup();
+ mProvisioningStatus = STATUS_DONE;
+ break;
+ case STATUS_UNKNOWN:
+ // No idea how we could end up in finish() in this state,
+ // but for safety treat it as an error and fall-through to
+ // STATUS_ERROR.
+ mLastErrorMessage = "finish() invoked in STATUS_UNKNOWN";
+ mProvisioningStatus = STATUS_ERROR;
+ break;
+ case STATUS_ERROR:
+ // Process errored out, cleanup partially created managed
+ // profile.
+ cleanupUserProfile();
+ break;
+ case STATUS_CANCELLING:
+ // User requested cancellation during processing, remove
+ // the successfully created profile.
+ cleanupUserProfile();
+ mProvisioningStatus = STATUS_CANCELLED;
+ break;
+ case STATUS_CANCELLED:
+ case STATUS_DONE:
+ // Shouldn't be possible to already be in this state?!?
+ ProvisionLogger.logw("finish() invoked multiple times?");
+ break;
}
}
+
+ ProvisionLogger.logi("Finished provisioing process, final status: "
+ + mProvisioningStatus);
+
+ // Notify UI activity of final status reached.
+ reportStatus();
}
/**
@@ -292,6 +387,50 @@
}
private void notifyActivityOfSuccess() {
+ Intent successIntent = new Intent(ACTION_PROVISIONING_SUCCESS);
+ LocalBroadcastManager.getInstance(ProfileOwnerProvisioningService.this)
+ .sendBroadcast(successIntent);
+ }
+
+ /**
+ * Notify the mdm that provisioning has completed. When the mdm has received the intent, stop
+ * the service and notify the {@link ProfileOwnerProvisioningActivity} so that it can finish
+ * itself.
+ */
+ private void notifyMdmAndCleanup() {
+
+ Settings.Secure.putIntForUser(getContentResolver(), Settings.Secure.USER_SETUP_COMPLETE,
+ 1 /* true- > setup complete */, mManagedProfileUserInfo.id);
+
+ UserHandle userHandle = new UserHandle(mManagedProfileUserInfo.id);
+
+ // Use an ordered broadcast, so that we only finish when the mdm has received it.
+ // Avoids a lag in the transition between provisioning and the mdm.
+ BroadcastReceiver mdmReceivedSuccessReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ ProvisionLogger.logd("ACTION_PROFILE_PROVISIONING_COMPLETE broadcast received by"
+ + " mdm");
+
+ final Intent primaryProfileSuccessIntent = new Intent(
+ DevicePolicyManager.ACTION_MANAGED_PROFILE_PROVISIONED);
+ primaryProfileSuccessIntent.setPackage(mMdmPackageName);
+ primaryProfileSuccessIntent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES |
+ Intent.FLAG_RECEIVER_FOREGROUND);
+ // Now cleanup the primary profile if necessary
+ if (mAccountToMigrate != null) {
+ primaryProfileSuccessIntent.putExtra(
+ DevicePolicyManager.EXTRA_PROVISIONING_ACCOUNT_TO_MIGRATE,
+ mAccountToMigrate);
+ finishAccountMigration(primaryProfileSuccessIntent);
+ // Note that we currently do not check if account migration worked
+ } else {
+ sendBroadcast(primaryProfileSuccessIntent);
+ stopSelf();
+ }
+ }
+ };
+
// Compose the intent that will be fired by the activity.
Intent completeIntent = new Intent(ACTION_PROFILE_PROVISIONING_COMPLETE);
completeIntent.setComponent(mActiveAdminComponentName);
@@ -301,14 +440,44 @@
completeIntent.putExtra(EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE,
mAdminExtrasBundle);
}
+ sendOrderedBroadcastAsUser(completeIntent, userHandle, null,
+ mdmReceivedSuccessReceiver, null, Activity.RESULT_OK, null, null);
+ ProvisionLogger.logd("Provisioning complete broadcast has been sent to user "
+ + userHandle.getIdentifier());
+ }
- Intent successIntent = new Intent(ACTION_PROVISIONING_SUCCESS);
- successIntent.putExtra(EXTRA_PROFILE_USER_ID, mManagedProfileUserInfo.id);
- successIntent.putExtra(EXTRA_PENDING_SUCCESS_INTENT, completeIntent);
- successIntent.putExtra(EXTRA_PROFILE_USER_SERIAL_NUMBER,
- mManagedProfileUserInfo.serialNumber);
- LocalBroadcastManager.getInstance(ProfileOwnerProvisioningService.this)
- .sendBroadcast(successIntent);
+ private void finishAccountMigration(final Intent primaryProfileSuccessIntent) {
+ new AsyncTask<Void, Void, Void>() {
+ @Override
+ protected Void doInBackground(Void... params) {
+ removeAccount(mAccountToMigrate);
+ sendBroadcast(primaryProfileSuccessIntent);
+ stopSelf();
+ return null;
+ }
+ }.execute();
+ }
+
+ private void removeAccount(Account account) {
+ try {
+ AccountManagerFuture<Bundle> bundle = mAccountManager.removeAccount(account,
+ null, null /* callback */, null /* handler */);
+ // Block to get the result of the removeAccount operation
+ if (bundle.getResult().getBoolean(AccountManager.KEY_BOOLEAN_RESULT, false)) {
+ ProvisionLogger.logw("Account removed from the primary user.");
+ } else {
+ Intent removeIntent = (Intent) bundle.getResult().getParcelable(
+ AccountManager.KEY_INTENT);
+ if (removeIntent != null) {
+ ProvisionLogger.logi("Starting activity to remove user");
+ startActivity(removeIntent);
+ } else {
+ ProvisionLogger.logw("Could not remove account from the primary user.");
+ }
+ }
+ } catch (OperationCanceledException | AuthenticatorException | IOException e) {
+ ProvisionLogger.logw("Exception removing account from the primary user.", e);
+ }
}
private void copyAccount(Account account) {
@@ -331,7 +500,7 @@
}
}
- private void createProfile(String profileName) {
+ private void createProfile(String profileName) throws ProvisioningException {
ProvisionLogger.logd("Creating managed profile with name " + profileName);
@@ -341,14 +510,14 @@
if (mManagedProfileUserInfo == null) {
if (UserManager.getMaxSupportedUsers() == mUserManager.getUserCount()) {
- error("Profile creation failed, maximum number of users reached.");
+ throw raiseError("Profile creation failed, maximum number of users reached.");
} else {
- error("Couldn't create profile. Reason unknown.");
+ throw raiseError("Couldn't create profile. Reason unknown.");
}
}
}
- private void installMdmOnManagedProfile() {
+ private void installMdmOnManagedProfile() throws ProvisioningException {
ProvisionLogger.logd("Installing mobile device management app " + mMdmPackageName +
" on managed profile");
@@ -360,14 +529,14 @@
return;
case PackageManager.INSTALL_FAILED_USER_RESTRICTED:
// Should not happen because we're not installing a restricted user
- error("Could not install mobile device management app on managed "
+ throw raiseError("Could not install mobile device management app on managed "
+ "profile because the user is restricted");
case PackageManager.INSTALL_FAILED_INVALID_URI:
// Should not happen because we already checked
- error("Could not install mobile device management app on managed "
+ throw raiseError("Could not install mobile device management app on managed "
+ "profile because the package could not be found");
default:
- error("Could not install mobile device management app on managed "
+ throw raiseError("Could not install mobile device management app on managed "
+ "profile. Unknown status: " + status);
}
} catch (RemoteException neverThrown) {
@@ -376,7 +545,7 @@
}
}
- private void setMdmAsManagedProfileOwner() {
+ private void setMdmAsManagedProfileOwner() throws ProvisioningException {
ProvisionLogger.logd("Setting package " + mMdmPackageName + " as managed profile owner.");
DevicePolicyManager dpm =
@@ -384,7 +553,7 @@
if (!dpm.setProfileOwner(mActiveAdminComponentName, mMdmPackageName,
mManagedProfileUserInfo.id)) {
ProvisionLogger.logw("Could not set profile owner.");
- error("Could not set profile owner.");
+ throw raiseError("Could not set profile owner.");
}
}
@@ -397,33 +566,76 @@
mManagedProfileUserInfo.id);
}
- private void error(String dialogMessage) {
- mLastErrorMessage = dialogMessage;
- sendError();
+ private ProvisioningException raiseError(String message) throws ProvisioningException {
+ throw new ProvisioningException(message);
}
- private void sendError() {
+ /**
+ * Record the fact that an error occurred, change mProvisioningStatus to
+ * reflect the fact the provisioning process failed
+ */
+ private void error(String dialogMessage, Exception e) {
+ synchronized (this) {
+ // Only case where an error condition should be notified is if we
+ // are in the normal flow for provisioning. If the process has been
+ // cancelled or already completed, then the fact there is an error
+ // is almost irrelevant.
+ if (mProvisioningStatus == STATUS_STARTED) {
+ mProvisioningStatus = STATUS_ERROR;
+ mLastErrorMessage = dialogMessage;
+
+ ProvisionLogger.logw(
+ "Error occured during provisioning process: "
+ + dialogMessage,
+ e);
+ } else {
+ ProvisionLogger.logw(
+ "Unexpected error occured in status ["
+ + mProvisioningStatus + "]: " + dialogMessage,
+ e);
+ }
+ }
+ }
+
+ private void setDefaultUserRestrictions() {
+ mUserManager.setUserRestriction(UserManager.DISALLOW_WALLPAPER, true,
+ mManagedProfileUserInfo.getUserHandle());
+ }
+
+ private void notifyActivityError() {
Intent intent = new Intent(ACTION_PROVISIONING_ERROR);
intent.putExtra(EXTRA_LOG_MESSAGE_KEY, mLastErrorMessage);
LocalBroadcastManager.getInstance(this).sendBroadcast(intent);
}
+ private void notifyActivityCancelled() {
+ Intent cancelIntent = new Intent(ACTION_PROVISIONING_CANCELLED);
+ LocalBroadcastManager.getInstance(this).sendBroadcast(cancelIntent);
+ }
+
/**
- * Performs cleanup of the device on failure.
+ * Performs cleanup of any created user-profile on failure/cancellation.
*/
- private void cleanup() {
- // The only cleanup we need to do is remove the profile we created.
+ private void cleanupUserProfile() {
if (mManagedProfileUserInfo != null) {
ProvisionLogger.logd("Removing managed profile");
mUserManager.removeUser(mManagedProfileUserInfo.id);
}
- Intent cancelIntent = new Intent(ACTION_PROVISIONING_CANCELLED);
- LocalBroadcastManager.getInstance(ProfileOwnerProvisioningService.this)
- .sendBroadcast(cancelIntent);
}
@Override
public IBinder onBind(Intent intent) {
return null;
}
+
+ /**
+ * Internal exception to allow provisioning process to terminal quickly and
+ * cleanly on first error, rather than continuing to process despite errors
+ * occurring.
+ */
+ private static class ProvisioningException extends Exception {
+ public ProvisioningException(String detailMessage) {
+ super(detailMessage);
+ }
+ }
}
diff --git a/src/com/android/managedprovisioning/ProvisioningParams.java b/src/com/android/managedprovisioning/ProvisioningParams.java
index cd6374a..2d833dd 100644
--- a/src/com/android/managedprovisioning/ProvisioningParams.java
+++ b/src/com/android/managedprovisioning/ProvisioningParams.java
@@ -16,13 +16,13 @@
package com.android.managedprovisioning;
+import android.content.Context;
+import android.content.ComponentName;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.PersistableBundle;
import android.util.Base64;
import java.util.Locale;
-
-
/**
* Provisioning Parameters for DeviceOwner Provisioning
*/
@@ -46,12 +46,23 @@
public String mWifiProxyBypassHosts;
public String mWifiPacUrl;
+ // At least one one of mDeviceAdminPackageName and mDeviceAdminComponentName should be non-null
public String mDeviceAdminPackageName; // Package name of the device admin package.
+ public ComponentName mDeviceAdminComponentName;
+ public ComponentName mDeviceInitializerComponentName;
+
+ private ComponentName mInferedDeviceAdminComponentName;
public String mDeviceAdminPackageDownloadLocation; // Url of the device admin .apk
public String mDeviceAdminPackageDownloadCookieHeader; // Cookie header for http request
public byte[] mDeviceAdminPackageChecksum = new byte[0]; // SHA-1 sum of the .apk file.
+ public String mDeviceInitializerPackageDownloadLocation; // Url of the device initializer .apk.
+ // Cookie header for initializer http request.
+ public String mDeviceInitializerPackageDownloadCookieHeader;
+ // SHA-1 sum of the initializer .apk file.
+ public byte[] mDeviceInitializerPackageChecksum = new byte[0];
+
public PersistableBundle mAdminExtrasBundle;
public boolean mStartedByNfc; // True iff provisioning flow was started by Nfc bump.
@@ -59,6 +70,23 @@
public boolean mLeaveAllSystemAppsEnabled;
public boolean mSkipEncryption;
+ public String inferDeviceAdminPackageName() {
+ if (mDeviceAdminComponentName != null) {
+ return mDeviceAdminComponentName.getPackageName();
+ }
+ return mDeviceAdminPackageName;
+ }
+
+ // This should not be called if the app has not been installed yet.
+ ComponentName inferDeviceAdminComponentName(Context c)
+ throws Utils.IllegalProvisioningArgumentException {
+ if (mInferedDeviceAdminComponentName == null) {
+ mInferedDeviceAdminComponentName = Utils.findDeviceAdmin(
+ mDeviceAdminPackageName, mDeviceAdminComponentName, c);
+ }
+ return mInferedDeviceAdminComponentName;
+ }
+
public String getLocaleAsString() {
if (mLocale != null) {
return mLocale.getLanguage() + "_" + mLocale.getCountry();
@@ -72,6 +100,11 @@
Base64.URL_SAFE | Base64.NO_PADDING | Base64.NO_WRAP);
}
+ public String getDeviceInitializerPackageChecksumAsString() {
+ return Base64.encodeToString(mDeviceInitializerPackageChecksum,
+ Base64.URL_SAFE | Base64.NO_PADDING | Base64.NO_WRAP);
+ }
+
@Override
public int describeContents() {
return 0;
@@ -90,10 +123,16 @@
out.writeInt(mWifiProxyPort);
out.writeString(mWifiProxyBypassHosts);
out.writeString(mDeviceAdminPackageName);
+ out.writeParcelable(mDeviceAdminComponentName, 0 /* default */);
out.writeString(mDeviceAdminPackageDownloadLocation);
out.writeString(mDeviceAdminPackageDownloadCookieHeader);
out.writeInt(mDeviceAdminPackageChecksum.length);
out.writeByteArray(mDeviceAdminPackageChecksum);
+ out.writeParcelable(mDeviceInitializerComponentName, 0 /* default */);
+ out.writeString(mDeviceInitializerPackageDownloadLocation);
+ out.writeString(mDeviceInitializerPackageDownloadCookieHeader);
+ out.writeInt(mDeviceInitializerPackageChecksum.length);
+ out.writeByteArray(mDeviceInitializerPackageChecksum);
out.writeParcelable(mAdminExtrasBundle, 0 /* default */);
out.writeInt(mStartedByNfc ? 1 : 0);
out.writeInt(mLeaveAllSystemAppsEnabled ? 1 : 0);
@@ -116,11 +155,20 @@
params.mWifiProxyPort = in.readInt();
params.mWifiProxyBypassHosts = in.readString();
params.mDeviceAdminPackageName = in.readString();
+ params.mDeviceAdminComponentName = (ComponentName)
+ in.readParcelable(null /* use default classloader */);
params.mDeviceAdminPackageDownloadLocation = in.readString();
params.mDeviceAdminPackageDownloadCookieHeader = in.readString();
int checksumLength = in.readInt();
params.mDeviceAdminPackageChecksum = new byte[checksumLength];
in.readByteArray(params.mDeviceAdminPackageChecksum);
+ params.mDeviceInitializerComponentName = (ComponentName)
+ in.readParcelable(null /* use default classloader */);
+ params.mDeviceInitializerPackageDownloadLocation = in.readString();
+ params.mDeviceInitializerPackageDownloadCookieHeader = in.readString();
+ checksumLength = in.readInt();
+ params.mDeviceInitializerPackageChecksum = new byte[checksumLength];
+ in.readByteArray(params.mDeviceInitializerPackageChecksum);
params.mAdminExtrasBundle = in.readParcelable(null /* use default classloader */);
params.mStartedByNfc = in.readInt() == 1;
params.mLeaveAllSystemAppsEnabled = in.readInt() == 1;
diff --git a/src/com/android/managedprovisioning/Utils.java b/src/com/android/managedprovisioning/Utils.java
index a74fdf3..f69d64d 100644
--- a/src/com/android/managedprovisioning/Utils.java
+++ b/src/com/android/managedprovisioning/Utils.java
@@ -17,20 +17,32 @@
package com.android.managedprovisioning;
import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
import android.content.pm.IPackageManager;
+import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.graphics.drawable.Drawable;
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.text.TextUtils;
-import java.util.List;
import java.util.HashSet;
+import java.util.List;
import java.util.Set;
+import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME;
+import static android.app.admin.DevicePolicyManager.EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME;
+
/**
* Class containing various auxiliary methods.
*/
public class Utils {
+ private Utils() {}
+
public static Set<String> getCurrentSystemApps(int userId) {
IPackageManager ipm = IPackageManager.Stub.asInterface(ServiceManager
.getService("package"));
@@ -65,4 +77,142 @@
+ toDisable.toShortString());
}
}
+
+ public static ComponentName findDeviceAdminFromIntent(Intent intent, Context c)
+ throws IllegalProvisioningArgumentException {
+ ComponentName mdmComponentName = intent.getParcelableExtra(
+ EXTRA_PROVISIONING_DEVICE_ADMIN_COMPONENT_NAME);
+ String mdmPackageName = intent.getStringExtra(
+ EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_NAME);
+ return findDeviceAdmin(mdmPackageName, mdmComponentName, c);
+ }
+
+ /**
+ * Exception thrown when the provisioning has failed completely.
+ *
+ * We're using a custom exception to avoid catching subsequent exceptions that might be
+ * significant.
+ */
+ public static class IllegalProvisioningArgumentException extends Exception {
+ public IllegalProvisioningArgumentException(String message) {
+ super(message);
+ }
+
+ public IllegalProvisioningArgumentException(String message, Throwable t) {
+ super(message, t);
+ }
+ }
+
+ /**
+ * Check the validity of the admin component name supplied, or try to infer this componentName
+ * from the package.
+ *
+ * We are supporting lookup by package name for legacy reasons.
+ *
+ * If mdmComponentName is supplied (not null):
+ * mdmPackageName is ignored.
+ * Check that the package of mdmComponentName is installed, that mdmComponentName is a
+ * receiver in this package, and return it.
+ *
+ * Otherwise:
+ * mdmPackageName must be supplied (not null).
+ * Check that this package is installed, try to infer a potential device admin in this package,
+ * and return it.
+ */
+ public static ComponentName findDeviceAdmin(String mdmPackageName,
+ ComponentName mdmComponentName, Context c) throws IllegalProvisioningArgumentException {
+ if (mdmComponentName != null) {
+ mdmPackageName = mdmComponentName.getPackageName();
+ }
+ if (mdmPackageName == null) {
+ throw new IllegalProvisioningArgumentException("Neither the package name nor the"
+ + " component name of the admin are supplied");
+ }
+ PackageInfo pi;
+ try {
+ pi = c.getPackageManager().getPackageInfo(mdmPackageName,
+ PackageManager.GET_RECEIVERS);
+ } catch (NameNotFoundException e) {
+ throw new IllegalProvisioningArgumentException("Mdm "+ mdmPackageName
+ + " is not installed. ", e);
+ }
+ if (mdmComponentName != null) {
+ // If the component was specified in the intent: check that it is in the manifest.
+ checkAdminComponent(mdmComponentName, pi);
+ return mdmComponentName;
+ } else {
+ // Otherwise: try to find a potential device admin in the manifest.
+ return findDeviceAdminInPackage(mdmPackageName, pi);
+ }
+ }
+
+ private static void checkAdminComponent(ComponentName mdmComponentName, PackageInfo pi)
+ throws IllegalProvisioningArgumentException{
+ for (ActivityInfo ai : pi.receivers) {
+ if (mdmComponentName.getClassName().equals(ai.name)) {
+ return;
+ }
+ }
+ throw new IllegalProvisioningArgumentException("The component " + mdmComponentName
+ + " cannot be found");
+ }
+
+ private static ComponentName findDeviceAdminInPackage(String mdmPackageName, PackageInfo pi)
+ throws IllegalProvisioningArgumentException {
+ ComponentName mdmComponentName = null;
+ for (ActivityInfo ai : pi.receivers) {
+ if (!TextUtils.isEmpty(ai.permission) &&
+ ai.permission.equals(android.Manifest.permission.BIND_DEVICE_ADMIN)) {
+ if (mdmComponentName != null) {
+ throw new IllegalProvisioningArgumentException("There are several "
+ + "device admins in " + mdmPackageName + " but no one in specified");
+ } else {
+ mdmComponentName = new ComponentName(mdmPackageName, ai.name);
+ }
+ }
+ }
+ if (mdmComponentName == null) {
+ throw new IllegalProvisioningArgumentException("There are no device admins in"
+ + mdmPackageName);
+ }
+ return mdmComponentName;
+ }
+
+ public static MdmPackageInfo getMdmPackageInfo(PackageManager pm, String packageName) {
+ if (packageName != null) {
+ try {
+ ApplicationInfo ai = pm.getApplicationInfo(packageName, /* default flags */ 0);
+ if (ai != null) {
+ return new MdmPackageInfo(pm.getApplicationIcon(packageName),
+ pm.getApplicationLabel(ai).toString());
+ }
+ } catch (PackageManager.NameNotFoundException e) {
+ // Package does not exist, ignore. Should never happen.
+ ProvisionLogger.loge("Package does not exist. Should never happen.");
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Information relating to the currently installed MDM package manager.
+ */
+ public static final class MdmPackageInfo {
+ private final Drawable packageIcon;
+ private final String appLabel;
+
+ private MdmPackageInfo(Drawable packageIcon, String appLabel) {
+ this.packageIcon = packageIcon;
+ this.appLabel = appLabel;
+ }
+
+ public String getAppLabel() {
+ return appLabel;
+ }
+
+ public Drawable getPackageIcon() {
+ return packageIcon;
+ }
+ }
}
diff --git a/src/com/android/managedprovisioning/task/DownloadPackageTask.java b/src/com/android/managedprovisioning/task/DownloadPackageTask.java
index 38ef5f1..79185b2 100644
--- a/src/com/android/managedprovisioning/task/DownloadPackageTask.java
+++ b/src/com/android/managedprovisioning/task/DownloadPackageTask.java
@@ -31,6 +31,7 @@
import android.util.Base64;
import com.android.managedprovisioning.ProvisionLogger;
+import com.android.managedprovisioning.ProvisioningParams;
import java.io.InputStream;
import java.io.IOException;
@@ -38,45 +39,55 @@
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
/**
- * Downloads a given file and checks whether its hash matches a given hash to verify that the
- * intended file was downloaded.
+ * Downloads the device admin and the device initializer if download locations were provided for
+ * them in the provisioning parameters. Also checks that each file's hash matches a given hash to
+ * verify that the downloaded files are the ones that are expected.
*/
public class DownloadPackageTask {
public static final int ERROR_HASH_MISMATCH = 0;
public static final int ERROR_DOWNLOAD_FAILED = 1;
public static final int ERROR_OTHER = 2;
+ public static final String DEVICE_OWNER = "deviceOwner";
+ public static final String INITIALIZER = "initializer";
+
private static final String HASH_TYPE = "SHA-1";
private final Context mContext;
- private final String mDownloadLocationFrom;
private final Callback mCallback;
- private final byte[] mHash;
- private final String mHttpCookieHeader;
-
- private boolean mDoneDownloading;
- private String mDownloadLocationTo;
- private long mDownloadId;
private BroadcastReceiver mReceiver;
+ private final DownloadManager mDlm;
- public DownloadPackageTask (Context context, String downloadLocation, byte[] hash,
- String httpCookieHeader, Callback callback) {
+ private Set<DownloadInfo> mDownloads;
+
+ public DownloadPackageTask (Context context, ProvisioningParams params, Callback callback) {
mCallback = callback;
mContext = context;
- mDownloadLocationFrom = downloadLocation;
- mHash = hash;
- mHttpCookieHeader = httpCookieHeader;
- mDoneDownloading = false;
- }
+ mDlm = (DownloadManager) mContext.getSystemService(Context.DOWNLOAD_SERVICE);
- public boolean downloadLocationWasProvided() {
- return !TextUtils.isEmpty(mDownloadLocationFrom);
+ mDownloads = new HashSet<DownloadInfo>();
+ if (!TextUtils.isEmpty(params.mDeviceAdminPackageDownloadLocation)) {
+ mDownloads.add(new DownloadInfo(
+ params.mDeviceAdminPackageDownloadLocation,
+ params.mDeviceAdminPackageChecksum,
+ params.mDeviceAdminPackageDownloadCookieHeader,
+ DEVICE_OWNER));
+ }
+ if (!TextUtils.isEmpty(params.mDeviceInitializerPackageDownloadLocation)) {
+ mDownloads.add(new DownloadInfo(
+ params.mDeviceInitializerPackageDownloadLocation,
+ params.mDeviceInitializerPackageChecksum,
+ params.mDeviceInitializerPackageDownloadCookieHeader,
+ INITIALIZER));
+ }
}
public void run() {
- if (!downloadLocationWasProvided()) {
+ if (mDownloads.size() == 0) {
mCallback.onSuccess();
return;
}
@@ -84,38 +95,49 @@
mContext.registerReceiver(mReceiver,
new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
- ProvisionLogger.logd("Starting download from " + mDownloadLocationFrom);
DownloadManager dm = (DownloadManager) mContext
.getSystemService(Context.DOWNLOAD_SERVICE);
- Request request = new Request(Uri.parse(mDownloadLocationFrom));
- if (mHttpCookieHeader != null) {
- request.addRequestHeader("Cookie", mHttpCookieHeader);
- ProvisionLogger.logd("Downloading with http cookie header: " + mHttpCookieHeader);
+ for (DownloadInfo downloadInfo : mDownloads) {
+ ProvisionLogger.logd("Starting download from " + downloadInfo.mDownloadLocationFrom);
+
+ Request request = new Request(Uri.parse(downloadInfo.mDownloadLocationFrom));
+ if (downloadInfo.mHttpCookieHeader != null) {
+ request.addRequestHeader("Cookie", downloadInfo.mHttpCookieHeader);
+ ProvisionLogger.logd(
+ "Downloading with http cookie header: " + downloadInfo.mHttpCookieHeader);
+ }
+ downloadInfo.mDownloadId = dm.enqueue(request);
}
- mDownloadId = dm.enqueue(request);
}
private BroadcastReceiver createDownloadReceiver() {
return new BroadcastReceiver() {
+ /**
+ * Whenever the download manager finishes a download, record the successful download for
+ * the corresponding DownloadInfo.
+ */
@Override
public void onReceive(Context context, Intent intent) {
if (DownloadManager.ACTION_DOWNLOAD_COMPLETE.equals(intent.getAction())) {
Query q = new Query();
- q.setFilterById(mDownloadId);
- DownloadManager dm = (DownloadManager) mContext
- .getSystemService(Context.DOWNLOAD_SERVICE);
- Cursor c = dm.query(q);
- if (c.moveToFirst()) {
- int columnIndex = c.getColumnIndex(DownloadManager.COLUMN_STATUS);
- if (DownloadManager.STATUS_SUCCESSFUL == c.getInt(columnIndex)) {
- String location = c.getString(
- c.getColumnIndex(DownloadManager.COLUMN_LOCAL_FILENAME));
- c.close();
- onDownloadSuccess(location);
- } else if (DownloadManager.STATUS_FAILED == c.getInt(columnIndex)){
- int reason = c.getColumnIndex(DownloadManager.COLUMN_REASON);
- c.close();
- onDownloadFail(reason);
+ for (DownloadInfo downloadInfo : mDownloads) {
+ q.setFilterById(downloadInfo.mDownloadId);
+ Cursor c = mDlm.query(q);
+ if (c.moveToFirst()) {
+ long downloadId =
+ c.getLong(c.getColumnIndex(DownloadManager.COLUMN_ID));
+ int columnIndex = c.getColumnIndex(DownloadManager.COLUMN_STATUS);
+ if (DownloadManager.STATUS_SUCCESSFUL == c.getInt(columnIndex)) {
+ String location = c.getString(
+ c.getColumnIndex(DownloadManager.COLUMN_LOCAL_FILENAME));
+ c.close();
+ onDownloadSuccess(downloadId, location);
+ } else if (DownloadManager.STATUS_FAILED == c.getInt(columnIndex)){
+ int reason = c.getInt(
+ c.getColumnIndex(DownloadManager.COLUMN_REASON));
+ c.close();
+ onDownloadFail(reason);
+ }
}
}
}
@@ -123,40 +145,61 @@
};
}
- private void onDownloadSuccess(String location) {
- if (mDoneDownloading) {
+ /**
+ * For a given successful download, check that the downloaded file is the expected file. Check
+ * if this was the last file the task had to download and finish the DownloadPackageTask if that
+ * is the case.
+ * @param downloadId the unique download id for the completed download.
+ * @param location the file location of the downloaded file.
+ */
+ private void onDownloadSuccess(long downloadId, String location) {
+ DownloadInfo downloadInfo = null;
+ for (DownloadInfo info : mDownloads) {
+ if (downloadId == info.mDownloadId) {
+ downloadInfo = info;
+ }
+ }
+ if (downloadInfo == null || downloadInfo.mDoneDownloading) {
// DownloadManager can send success more than once. Only act first time.
return;
} else {
- mDoneDownloading = true;
+ downloadInfo.mDoneDownloading = true;
}
-
ProvisionLogger.logd("Downloaded succesfully to: " + location);
// Check whether hash of downloaded file matches hash given in constructor.
byte[] hash = computeHash(location);
if (hash == null) {
-
// Error should have been reported in computeHash().
return;
}
- if (Arrays.equals(mHash, hash)) {
+ if (Arrays.equals(downloadInfo.mHash, hash)) {
ProvisionLogger.logd(HASH_TYPE + "-hashes matched, both are "
+ byteArrayToString(hash));
- mDownloadLocationTo = location;
- mCallback.onSuccess();
+ downloadInfo.mLocation = location;
+ downloadInfo.mSuccess = true;
+ checkSuccess();
} else {
ProvisionLogger.loge(HASH_TYPE + "-hash of downloaded file does not match given hash.");
ProvisionLogger.loge(HASH_TYPE + "-hash of downloaded file: "
+ byteArrayToString(hash));
ProvisionLogger.loge(HASH_TYPE + "-hash provided by programmer: "
- + byteArrayToString(mHash));
+ + byteArrayToString(downloadInfo.mHash));
mCallback.onError(ERROR_HASH_MISMATCH);
}
}
+ private void checkSuccess() {
+ for (DownloadInfo info : mDownloads) {
+ if (!info.mSuccess) {
+ return;
+ }
+ }
+ mCallback.onSuccess();
+ }
+
private void onDownloadFail(int errorCode) {
ProvisionLogger.loge("Downloading package failed.");
ProvisionLogger.loge("COLUMN_REASON in DownloadManager response has value: "
@@ -203,8 +246,13 @@
return hash;
}
- public String getDownloadedPackageLocation() {
- return mDownloadLocationTo;
+ public String getDownloadedPackageLocation(String packageType) {
+ for (DownloadInfo info : mDownloads) {
+ if (packageType.equals(info.mPackageType)) {
+ return info.mLocation;
+ }
+ }
+ return "";
}
public void cleanUp() {
@@ -217,12 +265,14 @@
//Remove download.
DownloadManager dm = (DownloadManager) mContext
.getSystemService(Context.DOWNLOAD_SERVICE);
- boolean removeSuccess = dm.remove(mDownloadId) == 1;
- if (removeSuccess) {
- ProvisionLogger.logd("Successfully removed the device owner installer file.");
- } else {
- ProvisionLogger.loge("Could not remove the device owner installer file.");
- // Ignore this error. Failing cleanup should not stop provisioning flow.
+ for (DownloadInfo info : mDownloads) {
+ boolean removeSuccess = dm.remove(info.mDownloadId) == 1;
+ if (removeSuccess) {
+ ProvisionLogger.logd("Successfully removed installer file.");
+ } else {
+ ProvisionLogger.loge("Could not remove installer file.");
+ // Ignore this error. Failing cleanup should not stop provisioning flow.
+ }
}
}
@@ -235,4 +285,24 @@
public abstract void onSuccess();
public abstract void onError(int errorCode);
}
+
+ private static class DownloadInfo {
+ public final String mDownloadLocationFrom;
+ public final byte[] mHash;
+ public final String mHttpCookieHeader;
+ public final String mPackageType;
+ public long mDownloadId;
+ public String mLocation;
+ public boolean mDoneDownloading;
+ public boolean mSuccess;
+
+ public DownloadInfo(String downloadLocation, byte[] hash, String httpCookieHeader,
+ String packageType) {
+ mDownloadLocationFrom = downloadLocation;
+ mHash = hash;
+ mHttpCookieHeader = httpCookieHeader;
+ mPackageType = packageType;
+ mDoneDownloading = false;
+ }
+ }
}
diff --git a/src/com/android/managedprovisioning/task/InstallPackageTask.java b/src/com/android/managedprovisioning/task/InstallPackageTask.java
index b0cc438..5eaa43a 100644
--- a/src/com/android/managedprovisioning/task/InstallPackageTask.java
+++ b/src/com/android/managedprovisioning/task/InstallPackageTask.java
@@ -27,14 +27,17 @@
import android.Manifest.permission;
import com.android.managedprovisioning.ProvisionLogger;
+import com.android.managedprovisioning.ProvisioningParams;
import java.io.File;
+import java.util.HashSet;
+import java.util.Set;
/**
- * Installs a device owner package from a given path.
+ * Optionally installs device owner and device initializer packages.
* <p>
- * Before installing it is checked whether the file at the specified path contains the given package
- * and the given admin receiver.
+ * Before installing it is checked whether each file at the specified paths contains the correct
+ * package and admin receiver.
* </p>
*/
public class InstallPackageTask {
@@ -43,73 +46,89 @@
private final Context mContext;
private final Callback mCallback;
- private final String mPackageName;
+ private final String mDeviceAdminPackageName;
+ private final String mDeviceInitializerPackageName;
+ private final boolean mDownloadedAdmin;
+ private final boolean mDownloadedInitializer;
- private String mPackageLocation;
- private final String mDownloadLocationFrom;
private PackageManager mPm;
private int mPackageVerifierEnable;
+ private Set<InstallInfo> mPackagesToInstall;
- public InstallPackageTask (Context context, String packageName, String downloadLocation,
- Callback callback) {
+ public InstallPackageTask (Context context, ProvisioningParams params, Callback callback) {
mCallback = callback;
mContext = context;
- mPackageLocation = null; // Initialized in run().
- mPackageName = packageName;
- mDownloadLocationFrom = downloadLocation;
+ mDeviceAdminPackageName = params.inferDeviceAdminPackageName();
+ mDeviceInitializerPackageName = params.mDeviceInitializerComponentName.getPackageName();
+ mDownloadedAdmin = !TextUtils.isEmpty(params.mDeviceAdminPackageDownloadLocation);
+ mDownloadedInitializer =
+ !TextUtils.isEmpty(params.mDeviceInitializerPackageDownloadLocation);
+ mPackagesToInstall = new HashSet<InstallInfo>();
}
- public boolean downloadLocationWasProvided() {
- return !TextUtils.isEmpty(mDownloadLocationFrom);
- }
-
- public void run(String packageLocation) {
- if (TextUtils.isEmpty(packageLocation)) {
- if (!downloadLocationWasProvided()) {
- ProvisionLogger.loge("Package Location is empty, nothing to install.");
- mCallback.onSuccess();
- return;
+ public void run(String deviceAdminPackageLocation, String deviceInitializerPackageLocation) {
+ if (mDownloadedAdmin) {
+ if (!TextUtils.isEmpty(deviceAdminPackageLocation)) {
+ mPackagesToInstall.add(
+ new InstallInfo(mDeviceAdminPackageName, deviceAdminPackageLocation));
} else {
ProvisionLogger.loge("Package Location is empty.");
mCallback.onError(ERROR_PACKAGE_INVALID);
return;
}
}
- mPackageLocation = packageLocation;
+ if (mDownloadedInitializer) {
+ if (!TextUtils.isEmpty(deviceInitializerPackageLocation)) {
+ mPackagesToInstall.add(new InstallInfo(
+ mDeviceInitializerPackageName, deviceInitializerPackageLocation));
+ } else {
+ ProvisionLogger.loge("Package Location is empty.");
+ mCallback.onError(ERROR_PACKAGE_INVALID);
+ return;
+ }
+ }
+
+ if (mPackagesToInstall.size() == 0) {
+ ProvisionLogger.loge("Nothing to install");
+ mCallback.onSuccess();
+ return;
+ }
+ ProvisionLogger.logi("Installing package(s)");
PackageInstallObserver observer = new PackageInstallObserver();
mPm = mContext.getPackageManager();
- if (packageContentIsCorrect()) {
- // Temporarily turn off package verification.
- mPackageVerifierEnable = Global.getInt(mContext.getContentResolver(),
- Global.PACKAGE_VERIFIER_ENABLE, 1);
- Global.putInt(mContext.getContentResolver(), Global.PACKAGE_VERIFIER_ENABLE, 0);
+ for (InstallInfo info : mPackagesToInstall) {
+ if (packageContentIsCorrect(info.mPackageName, info.mLocation)) {
+ // Temporarily turn off package verification.
+ mPackageVerifierEnable = Global.getInt(mContext.getContentResolver(),
+ Global.PACKAGE_VERIFIER_ENABLE, 1);
+ Global.putInt(mContext.getContentResolver(), Global.PACKAGE_VERIFIER_ENABLE, 0);
- Uri packageUri = Uri.parse("file://" + mPackageLocation);
-
- // Allow for replacing an existing package.
- // Needed in case this task is performed multiple times.
- mPm.installPackage(packageUri, observer,
- /* flags */ PackageManager.INSTALL_REPLACE_EXISTING, mContext.getPackageName());
- } else {
- // Error should have been reported in packageContentIsCorrect().
- return;
+ // Allow for replacing an existing package.
+ // Needed in case this task is performed multiple times.
+ mPm.installPackage(Uri.parse("file://" + info.mLocation),
+ observer,
+ /* flags */ PackageManager.INSTALL_REPLACE_EXISTING,
+ mContext.getPackageName());
+ } else {
+ // Error should have been reported in packageContentIsCorrect().
+ return;
+ }
}
}
- private boolean packageContentIsCorrect() {
- PackageInfo pi = mPm.getPackageArchiveInfo(mPackageLocation,
- PackageManager.GET_RECEIVERS);
+ private boolean packageContentIsCorrect(String packageName, String packageLocation) {
+ PackageInfo pi = mPm.getPackageArchiveInfo(packageLocation, PackageManager.GET_RECEIVERS);
if (pi == null) {
ProvisionLogger.loge("Package could not be parsed successfully.");
mCallback.onError(ERROR_PACKAGE_INVALID);
return false;
}
- if (!pi.packageName.equals(mPackageName)) {
+ if (!pi.packageName.equals(packageName)) {
ProvisionLogger.loge("Package name in apk (" + pi.packageName
+ ") does not match package name specified by programmer ("
- + mPackageName + ").");
+ + packageName + ").");
mCallback.onError(ERROR_PACKAGE_INVALID);
return false;
}
@@ -127,34 +146,68 @@
private class PackageInstallObserver extends IPackageInstallObserver.Stub {
@Override
public void packageInstalled(String packageName, int returnCode) {
- // Set package verification flag to its original value.
- Global.putInt(mContext.getContentResolver(), Global.PACKAGE_VERIFIER_ENABLE,
- mPackageVerifierEnable);
-
- if (returnCode == PackageManager.INSTALL_SUCCEEDED
- && mPackageName.equals(packageName)) {
- ProvisionLogger.logd("Package " + mPackageName + " is succesfully installed.");
-
- mCallback.onSuccess();
+ InstallInfo installInfo = null;
+ for (InstallInfo info : mPackagesToInstall) {
+ if (packageName.equals(info.mPackageName)) {
+ installInfo = info;
+ }
+ }
+ if (installInfo == null) {
+ ProvisionLogger.loge("Package doesn't have expected package name.");
+ mCallback.onError(ERROR_PACKAGE_INVALID);
+ return;
+ }
+ if (returnCode == PackageManager.INSTALL_SUCCEEDED) {
+ installInfo.mDoneInstalling = true;
+ ProvisionLogger.logd(
+ "Package " + installInfo.mPackageName + " is succesfully installed.");
+ checkSuccess();
} else {
if (returnCode == PackageManager.INSTALL_FAILED_VERSION_DOWNGRADE) {
- ProvisionLogger.logd("Current version of " + mPackageName
- + " higher than the version to be installed.");
- ProvisionLogger.logd("Package " + mPackageName + " was not reinstalled.");
- mCallback.onSuccess();
- return;
+ installInfo.mDoneInstalling = true;
+ ProvisionLogger.logd("Current version of " + installInfo.mPackageName
+ + " higher than the version to be installed. It was not reinstalled.");
+ checkSuccess();
+ } else {
+ ProvisionLogger.logd(
+ "Installing package " + installInfo.mPackageName + " failed.");
+ ProvisionLogger.logd(
+ "Errorcode returned by IPackageInstallObserver = " + returnCode);
+ mCallback.onError(ERROR_INSTALLATION_FAILED);
}
-
- ProvisionLogger.logd("Installing package " + mPackageName + " failed.");
- ProvisionLogger.logd("Errorcode returned by IPackageInstallObserver = "
- + returnCode);
- mCallback.onError(ERROR_INSTALLATION_FAILED);
}
}
}
+ /**
+ * Calls the success callback once all of the packages that needed to be installed are
+ * successfully installed.
+ */
+ private void checkSuccess() {
+ for (InstallInfo info : mPackagesToInstall) {
+ if (!info.mDoneInstalling) {
+ return;
+ }
+ }
+ // Set package verification flag to its original value.
+ Global.putInt(mContext.getContentResolver(), Global.PACKAGE_VERIFIER_ENABLE,
+ mPackageVerifierEnable);
+ mCallback.onSuccess();
+ }
+
public abstract static class Callback {
public abstract void onSuccess();
public abstract void onError(int errorCode);
}
+
+ private static class InstallInfo {
+ public String mPackageName;
+ public String mLocation;
+ public boolean mDoneInstalling;
+
+ public InstallInfo(String packageName, String location) {
+ mPackageName = packageName;
+ mLocation = location;
+ }
+ }
}
\ No newline at end of file
diff --git a/src/com/android/managedprovisioning/task/SetDevicePolicyTask.java b/src/com/android/managedprovisioning/task/SetDevicePolicyTask.java
index 7fe13bd..82a60a8 100644
--- a/src/com/android/managedprovisioning/task/SetDevicePolicyTask.java
+++ b/src/com/android/managedprovisioning/task/SetDevicePolicyTask.java
@@ -19,15 +19,15 @@
import android.app.admin.DevicePolicyManager;
import android.content.ComponentName;
import android.content.Context;
-import android.content.Intent;
-import android.content.pm.ActivityInfo;
-import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
-import android.content.pm.PackageManager.NameNotFoundException;
-import android.text.TextUtils;
import com.android.managedprovisioning.ProvisionLogger;
+/**
+ * This tasks sets a given component as the owner of the device. If provided it also sets a given
+ * component as the device initializer, which can perform additional setup steps at the end of
+ * provisioning before setting the device as provisioned.
+ */
public class SetDevicePolicyTask {
public static final int ERROR_PACKAGE_NOT_INSTALLED = 0;
public static final int ERROR_NO_RECEIVER = 1;
@@ -35,72 +35,79 @@
private final Callback mCallback;
private final Context mContext;
- private final String mPackageName;
- private final String mOwner;
+ private String mAdminPackage;
+ private ComponentName mAdminComponent;
+ private final String mOwnerName;
+ private ComponentName mInitializerComponent;
+ private String mInitializerPackageName;
+ private String mInitializerName;
- private String mAdminReceiver;
private PackageManager mPackageManager;
private DevicePolicyManager mDevicePolicyManager;
- public SetDevicePolicyTask(Context context, String packageName, String owner,
- Callback callback) {
+ public SetDevicePolicyTask(Context context, String ownerName,
+ ComponentName initializerComponent, String initializerName, Callback callback) {
mCallback = callback;
mContext = context;
- mPackageName = packageName;
- mOwner = owner;
+ mOwnerName = ownerName;
+ mInitializerComponent = initializerComponent;
+ if (mInitializerComponent != null) {
+ mInitializerPackageName = initializerComponent.getPackageName();
+ mInitializerName = initializerName;
+ }
+
mPackageManager = mContext.getPackageManager();
mDevicePolicyManager = (DevicePolicyManager) mContext.
getSystemService(Context.DEVICE_POLICY_SERVICE);
}
- public void run() {
- // Check whether package is installed and find the admin receiver.
- if (isPackageInstalled()) {
- enableDevicePolicyApp();
- setActiveAdmin();
- setDeviceOwner();
- mCallback.onSuccess();
- }
- }
-
- private boolean isPackageInstalled() {
+ public void run(ComponentName adminComponent) {
try {
- PackageInfo pi = mPackageManager.getPackageInfo(mPackageName,
- PackageManager.GET_RECEIVERS);
- for (ActivityInfo ai : pi.receivers) {
- if (!TextUtils.isEmpty(ai.permission) &&
- ai.permission.equals(android.Manifest.permission.BIND_DEVICE_ADMIN)) {
- mAdminReceiver = ai.name;
- return true;
- }
+ mAdminComponent = adminComponent;
+ mAdminPackage = mAdminComponent.getPackageName();
+
+ enableDevicePolicyApp(mAdminPackage);
+ setActiveAdmin(mAdminComponent);
+ setDeviceOwner(mAdminPackage, mOwnerName);
+
+ if (mInitializerComponent != null) {
+ enableDevicePolicyApp(mInitializerPackageName);
+ setActiveAdmin(mInitializerComponent);
+ setDeviceInitializer(mInitializerComponent, mInitializerName);
}
- mCallback.onError(ERROR_NO_RECEIVER);
- return false;
- } catch (NameNotFoundException e) {
- mCallback.onError(ERROR_PACKAGE_NOT_INSTALLED);
- return false;
+ } catch (Exception e) {
+ ProvisionLogger.loge("Failure setting device owner or initializer", e);
+ mCallback.onError(ERROR_OTHER);
+ return;
}
+
+ mCallback.onSuccess();
}
- private void enableDevicePolicyApp() {
- int enabledSetting = mPackageManager
- .getApplicationEnabledSetting(mPackageName);
+ private void enableDevicePolicyApp(String packageName) {
+ int enabledSetting = mPackageManager.getApplicationEnabledSetting(packageName);
if (enabledSetting != PackageManager.COMPONENT_ENABLED_STATE_DEFAULT) {
- mPackageManager.setApplicationEnabledSetting(mPackageName,
+ mPackageManager.setApplicationEnabledSetting(packageName,
PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, 0);
}
}
- public void setActiveAdmin() {
- ProvisionLogger.logd("Setting " + mPackageName + " as active admin.");
- ComponentName component = new ComponentName(mPackageName, mAdminReceiver);
+ public void setActiveAdmin(ComponentName component) {
+ ProvisionLogger.logd("Setting " + component + " as active admin.");
mDevicePolicyManager.setActiveAdmin(component, true);
}
- public void setDeviceOwner() {
- ProvisionLogger.logd("Setting " + mPackageName + " as device owner " + mOwner + ".");
- if (!mDevicePolicyManager.isDeviceOwner(mPackageName)) {
- mDevicePolicyManager.setDeviceOwner(mPackageName, mOwner);
+ public void setDeviceOwner(String packageName, String owner) {
+ ProvisionLogger.logd("Setting " + packageName + " as device owner " + owner + ".");
+ if (!mDevicePolicyManager.isDeviceOwner(packageName)) {
+ mDevicePolicyManager.setDeviceOwner(packageName, owner);
+ }
+ }
+
+ public void setDeviceInitializer(ComponentName component, String owner) {
+ ProvisionLogger.logd("Setting " + component + " as device initializer " + owner + ".");
+ if (!mDevicePolicyManager.isDeviceInitializerApp(component.getPackageName())) {
+ mDevicePolicyManager.setDeviceInitializer(null, component, owner);
}
}