diff options
author | Ricardo Cerqueira <ricardo@cyngn.com> | 2016-08-10 12:33:05 +0100 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-08-11 03:38:54 -0700 |
commit | 8331602e949ad95758f126fcac82b64c1249a3c2 (patch) | |
tree | 0b29bd0b60ab7c47f8e9a9c206405e973999a428 | |
parent | 3dce293b18fcf9ce526169ef7711a71b37759b3f (diff) | |
download | packages_apps_SetupWizard-8331602e949ad95758f126fcac82b64c1249a3c2.zip packages_apps_SetupWizard-8331602e949ad95758f126fcac82b64c1249a3c2.tar.gz packages_apps_SetupWizard-8331602e949ad95758f126fcac82b64c1249a3c2.tar.bz2 |
If the device has FRP, prompt the user to set up a lockscreen
FRP is kind of pointless if the device is freely accessible. Suggest
setting up a secure lockscreen during setup.
Ref CYNGNOS-3252
Change-Id: Ia807142ab08f388d533b5ee45d1fcbe81071f6d1
47 files changed, 398 insertions, 0 deletions
diff --git a/res/layout/setup_lockscreen.xml b/res/layout/setup_lockscreen.xml new file mode 100644 index 0000000..20f06bd --- /dev/null +++ b/res/layout/setup_lockscreen.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2015 The CyanogenMod 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" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <include layout="@layout/header" /> + + <FrameLayout android:id="@+id/page" + android:layout_width="match_parent" + android:layout_height="0dp" + android:layout_weight="1"> + + <ScrollView android:layout_width="match_parent" + android:layout_height="match_parent" + android:fillViewport="true"> + + <LinearLayout + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="wrap_content" + style="@style/PageContent"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + style="@style/PageSummaryText" + android:textSize="16sp" + android:paddingLeft="@dimen/content_margin_left" + android:layout_marginBottom="@dimen/summary_margin_bottom" + android:paddingRight="@dimen/location_text_margin_right" + android:text="@string/lockscreen_setup_summary" /> + + <TextView + android:id="@+id/setup_lockscreen" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingLeft="@dimen/content_margin_left" + android:paddingRight="@dimen/location_text_margin_right" + android:gravity="center_vertical" + android:textSize="16sp" + android:textAllCaps="true" + android:textColor="@color/accent" + android:text="@string/lockscreen_setup_screen_lock_setup"/> + + </LinearLayout> + </ScrollView> + </FrameLayout> +</LinearLayout> diff --git a/res/values-af/strings.xml b/res/values-af/strings.xml index 83fee1d..464040a 100644 --- a/res/values-af/strings.xml +++ b/res/values-af/strings.xml @@ -78,5 +78,10 @@ <string name="fingerprint_setup_add_fingerprint">Voeg jou vingerafdruk by</string> <string name="fingerprint_setup_screen_lock_setup">Stel skerm sluit op</string> <string name="sim_locale_changed">%1$s SIM opgespoor</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Beskerm jou foon</string> + <string name="lockscreen_setup_summary"><b>Beskerm die toestel</b>" en vereis 'n PIN, patroon of wagwoord om skerm te ontsluit"</string> + <string name="lockscreen_setup_screen_lock_setup">Stel PIN, patroon of wagwoord op</string> <!-- MOD stuff --> </resources> diff --git a/res/values-ar/strings.xml b/res/values-ar/strings.xml index 49182a7..13c63ab 100644 --- a/res/values-ar/strings.xml +++ b/res/values-ar/strings.xml @@ -78,5 +78,10 @@ <string name="fingerprint_setup_add_fingerprint">أضف بصمتك</string> <string name="fingerprint_setup_screen_lock_setup">إنشاء إقفال الشاشة</string> <string name="sim_locale_changed">تم اكتشاف %1$s SIM</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">حماية هاتفك</string> + <string name="lockscreen_setup_summary"><b>حماية هذا الجهاز</b> وطلب رقم تعريف شخصي أو نمط أو كلمة مرور لإلغاء قفل الشاشة.</string> + <string name="lockscreen_setup_screen_lock_setup">إعداد رقم تعريف شخصي أو نمط أو كلمة مرور</string> <!-- MOD stuff --> </resources> diff --git a/res/values-bg/strings.xml b/res/values-bg/strings.xml index 1404f59..a27f294 100644 --- a/res/values-bg/strings.xml +++ b/res/values-bg/strings.xml @@ -79,6 +79,11 @@ <string name="fingerprint_setup_add_fingerprint">Добавете вашият пръстов отпечатък</string> <string name="fingerprint_setup_screen_lock_setup">Настройка на екрана за заключване</string> <string name="sim_locale_changed">Намерена %1$s СИМ карта</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Защитете телефона си</string> + <string name="lockscreen_setup_summary"><b>Защитете у-вото</b> и изисквайте ПИН код, фигура или парола за отключване на екрана</string> + <string name="lockscreen_setup_screen_lock_setup">Настройване на ПИН код, фигура или парола</string> <!-- MOD stuff --> <string name="mod_welcome">Вашето устройство е готово за модификация</string> <string name="mod_description">Модулите ще направят в телефона по-бърз, по-умен и лесен за употреба. В това ръководство можете да откриете нови модове, да научите какво те правят и как да ги активирате и деактивирате.</string> diff --git a/res/values-ca/strings.xml b/res/values-ca/strings.xml index 4534c85..826c83a 100644 --- a/res/values-ca/strings.xml +++ b/res/values-ca/strings.xml @@ -79,6 +79,11 @@ <string name="fingerprint_setup_add_fingerprint">Afegeix la teva empremta digital</string> <string name="fingerprint_setup_screen_lock_setup">Configuració del bloqueig de pantalla</string> <string name="sim_locale_changed">%1$s SIM detectada</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Protegeix el teu telèfon</string> + <string name="lockscreen_setup_summary"><b>Protegeix el dispositiu</b> i estableix un PIN, un patró o una contrasenya per desbloquejar la pantalla</string> + <string name="lockscreen_setup_screen_lock_setup">Configura el PIN, el patró o la contrasenya</string> <!-- MOD stuff --> <string name="mod_welcome">El teu dispositiu està llest pel MOD</string> <string name="mod_description">Els Mods fan el teu telèfon més ràpid, i més fàcil d\'utilitzar. En aquesta guia, pots descobrir nous mods, aprendre què fan, i habilitar-los o deshabilitar-los.</string> diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml index 08bbe9c..c56e935 100644 --- a/res/values-cs/strings.xml +++ b/res/values-cs/strings.xml @@ -79,6 +79,11 @@ <string name="fingerprint_setup_add_fingerprint">Přidat otisk prstu</string> <string name="fingerprint_setup_screen_lock_setup">Nastavit zámek obrazovky</string> <string name="sim_locale_changed">Zjištěna %1$s SIM</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Chraňte svůj telefon</string> + <string name="lockscreen_setup_summary"><b>Chránit toto zařízení</b> a před odemknutím obrazovky požadovat kód PIN, gesto nebo heslo</string> + <string name="lockscreen_setup_screen_lock_setup">Nastavit kód PIN, gesto nebo heslo</string> <!-- MOD stuff --> <string name="mod_welcome">Zařízení je připraveno k použití modů</string> <string name="mod_description">Mody zrychlují, zefektivňují a usnadňují používání telefonu. V této příručce můžete objevit nové mody, naučit se co dělají, povolit je nebo zakázat.</string> diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml index c61f342..91d09fe 100644 --- a/res/values-da/strings.xml +++ b/res/values-da/strings.xml @@ -78,5 +78,10 @@ <string name="fingerprint_setup_add_fingerprint">Tilføje dit fingeraftryk</string> <string name="fingerprint_setup_screen_lock_setup">Konfigurere skærmlås</string> <string name="sim_locale_changed">%1$s SIM-kort fundet</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Beskyt din telefon</string> + <string name="lockscreen_setup_summary"><b>Beskyt denne enhed</b>, og kræv pinkode, mønster eller adgangskode for at låse skærmen op</string> + <string name="lockscreen_setup_screen_lock_setup">Konfigurer pinkode, mønster eller adgangskode</string> <!-- MOD stuff --> </resources> diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml index 1b7bf3b..0e8339c 100644 --- a/res/values-de/strings.xml +++ b/res/values-de/strings.xml @@ -79,6 +79,11 @@ <string name="fingerprint_setup_add_fingerprint">Fügen Sie Ihren Fingerabdruck hinzu.</string> <string name="fingerprint_setup_screen_lock_setup">Die Bildschirmsperre einrichten</string> <string name="sim_locale_changed">%1$s SIM-Karte erkannt</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Schützen Sie Ihr Telefon</string> + <string name="lockscreen_setup_summary"><b>Gerät schützen</b> und PIN, Muster oder Passwort zur Display-Entsperrung verwenden</string> + <string name="lockscreen_setup_screen_lock_setup">PIN, Muster oder Passwort einrichten</string> <!-- MOD stuff --> <string name="mod_welcome">Ihr Gerät ist MOD bereit</string> <string name="mod_description">Mods machen Ihr Mobiltelefon schneller, smarter und einfacher zu bedienen. In diesem Handbuch können Sie neue Mods entdecken, erfahren was sie tun und diese aktivieren oder deaktivieren.</string> diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml index 5e6b480..3bccd5f 100644 --- a/res/values-el/strings.xml +++ b/res/values-el/strings.xml @@ -78,5 +78,10 @@ <string name="fingerprint_setup_add_fingerprint">Προσθέστε το δακτυλικό σας αποτύπωμα</string> <string name="fingerprint_setup_screen_lock_setup">Ρύθμιση κλειδώματος οθόνης</string> <string name="sim_locale_changed">Ανιχνεύθηκε %1$s SIM</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Προστατέψτε το τηλέφωνό σας</string> + <string name="lockscreen_setup_summary"><b>Προστατέψτε αυτήν τη συσκευή</b> και ζητήστε ένα PIN, ένα μοτίβο ή έναν κωδικό πρόσβασης για να ξεκλειδώσετε την οθόνη</string> + <string name="lockscreen_setup_screen_lock_setup">Ρύθμιση PIN, μοτίβου ή κωδικού πρόσβασης</string> <!-- MOD stuff --> </resources> diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml index 313f586..787469f 100644 --- a/res/values-es-rUS/strings.xml +++ b/res/values-es-rUS/strings.xml @@ -78,5 +78,10 @@ <string name="fingerprint_setup_add_fingerprint">Añadir tu huella digital</string> <string name="fingerprint_setup_screen_lock_setup">Configurar la pantalla bloqueada</string> <string name="sim_locale_changed">%1$s SIM detectada</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Protege el teléfono</string> + <string name="lockscreen_setup_summary"><b>Proteger dispositivo</b> y solicitar PIN/patrón/contraseña para desbloquear pantalla</string> + <string name="lockscreen_setup_screen_lock_setup">Configurar PIN, patrón o contraseña</string> <!-- MOD stuff --> </resources> diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml index b313ed2..e65dbba 100644 --- a/res/values-es/strings.xml +++ b/res/values-es/strings.xml @@ -78,5 +78,10 @@ <string name="fingerprint_setup_add_fingerprint">Añade tu huella digital</string> <string name="fingerprint_setup_screen_lock_setup">Ajustes de pantalla de bloqueo</string> <string name="sim_locale_changed">%1$s SIM detectada</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Protege tu teléfono</string> + <string name="lockscreen_setup_summary"><b>Proteger este dispositivo</b> y establecer un PIN, un patrón o una contraseña para desbloquear la pantalla</string> + <string name="lockscreen_setup_screen_lock_setup">Configurar PIN, patrón o contraseña</string> <!-- MOD stuff --> </resources> diff --git a/res/values-eu-rES/strings.xml b/res/values-eu-rES/strings.xml index e54aa9b..bd8f77d 100644 --- a/res/values-eu-rES/strings.xml +++ b/res/values-eu-rES/strings.xml @@ -79,6 +79,11 @@ <string name="fingerprint_setup_add_fingerprint">Gehitu zure hatz-marka</string> <string name="fingerprint_setup_screen_lock_setup">Ezarri pantaila blokeoa</string> <string name="sim_locale_changed">%1$s SIM antzeman da</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Babestu telefonoa</string> + <string name="lockscreen_setup_summary"><b>Babestu gailua</b> eta eskatu PIN kode, eredu edo pasahitz bat pantaila desblokeatzeko</string> + <string name="lockscreen_setup_screen_lock_setup">Konfiguratu PIN kodea, eredua edo pasahitza</string> <!-- MOD stuff --> <string name="mod_welcome">Zure gailuak MODak onartzen ditu</string> <string name="mod_description">Modak zure telefona azkarragoa, adimentsuagoa eta erabilerrazagoa egiten dute. Gida honetan, mod berriak ezagutuko dituzu, zer egiten duten ulertu, eta nola gaitu eta desgaitu ikasiko duzu.</string> diff --git a/res/values-fi/strings.xml b/res/values-fi/strings.xml index ac14ffe..e53e610 100644 --- a/res/values-fi/strings.xml +++ b/res/values-fi/strings.xml @@ -78,5 +78,10 @@ <string name="fingerprint_setup_add_fingerprint">Lisää sormenjälkesi</string> <string name="fingerprint_setup_screen_lock_setup">Aseta näytön lukitus</string> <string name="sim_locale_changed">%1$s SIM tunnistettu</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Suojaa puhelintasi</string> + <string name="lockscreen_setup_summary"><b>Suojaa laitetta</b> avaamalla näytön lukitus PIN-koodin, kuvion tai salasanan avulla</string> + <string name="lockscreen_setup_screen_lock_setup">Aseta PIN-koodi, kuvio tai salasana</string> <!-- MOD stuff --> </resources> diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml index 1292f3d..bbe411c 100644 --- a/res/values-fr/strings.xml +++ b/res/values-fr/strings.xml @@ -78,5 +78,10 @@ <string name="fingerprint_setup_add_fingerprint">Ajouter votre empreinte digitale</string> <string name="fingerprint_setup_screen_lock_setup">Configurer le verrouillage de l\'écran</string> <string name="sim_locale_changed">%1$s carte SIM détectée</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Protéger votre téléphone</string> + <string name="lockscreen_setup_summary"><b>"Protéger l'appareil"</b>" et exiger code, schéma ou mot de passe pour déverrouiller l'écran"</string> + <string name="lockscreen_setup_screen_lock_setup">Configurer un code, un schéma ou un mot de passe</string> <!-- MOD stuff --> </resources> diff --git a/res/values-gu-rIN/strings.xml b/res/values-gu-rIN/strings.xml index 1fc52cc..6dc6a66 100644 --- a/res/values-gu-rIN/strings.xml +++ b/res/values-gu-rIN/strings.xml @@ -77,5 +77,10 @@ <string name="fingerprint_setup_add_fingerprint">તમારી ફિંગરપ્રિન્ટ ઉમેરો</string> <string name="fingerprint_setup_screen_lock_setup">સ્ક્રીન લૉક સેટઅપ કરો</string> <string name="sim_locale_changed">%1$s SIM સૂચિત</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">તમારા ફોનને સુરક્ષિત કરો</string> + <string name="lockscreen_setup_summary"><b>આ ઉપકરણને સુરક્ષિત કરો</b> અને સ્ક્રીનને અનલૉક કરવા માટે PIN, પેટર્ન અથવા પાસવર્ડ જરૂરી</string> + <string name="lockscreen_setup_screen_lock_setup">PIN, પેટર્ન અથવા પાસવર્ડ સેટ કરો</string> <!-- MOD stuff --> </resources> diff --git a/res/values-hr/strings.xml b/res/values-hr/strings.xml index dc6289c..57ea6d4 100644 --- a/res/values-hr/strings.xml +++ b/res/values-hr/strings.xml @@ -79,6 +79,11 @@ <string name="fingerprint_setup_add_fingerprint">Dodajte svoj otisak</string> <string name="fingerprint_setup_screen_lock_setup">Postavljanje zaključavanja zaslona</string> <string name="sim_locale_changed">%1$s SIM otkriven</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Zaštitite svoj telefon</string> + <string name="lockscreen_setup_summary"><b>Zaštiti uređaj</b> i zahtijevaj PIN, uzorak ili zaporku za otključavanje zaslona</string> + <string name="lockscreen_setup_screen_lock_setup">Postavi PIN, uzorak ili zaporku</string> <!-- MOD stuff --> <string name="mod_welcome">Vaš uređaj je MOD Spreman</string> <string name="mod_description">Modovi čine telefon bržim, pametnijim i lakšim za korištenje. U ovom vodiču, možete otkriti nove modove, saznati što oni sve mogu, te ih omogućiti ili onemogućiti.</string> diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml index 2a5c1a2..6940b86 100644 --- a/res/values-hu/strings.xml +++ b/res/values-hu/strings.xml @@ -77,5 +77,10 @@ <string name="fingerprint_setup_add_fingerprint">Adja hozzá ujjlenyomatát</string> <string name="fingerprint_setup_screen_lock_setup">Képernyőzár beállítása</string> <string name="sim_locale_changed">%1$s SIM észlelve</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Óvja meg telefonját</string> + <string name="lockscreen_setup_summary"><b>Óvja meg eszközét</b>, és a képernyőzár feloldásához állítson be PIN kódot, mintát vagy jelszót.</string> + <string name="lockscreen_setup_screen_lock_setup">PIN kód, minta vagy jelszó beállítása</string> <!-- MOD stuff --> </resources> diff --git a/res/values-in/strings.xml b/res/values-in/strings.xml index 057fadc..4e5f972 100644 --- a/res/values-in/strings.xml +++ b/res/values-in/strings.xml @@ -78,5 +78,10 @@ <string name="fingerprint_setup_add_fingerprint">Tambahkan sidik jari Anda</string> <string name="fingerprint_setup_screen_lock_setup">Siapkan kunci layar</string> <string name="sim_locale_changed">%1$s SIM terdeteksi</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Lindungi ponsel</string> + <string name="lockscreen_setup_summary"><b>Lindungi perangkat ini</b> dan minta PIN, pola, atau sandi untuk membuka kunci layar</string> + <string name="lockscreen_setup_screen_lock_setup">Siapkan PIN, pola, atau sandi</string> <!-- MOD stuff --> </resources> diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml index 14f9825..f5d1609 100644 --- a/res/values-it/strings.xml +++ b/res/values-it/strings.xml @@ -79,6 +79,11 @@ <string name="fingerprint_setup_add_fingerprint">Aggiungere un\'impronta</string> <string name="fingerprint_setup_screen_lock_setup">Imposta una schermata di blocco</string> <string name="sim_locale_changed">%1$s SIM rilevata</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Proteggi il tuo telefono</string> + <string name="lockscreen_setup_summary"><b>Proteggi il dispositivo</b> e richiedi PIN, sequenza o password per sbloccare schermo</string> + <string name="lockscreen_setup_screen_lock_setup">Configura PIN, sequenza o password</string> <!-- MOD stuff --> <string name="mod_welcome">Il tuo dispositivo è Mod Ready</string> <string name="mod_description">Le Mod rendono il dispositivo più veloce, intelligente e facile da usare. In questa guida puoi esplorare nuove Mod, conoscerne il funzionamento, attivarle o disattivarle.</string> diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml index ef5fb3d..a529063 100644 --- a/res/values-iw/strings.xml +++ b/res/values-iw/strings.xml @@ -79,5 +79,10 @@ <string name="fingerprint_setup_add_fingerprint">הוסף את טביעת האצבע שלך</string> <string name="fingerprint_setup_screen_lock_setup">הגדרת מסך נעילה</string> <string name="sim_locale_changed">זוהו %1$s כרטיסי SIM</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">הגן על הטלפון שלך</string> + <string name="lockscreen_setup_summary"><b>הגן על מכשיר זה</b> ודרוש קוד אימות, קו או סיסמה לביטול נעילת המסך.</string> + <string name="lockscreen_setup_screen_lock_setup">הגדר PIN, קו ביטול נעילה או סיסמה</string> <!-- MOD stuff --> </resources> diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml index e074f29..947ea94 100644 --- a/res/values-ja/strings.xml +++ b/res/values-ja/strings.xml @@ -79,5 +79,10 @@ <string name="fingerprint_setup_add_fingerprint">指紋を追加</string> <string name="fingerprint_setup_screen_lock_setup">画面のロックをセットアップ</string> <string name="sim_locale_changed">%1$sのSIMを検出しました</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">スマートフォンの保護</string> + <string name="lockscreen_setup_summary"><b>この端末を保護</b>し、画面のロック解除にPIN、パターン、またはパスワードを必要とする</string> + <string name="lockscreen_setup_screen_lock_setup">PIN、パターン、またはパスワードの設定</string> <!-- MOD stuff --> </resources> diff --git a/res/values-kn-rIN/strings.xml b/res/values-kn-rIN/strings.xml index 06a2891..cc409f5 100644 --- a/res/values-kn-rIN/strings.xml +++ b/res/values-kn-rIN/strings.xml @@ -77,5 +77,10 @@ <string name="fingerprint_setup_add_fingerprint">ನಿಮ್ಮ ಫಿಂಗರ್ಪ್ರಿಂಟನ್ನು ಸೇರಿಸಿ</string> <string name="fingerprint_setup_screen_lock_setup">ಪರದೆ ಲಾಕ್ ಸೆಟಪ್ ಮಾಡಿ</string> <string name="sim_locale_changed">%1$s SIM ಗುರುತಿಸಲ್ಪಟ್ಟಿದೆ</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">ನಿಮ್ಮ ಫೋನನ್ನು ರಕ್ಷಿಸಿ</string> + <string name="lockscreen_setup_summary"><b>ಸಾಧನ ರಕ್ಷಿಸಿ</b>. ಸ್ಕ್ರೀನ್ ಅನ್ಲಾಕ್ ಮಾಡಲು ಪಿನ್, ಪ್ಯಾಟರ್ನ್, ಪಾಸ್ವರ್ಡ್ ಬೇಕಾಗುತ್ತದೆ</string> + <string name="lockscreen_setup_screen_lock_setup">ಪಿನ್, ನಮೂನೆ ಅಥವಾ ಪಾಸ್ವರ್ಡ್ ಹೊಂದಿಸಿ</string> <!-- MOD stuff --> </resources> diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml index 5756765..4560517 100644 --- a/res/values-ko/strings.xml +++ b/res/values-ko/strings.xml @@ -79,5 +79,10 @@ <string name="fingerprint_setup_add_fingerprint">지문 추가</string> <string name="fingerprint_setup_screen_lock_setup">화면 잠금 설정</string> <string name="sim_locale_changed">%1$s SIM 인식됨</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">휴대전화 보호</string> + <string name="lockscreen_setup_summary"><b>이 기기를 보호</b>하고 화면 잠금 해제용 PIN, 패턴 또는 비밀번호 요청</string> + <string name="lockscreen_setup_screen_lock_setup">PIN, 패턴 또는 비밀번호 설정하기</string> <!-- MOD stuff --> </resources> diff --git a/res/values-ml-rIN/strings.xml b/res/values-ml-rIN/strings.xml index e5d3527..1c62a9e 100644 --- a/res/values-ml-rIN/strings.xml +++ b/res/values-ml-rIN/strings.xml @@ -77,5 +77,10 @@ <string name="fingerprint_setup_add_fingerprint">നിങ്ങളുടെ വിരലടയാളം ചേർക്കുക</string> <string name="fingerprint_setup_screen_lock_setup">സ്ക്രീൻ ലോക്ക് സജ്ജമാക്കുക</string> <string name="sim_locale_changed">%1$s SIM കണ്ടെത്തി</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">നിങ്ങളുടെ ഫോൺ പരിരക്ഷിക്കുക</string> + <string name="lockscreen_setup_summary"><b>ഈ ഉപകരണം പരിരക്ഷിക്കുക</b>, സ്ക്രീൻ അൺലോക്കുചെയ്യാൻ പിൻ,പാറ്റേൺ അല്ലെങ്കിൽ പാസ്വേഡ് ആവശ്യമാണ്</string> + <string name="lockscreen_setup_screen_lock_setup">പിൻ, പാറ്റേൺ അല്ലെങ്കിൽ പാസ്വേഡ് സജ്ജമാക്കുക</string> <!-- MOD stuff --> </resources> diff --git a/res/values-mr-rIN/strings.xml b/res/values-mr-rIN/strings.xml index b580365..5ae6719 100644 --- a/res/values-mr-rIN/strings.xml +++ b/res/values-mr-rIN/strings.xml @@ -77,5 +77,10 @@ <string name="fingerprint_setup_add_fingerprint">तुमचा बोटाचा ठसा जोडा</string> <string name="fingerprint_setup_screen_lock_setup">स्क्रीन लॉक सेटअप करा</string> <string name="sim_locale_changed">%1$s सिम आढळले</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">आपला फोन संरक्षित करा</string> + <string name="lockscreen_setup_summary"><b>हे डिव्हाइस संरक्षित करा</b> आणि स्क्रीन अनलॉक करण्यासाठी पिन, नमुना किंवा संकेतशब्द आवश्यक आहे</string> + <string name="lockscreen_setup_screen_lock_setup">पिन, नमुना किंवा संकेतशब्द सेट करा</string> <!-- MOD stuff --> </resources> diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml index 5367a97..600c990 100644 --- a/res/values-nb/strings.xml +++ b/res/values-nb/strings.xml @@ -79,6 +79,11 @@ <string name="fingerprint_setup_add_fingerprint">Legge til fingeravtrykket ditt</string> <string name="fingerprint_setup_screen_lock_setup">Konfigurere skjermlås</string> <string name="sim_locale_changed">%1$s SIM oppdaget</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Beskytt telefonen</string> + <string name="lockscreen_setup_summary"><b>Beskytt denne enheten</b> og krev PIN-kode, mønster eller passord for å låse opp skjermen</string> + <string name="lockscreen_setup_screen_lock_setup">Konfigurer PIN-kode, mønster eller passord</string> <!-- MOD stuff --> <string name="mod_welcome">Enheten din er MOD Klargjort</string> <string name="mod_description">Mods gjør telefonen din raskere, smartere og enklere å bruke. I denne veiledningen, kan du oppdage nye mods, lære om hva de gjør, og aktivere eller deaktivere dem.</string> diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml index 8289efd..7dd698e 100644 --- a/res/values-nl/strings.xml +++ b/res/values-nl/strings.xml @@ -77,5 +77,10 @@ <string name="fingerprint_setup_add_fingerprint">Uw vingerafdruk toe te voegen</string> <string name="fingerprint_setup_screen_lock_setup">Schermvergrendeling in te stellen</string> <string name="sim_locale_changed">%1$s simkaart gedetecteerd</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Bescherm je telefoon</string> + <string name="lockscreen_setup_summary"><b>Bescherm dit apparaat</b> en vraag om een pincode, patroon of wachtwoord om het scherm te ontgrendelen</string> + <string name="lockscreen_setup_screen_lock_setup">Pincode, patroon of wachtwoord instellen</string> <!-- MOD stuff --> </resources> diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml index f6c0ab8..174eec4 100644 --- a/res/values-pl/strings.xml +++ b/res/values-pl/strings.xml @@ -78,5 +78,10 @@ <string name="fingerprint_setup_add_fingerprint">Dodać swój odcisk palca</string> <string name="fingerprint_setup_screen_lock_setup">Skonfigurować blokadę ekranu</string> <string name="sim_locale_changed">Wykryto %1$s SIM</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Zabezpiecz telefon</string> + <string name="lockscreen_setup_summary"><b>Zabezpiecz to urządzenie</b>, wymagając kodu PIN, wzoru lub hasła do odblokowania ekranu</string> + <string name="lockscreen_setup_screen_lock_setup">Ustaw PIN, wzorzec lub hasło</string> <!-- MOD stuff --> </resources> diff --git a/res/values-pt-rBR/strings.xml b/res/values-pt-rBR/strings.xml index 7f3205c..a27023c 100644 --- a/res/values-pt-rBR/strings.xml +++ b/res/values-pt-rBR/strings.xml @@ -79,6 +79,11 @@ <string name="fingerprint_setup_add_fingerprint">Adicionar sua impressão digital</string> <string name="fingerprint_setup_screen_lock_setup">Configuração de bloqueio de tela</string> <string name="sim_locale_changed">Cartão SIM %1$s detectado</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Proteger seu smartphone</string> + <string name="lockscreen_setup_summary"><b>Proteger este dispositivo</b> e pedir PIN, padrão ou senha para desbloquear a tela</string> + <string name="lockscreen_setup_screen_lock_setup">Configurar PIN, padrão ou senha</string> <!-- MOD stuff --> <string name="mod_welcome">Seu dispositivo esta pronto para MOD</string> <string name="mod_description">Mods deixa o seu telefone mais rápido, mais inteligente e mais fácil de usar. Neste guia, você pode descobrir novos mods, aprende o que eles fazem e os ativa ou desativa.</string> diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml index b0428ff..171b80d 100644 --- a/res/values-pt-rPT/strings.xml +++ b/res/values-pt-rPT/strings.xml @@ -79,6 +79,11 @@ <string name="fingerprint_setup_add_fingerprint">Adicionar a sua impressão digital</string> <string name="fingerprint_setup_screen_lock_setup">Configuração do ecrã de bloqueio</string> <string name="sim_locale_changed">Cartão SIM %1$s detetado</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Proteger o seu telemóvel</string> + <string name="lockscreen_setup_summary"><b>Proteja este disp.</b> e exija um PIN, seq. ou palavra-passe para desbloq. o ecrã</string> + <string name="lockscreen_setup_screen_lock_setup">Configurar PIN, sequência ou palavra-passe</string> <!-- MOD stuff --> <string name="mod_welcome">O seu dispositivo está pronto para os MODS</string> <string name="mod_description">Os Mods tornam o seu telefone mais rápido, mais inteligente e mais fácil de usar. Neste guia pode descobrir novos mods, aprender o que eles fazem e ativá-los ou desativá-los.</string> diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml index 39038d9..6a2ec9f 100644 --- a/res/values-ro/strings.xml +++ b/res/values-ro/strings.xml @@ -72,5 +72,10 @@ <string name="fingerprint_setup_add_fingerprint">Adăugați-vă amprenta</string> <string name="fingerprint_setup_screen_lock_setup">Setați blocarea de ecran</string> <string name="sim_locale_changed">SIM %1$s detectat</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Protejați telefonul</string> + <string name="lockscreen_setup_summary"><b>Protejați dispozitivul</b> cu PIN, model sau parolă necesară pt. a debloca ecranul</string> + <string name="lockscreen_setup_screen_lock_setup">Configurați codul PIN, modelul sau parola</string> <!-- MOD stuff --> </resources> diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index 2bda72c..0207be4 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -78,5 +78,10 @@ <string name="fingerprint_setup_add_fingerprint">Добавить ваши отпечатки</string> <string name="fingerprint_setup_screen_lock_setup">Настроить экран блокировки</string> <string name="sim_locale_changed">Обнаружена %1$s SIM-карта</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Защитите телефон</string> + <string name="lockscreen_setup_summary"><b>Защитить устройство</b> и запрашивать PIN-код, графический ключ или пароль</string> + <string name="lockscreen_setup_screen_lock_setup">Добавить PIN-код, графический ключ или пароль</string> <!-- MOD stuff --> </resources> diff --git a/res/values-sl/strings.xml b/res/values-sl/strings.xml index d592f57..8029e43 100644 --- a/res/values-sl/strings.xml +++ b/res/values-sl/strings.xml @@ -79,6 +79,11 @@ <string name="fingerprint_setup_add_fingerprint">Dodati svoj prstni odtis</string> <string name="fingerprint_setup_screen_lock_setup">Nastaviti zaklepanje zaslona</string> <string name="sim_locale_changed">%1$s kartica SIM zaznana</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Zaščitite telefon</string> + <string name="lockscreen_setup_summary"><b>Zaščiti napravo</b> in za odklenitev zaslona zahtevaj kodo PIN, vzorec ali geslo</string> + <string name="lockscreen_setup_screen_lock_setup">Nastavi kodo PIN, vzorec ali geslo</string> <!-- MOD stuff --> <string name="mod_welcome">Vaša naprava je pripravljena za modifikacije</string> <string name="mod_description">Modifikacije naredijo vaš telefon hitrejši, pametnejši in enostavnejši za uporabo. V tem vodniku lahko odkrijete nove modifikacije, se naučite, kaj naredijo, in jih omogočite ali onemogočite.</string> diff --git a/res/values-sr/strings.xml b/res/values-sr/strings.xml index 6a7fc7a..07b03e5 100644 --- a/res/values-sr/strings.xml +++ b/res/values-sr/strings.xml @@ -78,5 +78,10 @@ <string name="fingerprint_setup_add_fingerprint">Додај свој отисак</string> <string name="fingerprint_setup_screen_lock_setup">Подешавање закључавања екрана</string> <string name="sim_locale_changed">Откривен %1$s SIM</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Заштитите телефон</string> + <string name="lockscreen_setup_summary"><b>Заштитите уређај</b> и поставите PIN, шаблон или лозинку за откључавање екрана</string> + <string name="lockscreen_setup_screen_lock_setup">Подеси PIN, шаблон или лозинку</string> <!-- MOD stuff --> </resources> diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml index 9c5f30c..618ab36 100644 --- a/res/values-sv/strings.xml +++ b/res/values-sv/strings.xml @@ -77,5 +77,10 @@ <string name="fingerprint_setup_add_fingerprint">Lägga till ditt fingeravtryck</string> <string name="fingerprint_setup_screen_lock_setup">Konfigurera skärmlås</string> <string name="sim_locale_changed">%1$s SIM upptäckt</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Skydda mobilen</string> + <string name="lockscreen_setup_summary"><b>Skydda den här enheten</b> och kräv pinkod, mönster eller lösenord för att låsa upp skärmen</string> + <string name="lockscreen_setup_screen_lock_setup">Konfigurera pinkod, mönster eller lösenord</string> <!-- MOD stuff --> </resources> diff --git a/res/values-ta-rIN/strings.xml b/res/values-ta-rIN/strings.xml index 0a626ef..4c32688 100644 --- a/res/values-ta-rIN/strings.xml +++ b/res/values-ta-rIN/strings.xml @@ -77,5 +77,10 @@ <string name="fingerprint_setup_add_fingerprint">கைரேகையைச் சேர்க்கவும்</string> <string name="fingerprint_setup_screen_lock_setup">திரைப் பூட்டை அமை</string> <string name="sim_locale_changed">%1$s SIM கண்டறியப்பட்டது.</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">மொபைலைப் பாதுகாக்கவும்</string> + <string name="lockscreen_setup_summary">திரையை திறக்க பின், வடிவம் அல்லது கடவுச்சொல் கேட்கும்படி அமைத்து, <b>சாதனத்தைப் பாதுகாக்கலாம்</b></string> + <string name="lockscreen_setup_screen_lock_setup">பின், வடிவம் அல்லது கடவுச்சொல்லை அமை</string> <!-- MOD stuff --> </resources> diff --git a/res/values-te-rIN/strings.xml b/res/values-te-rIN/strings.xml index e3a05c6..a49a9a8 100644 --- a/res/values-te-rIN/strings.xml +++ b/res/values-te-rIN/strings.xml @@ -77,5 +77,10 @@ <string name="fingerprint_setup_add_fingerprint">మీ వేలిముద్రను జోడించండి</string> <string name="fingerprint_setup_screen_lock_setup">సెటప్ స్క్రీన్ లాక్</string> <string name="sim_locale_changed">%1$s SIM కనుగొనబడింది</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">మీ ఫోన్ను రక్షించుకోండి</string> + <string name="lockscreen_setup_summary"><b>ఈ పరికరాన్ని రక్షించండి</b> మరియు స్క్రీన్ను అన్లాక్ చేయడానికి PIN, నమూనా లేదా పాస్వర్డ్ అవసరమయ్యేలా ఏర్పాటు చేయండి</string> + <string name="lockscreen_setup_screen_lock_setup">PIN, నమూనా లేదా పాస్వర్డ్ను సెటప్ చేయి</string> <!-- MOD stuff --> </resources> diff --git a/res/values-th/strings.xml b/res/values-th/strings.xml index 5241b1e..272b0a9 100644 --- a/res/values-th/strings.xml +++ b/res/values-th/strings.xml @@ -78,5 +78,10 @@ <string name="fingerprint_setup_add_fingerprint">เพิ่มลายนิ้วมือของคุณ</string> <string name="fingerprint_setup_screen_lock_setup">ตั้งค่าการล็อคหน้าจอ</string> <string name="sim_locale_changed">ตรวจพบซิม %1$s</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">ปกป้องโทรศัพท์ของคุณ</string> + <string name="lockscreen_setup_summary"><b>ปกป้องอุปกรณ์นี้</b>และกำหนดให้มีการใช้ PIN, รูปแบบ หรือรหัสผ่านเพื่อปลดล็อกหน้าจอ</string> + <string name="lockscreen_setup_screen_lock_setup">ตั้งค่า PIN, รูปแบบ หรือรหัสผ่าน</string> <!-- MOD stuff --> </resources> diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml index cedc935..e9de04d 100644 --- a/res/values-tr/strings.xml +++ b/res/values-tr/strings.xml @@ -78,5 +78,10 @@ <string name="fingerprint_setup_add_fingerprint">Parmak izinizi ekleyin</string> <string name="fingerprint_setup_screen_lock_setup">Ekran kilidini kurun</string> <string name="sim_locale_changed">%1$s SIM tespit edildi</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Telefonunuzu koruyun</string> + <string name="lockscreen_setup_summary"><b>Bu cihazı koruyun</b> ve ekran kilidini açmak için bir PIN, desen ya da şifreyi gerekli kılın.</string> + <string name="lockscreen_setup_screen_lock_setup">PIN, desen veya şifre ayarla</string> <!-- MOD stuff --> </resources> diff --git a/res/values-vi/strings.xml b/res/values-vi/strings.xml index 85f42f0..6688e1f 100644 --- a/res/values-vi/strings.xml +++ b/res/values-vi/strings.xml @@ -78,5 +78,10 @@ <string name="fingerprint_setup_add_fingerprint">Thêm vân tay của bạn</string> <string name="fingerprint_setup_screen_lock_setup">Thiết lập khóa màn hình</string> <string name="sim_locale_changed">Đã phát hiện %1$s SIM</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">Bảo vệ điện thoại của bạn</string> + <string name="lockscreen_setup_summary"><b>Bảo vệ thiết bị này</b> và yêu cầu mã PIN, hình hoặc mật khẩu để mở khóa màn hình</string> + <string name="lockscreen_setup_screen_lock_setup">Thiết lập mã PIN, hình hoặc mật khẩu</string> <!-- MOD stuff --> </resources> diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index 7883355..b4dbd4a 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -79,6 +79,11 @@ <string name="fingerprint_setup_add_fingerprint">添加您的指纹</string> <string name="fingerprint_setup_screen_lock_setup">设置屏幕锁定</string> <string name="sim_locale_changed">检测到 %1$s SIM 卡</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">为您的手机启用保护功能</string> + <string name="lockscreen_setup_summary"><b>为此设备启用保护功能</b>,并要求输入 PIN 码、图案或密码才能解锁屏幕</string> + <string name="lockscreen_setup_screen_lock_setup">设置 PIN、图案或密码</string> <!-- MOD stuff --> <string name="mod_welcome">您的设备已经准备好使用模块</string> <string name="mod_description">模块使您的手机更快、更智能并且更容易使用。在此指南中,您可以探索新的模块,学习它们做些什么,以及启用或禁用它们。</string> diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml index 7b43a40..3ba79c1 100644 --- a/res/values-zh-rTW/strings.xml +++ b/res/values-zh-rTW/strings.xml @@ -70,5 +70,10 @@ <string name="fingerprint_setup_add_fingerprint">新增你的指紋感應</string> <string name="fingerprint_setup_screen_lock_setup">設置螢幕鎖定</string> <string name="sim_locale_changed">檢測到 %1$s 張 SIM 卡</string> + + <!-- secure lock screen --> + <string name="lockscreen_setup_title">保護您的手機</string> + <string name="lockscreen_setup_summary"><b>保護這個裝置</b>,並要求使用 PIN、解鎖圖形或密碼解除螢幕鎖定</string> + <string name="lockscreen_setup_screen_lock_setup">設定 PIN、解鎖圖形或密碼</string> <!-- MOD stuff --> </resources> diff --git a/res/values/strings.xml b/res/values/strings.xml index 80b8e2d..47d72e5 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -97,8 +97,16 @@ <string name="fingerprint_setup_screen_lock_setup">Setup screen lock</string> <string name="sim_locale_changed">%1$s SIM detected</string> + <!-- secure lock screen --> + <string name="settings_lockscreen_setup_title">Select screen lock type</string> + <string name="settings_lockscreen_setup_details">How would you like to lock your screen?</string> + <string name="lockscreen_setup_title">Protect your phone</string> + <string name="lockscreen_setup_summary"><b>Protect this device</b> and require a PIN, pattern, or password to unlock the screen</string> + <string name="lockscreen_setup_screen_lock_setup">Set up PIN, pattern or password</string> + <!-- MOD stuff --> <string name="mod_welcome">Your device is MOD Ready</string> <string name="mod_description">Mods make your phone faster, smarter, and easier to use. In this guide, you can discover new mods, learn what they do, and enable or disable them.</string> <string name="mod_explore">Explore MOD Guide</string> + </resources> diff --git a/src/com/cyanogenmod/setupwizard/SetupWizardApp.java b/src/com/cyanogenmod/setupwizard/SetupWizardApp.java index e278821..a327b38 100644 --- a/src/com/cyanogenmod/setupwizard/SetupWizardApp.java +++ b/src/com/cyanogenmod/setupwizard/SetupWizardApp.java @@ -43,6 +43,7 @@ public class SetupWizardApp extends Application { public static final String ACTION_VIEW_LEGAL = "cyanogenmod.intent.action.LEGALESE"; public static final String ACTION_SETUP_FINGERPRINT = "android.settings.FINGERPRINT_SETUP"; + public static final String ACTION_SETUP_LOCKSCREEN = "com.android.settings.SETUP_LOCK_SCREEN"; public static final String EXTRA_FIRST_RUN = "firstRun"; public static final String EXTRA_ALLOW_SKIP = "allowSkip"; @@ -76,6 +77,7 @@ public class SetupWizardApp extends Application { public static final int REQUEST_CODE_UNLOCK = 6; public static final int REQUEST_CODE_SETUP_FINGERPRINT = 7; public static final int REQUEST_CODE_VENDOR_SETUP_GMS = 8; + public static final int REQUEST_CODE_SETUP_LOCKSCREEN = 9; public static final int RADIO_READY_TIMEOUT = 10 * 1000; diff --git a/src/com/cyanogenmod/setupwizard/cmstats/SetupStats.java b/src/com/cyanogenmod/setupwizard/cmstats/SetupStats.java index 6eb527f..f3a47b3 100644 --- a/src/com/cyanogenmod/setupwizard/cmstats/SetupStats.java +++ b/src/com/cyanogenmod/setupwizard/cmstats/SetupStats.java @@ -157,6 +157,7 @@ public class SetupStats { public static final String SLOT = "slot"; public static final String TOTAL_TIME = "total_time"; public static final String FINGERPRINT_SETUP = "fingerprint_setup"; + public static final String LOCKSCREEN_SETUP = "lockscreen_setup"; } } diff --git a/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java b/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java index 86cabd4..03f4ffd 100644 --- a/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java +++ b/src/com/cyanogenmod/setupwizard/setup/CMSetupWizardData.java @@ -75,6 +75,8 @@ public class CMSetupWizardData extends AbstractSetupData { } if (SetupWizardUtils.hasFingerprint(mContext) && SetupWizardUtils.isOwner()) { pages.add(new FingerprintSetupPage(mContext, this)); + } else if (SetupWizardUtils.frpEnabled(mContext)) { + pages.add(new ScreenLockSetupPage(mContext, this)); } pages.add(new CyanogenSettingsPage(mContext, this)); pages.add(new OtherSettingsPage(mContext, this).setHidden(!hasGMS)); diff --git a/src/com/cyanogenmod/setupwizard/setup/ScreenLockSetupPage.java b/src/com/cyanogenmod/setupwizard/setup/ScreenLockSetupPage.java new file mode 100644 index 0000000..3c9da33 --- /dev/null +++ b/src/com/cyanogenmod/setupwizard/setup/ScreenLockSetupPage.java @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2013 The CyanogenMod Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.cyanogenmod.setupwizard.setup; + +import android.app.Activity; +import android.app.ActivityOptions; +import android.app.Fragment; +import android.app.FragmentManager; +import android.content.Context; +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.TextView; +import com.cyanogenmod.setupwizard.R; +import com.cyanogenmod.setupwizard.SetupWizardApp; +import com.cyanogenmod.setupwizard.cmstats.SetupStats; +import com.cyanogenmod.setupwizard.ui.SetupPageFragment; + +public class ScreenLockSetupPage extends SetupPage { + + private static final String TAG = "ScreenLockSetupPage"; + + public ScreenLockSetupPage(Context context, SetupDataCallbacks callbacks) { + super(context, callbacks); + } + + @Override + public Fragment getFragment(FragmentManager fragmentManager, int action) { + Fragment fragment = fragmentManager.findFragmentByTag(getKey()); + if (fragment == null) { + Bundle args = new Bundle(); + args.putString(Page.KEY_PAGE_ARGUMENT, getKey()); + args.putInt(Page.KEY_PAGE_ACTION, action); + fragment = new LockscreenSetupFragment(); + fragment.setArguments(args); + } + return fragment; + } + + @Override + public int getNextButtonTitleResId() { + return R.string.skip; + } + + @Override + public String getKey() { + return TAG; + } + + @Override + public int getTitleResId() { + return R.string.lockscreen_setup_title; + } + + @Override + public boolean onActivityResult(int requestCode, int resultCode, Intent data) { + if (SetupWizardApp.REQUEST_CODE_SETUP_LOCKSCREEN == requestCode) { + if (resultCode == Activity.RESULT_OK || resultCode == Activity.RESULT_FIRST_USER) { + getCallbacks().onNextPage(); + } + } + return true; + } + + public static class LockscreenSetupFragment extends SetupPageFragment { + + private TextView mSetupLockscreen; + + @Override + protected void initializePage() { + mSetupLockscreen = (TextView) mRootView.findViewById(R.id.setup_lockscreen); + mSetupLockscreen.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + launchLockscreenSetup(); + } + }); + } + + @Override + protected int getLayoutResource() { + return R.layout.setup_lockscreen; + } + + private void launchLockscreenSetup() { + Intent intent = new Intent(SetupWizardApp.ACTION_SETUP_LOCKSCREEN); + intent.putExtra(SetupWizardApp.EXTRA_TITLE, + getString(R.string.settings_lockscreen_setup_title)); + intent.putExtra(SetupWizardApp.EXTRA_DETAILS, + getString(R.string.settings_lockscreen_setup_details)); + ActivityOptions options = + ActivityOptions.makeCustomAnimation(getActivity(), + android.R.anim.fade_in, + android.R.anim.fade_out); + SetupStats.addEvent(SetupStats.Categories.EXTERNAL_PAGE_LOAD, + SetupStats.Action.EXTERNAL_PAGE_LAUNCH, + SetupStats.Label.PAGE, SetupStats.Label.LOCKSCREEN_SETUP); + startActivityForResult(intent, SetupWizardApp.REQUEST_CODE_SETUP_LOCKSCREEN, + options.toBundle()); + } + } +} |