Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions core/java/android/security/trickystore/TrickyStoreService.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public class TrickyStoreService {

private volatile Boolean mTeeBroken = null;
private volatile long mLastRevocationCheckMs = 0L;
private volatile long mLastTargetsRefreshMs = 0L;
private static final long TARGETS_REFRESH_COOLDOWN_MS = 5_000L;
private static final long REVOCATION_CHECK_COOLDOWN_MS = 24 * 60 * 60 * 1000L;
private volatile CustomPatchLevel mCustomPatchLevel = null;
private volatile String mLastKeyboxFingerprint = null;
Expand Down Expand Up @@ -461,7 +463,7 @@ private boolean checkTeeBroken() {

public boolean needHack(int callingUid, String[] packages) {
if (packages == null) return false;
refreshTargets();
maybeRefreshTargets();
ensureTeeStatus();
for (String pkg : packages) {
Mode mode = mPackageModes.get(pkg);
Expand All @@ -473,7 +475,7 @@ public boolean needHack(int callingUid, String[] packages) {

public boolean needGenerate(int callingUid, String[] packages) {
if (packages == null) return false;
refreshTargets();
maybeRefreshTargets();
ensureTeeStatus();
for (String pkg : packages) {
Mode mode = mPackageModes.get(pkg);
Expand All @@ -483,6 +485,14 @@ public boolean needGenerate(int callingUid, String[] packages) {
return false;
}

private void maybeRefreshTargets() {
long now = System.currentTimeMillis();
if (now - mLastTargetsRefreshMs >= TARGETS_REFRESH_COOLDOWN_MS) {
mLastTargetsRefreshMs = now;
refreshTargets();
}
}

public KeyBoxManager getKeyBoxManager() {
refreshKeyBox();
return mKeyBoxManager;
Expand Down
8 changes: 6 additions & 2 deletions core/res/res/values-ar-rSA/cr_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<string name="aerr_copy">نسخ رابط سجل العُطل</string>
<string name="url_copy_success">تم نسخ الرابط بنجاح</string>
<string name="url_copy_failed">حدث خطأ أثناء نسخ رابط السجل</string>
<!-- Lock gesture -->
<string name="gesture_locked_warning">مرر مجدداً لفتح الإيماءات</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added">أضيفت <xliff:g id="name" example="MyApp">%s</xliff:g> إلى GameSpace</string>
<!-- App lock -->
<string name="unlock_application">افتح <xliff:g id="label" example="Telegram">%1$s</xliff:g></string>
<!-- Pocket Lock -->
<string name="pocket_mode_title">وضع الجيب نشط</string>
<string name="pocket_mode_illustration_description">رسم توضيحي للهاتف في الجيب</string>
Expand All @@ -16,6 +22,4 @@
<string name="pocket_mode_instruction_step2">2. اضغط مع الاستمرار على زر الطاقة للخروج من وضع الجيب.</string>
<!-- Cycle through ringer modes -->
<string name="volume_dialog_ringer_guidance_normal">المكالمات والإشعارات ستصدر رنيناً</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added">أضيفت <xliff:g id="name" example="MyApp">%s</xliff:g> إلى GameSpace</string>
</resources>
8 changes: 6 additions & 2 deletions core/res/res/values-az-rAZ/cr_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<string name="aerr_copy">Çökmə jurnal URL-sini kopyala</string>
<string name="url_copy_success">URL uğurla kopyalandı</string>
<string name="url_copy_failed">An error occured while uploading the log to Pasty</string>
<!-- Lock gesture -->
<string name="gesture_locked_warning">Swipe again to unlock gestures</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> added to GameSpace</string>
<!-- App lock -->
<string name="unlock_application">Unlock <xliff:g id="label" example="Telegram">%1$s</xliff:g></string>
<!-- Pocket Lock -->
<string name="pocket_mode_title">Pocket mode is active</string>
<string name="pocket_mode_illustration_description">Illustration of phone in pocket</string>
Expand All @@ -16,6 +22,4 @@
<string name="pocket_mode_instruction_step2">2. Press and hold the power button to exit pocket mode.</string>
<!-- Cycle through ringer modes -->
<string name="volume_dialog_ringer_guidance_normal">Calls and notifications will ring</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> added to GameSpace</string>
</resources>
8 changes: 6 additions & 2 deletions core/res/res/values-be-rBY/cr_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<string name="aerr_copy">Капіяваць спасылку журнала памылкі</string>
<string name="url_copy_success">Спасылка паспяхова скапіявана</string>
<string name="url_copy_failed">Адбылася памылка падчас загрузкі лога на Pasty</string>
<!-- Lock gesture -->
<string name="gesture_locked_warning">Правядзіце яшчэ раз, каб разблакіраваць жэсты</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> added to GameSpace</string>
<!-- App lock -->
<string name="unlock_application">Разблакіраваць <xliff:g id="label" example="Telegram">%1$s</xliff:g></string>
<!-- Pocket Lock -->
<string name="pocket_mode_title">Рэжым \"У кішэні\" уключаны</string>
<string name="pocket_mode_illustration_description">Ілюстрацыя тэлефона ў кішэні</string>
Expand All @@ -16,6 +22,4 @@
<string name="pocket_mode_instruction_step2">2. Каб выйсці з кішэннага рэжыму, націсніце і ўтрымлівайце кнопку сілкавання.</string>
<!-- Cycle through ringer modes -->
<string name="volume_dialog_ringer_guidance_normal">Calls and notifications will ring</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> added to GameSpace</string>
</resources>
8 changes: 6 additions & 2 deletions core/res/res/values-bg-rBG/cr_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<string name="aerr_copy">Копиране на URL адреса на регистъра за сривове</string>
<string name="url_copy_success">URL aдресът е копиран успешно</string>
<string name="url_copy_failed">Възникна грешка при качването на лога в Pasty</string>
<!-- Lock gesture -->
<string name="gesture_locked_warning">Плъзни отново да отключиш жестове</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> е добавен към GameSpace</string>
<!-- App lock -->
<string name="unlock_application">Отключи <xliff:g id="label" example="Telegram">%1$s</xliff:g></string>
<!-- Pocket Lock -->
<string name="pocket_mode_title">Джобен режим е активен</string>
<string name="pocket_mode_illustration_description">Илюстрация на телефон в джоб</string>
Expand All @@ -16,6 +22,4 @@
<string name="pocket_mode_instruction_step2">2. Натисни и задържи копчето за захранване да излезеш от джобния режим.</string>
<!-- Cycle through ringer modes -->
<string name="volume_dialog_ringer_guidance_normal">Повиквания и известия ще звънят</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> е добавен към GameSpace</string>
</resources>
8 changes: 6 additions & 2 deletions core/res/res/values-ca-rES/cr_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<string name="aerr_copy">Copiar URL del registre d\'errors</string>
<string name="url_copy_success">URL copiada amb èxit</string>
<string name="url_copy_failed">Hi ha hagut un error mentre es carregava el registre a Pasty</string>
<!-- Lock gesture -->
<string name="gesture_locked_warning">Swipe again to unlock gestures</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> added to GameSpace</string>
<!-- App lock -->
<string name="unlock_application">Desbloqueja <xliff:g id="label" example="Telegram">%1$s</xliff:g></string>
<!-- Pocket Lock -->
<string name="pocket_mode_title">Pocket mode is active</string>
<string name="pocket_mode_illustration_description">Illustration of phone in pocket</string>
Expand All @@ -16,6 +22,4 @@
<string name="pocket_mode_instruction_step2">2. Press and hold the power button to exit pocket mode.</string>
<!-- Cycle through ringer modes -->
<string name="volume_dialog_ringer_guidance_normal">Calls and notifications will ring</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> added to GameSpace</string>
</resources>
8 changes: 6 additions & 2 deletions core/res/res/values-cs-rCZ/cr_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<string name="aerr_copy">Kopírovat URL protokolu o\u00a0selhání</string>
<string name="url_copy_success">URL byla úspěšně zkopírována</string>
<string name="url_copy_failed">Při nahrávání protokolu o\u00a0selhání na Pasty došlo k\u00a0chybě</string>
<!-- Lock gesture -->
<string name="gesture_locked_warning">Opětovným přejetím odemknete gesta</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added">Aplikace <xliff:g id="name" example="MyApp">%s</xliff:g> byla přidána do GameSpace</string>
<!-- App lock -->
<string name="unlock_application">Odemknout <xliff:g id="label" example="Telegram">%1$s</xliff:g></string>
<!-- Pocket Lock -->
<string name="pocket_mode_title">Režim v kapse je aktivní</string>
<string name="pocket_mode_illustration_description">Ilustrace telefonu v kapse</string>
Expand All @@ -16,6 +22,4 @@
<string name="pocket_mode_instruction_step2">2. Chcete-li ukončit režim v kapse, stiskněte a podržte tlačítko napájení.</string>
<!-- Cycle through ringer modes -->
<string name="volume_dialog_ringer_guidance_normal">Volání a oznámení budou vyzvánět</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added">Aplikace <xliff:g id="name" example="MyApp">%s</xliff:g> byla přidána do GameSpace</string>
</resources>
8 changes: 6 additions & 2 deletions core/res/res/values-de-rDE/cr_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<string name="aerr_copy">URL des Absturzberichts kopieren</string>
<string name="url_copy_success">URL erfolgreich kopiert</string>
<string name="url_copy_failed">Beim Hochladen des Absturzberichts zu Pasty ist ein Fehler aufgetreten</string>
<!-- Lock gesture -->
<string name="gesture_locked_warning">Erneut wischen, um Gesten zu verwenden</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> wurde dem Spielmodus hinzugefügt</string>
<!-- App lock -->
<string name="unlock_application"><xliff:g id="label" example="Telegram">%1$s</xliff:g> entsperren</string>
<!-- Pocket Lock -->
<string name="pocket_mode_title">Taschenmodus aktiv</string>
<string name="pocket_mode_illustration_description">Abbildung des Telefons in der Tasche</string>
Expand All @@ -16,6 +22,4 @@
<string name="pocket_mode_instruction_step2">2. Ein-/Austaste gedrückt halten zum Beenden des Taschenmodus.</string>
<!-- Cycle through ringer modes -->
<string name="volume_dialog_ringer_guidance_normal">Bei Anrufen und Benachrichtigungen klingeln</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> wurde dem Spielmodus hinzugefügt</string>
</resources>
8 changes: 6 additions & 2 deletions core/res/res/values-el-rGR/cr_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<string name="aerr_copy">Αντιγραφή διεύθυνσης URL σφάλματος</string>
<string name="url_copy_success">Το URL αντιγράφηκε με επιτυχία</string>
<string name="url_copy_failed">Παρουσιάστηκε σφάλμα κατά τη μεταφόρτωση του αρχείου καταγραφής στο Pasty</string>
<!-- Lock gesture -->
<string name="gesture_locked_warning">Σύρετε ξανά για να ξεκλειδώσετε τις χειρονομίες</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> προστέθηκε στο Χώρο Παιχνιδιού</string>
<!-- App lock -->
<string name="unlock_application">Ξεκλείδωμα <xliff:g id="label" example="Telegram">%1$s</xliff:g></string>
<!-- Pocket Lock -->
<string name="pocket_mode_title">Η λειτουργία τσέπης είναι ενεργή</string>
<string name="pocket_mode_illustration_description">Απεικόνιση του τηλεφώνου στην τσέπη</string>
Expand All @@ -16,6 +22,4 @@
<string name="pocket_mode_instruction_step2">2. Πατήστε και κρατήστε πατημένο το κουμπί τροφοδοσίας για να βγείτε από τη λειτουργία τσέπης.</string>
<!-- Cycle through ringer modes -->
<string name="volume_dialog_ringer_guidance_normal">Οι κλήσεις και οι ειδοποιήσεις θα ηχούν</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> προστέθηκε στο Χώρο Παιχνιδιού</string>
</resources>
8 changes: 6 additions & 2 deletions core/res/res/values-es-rES/cr_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<string name="aerr_copy">Copiar URL del registro de errores</string>
<string name="url_copy_success">URL copiada satisfactoriamente</string>
<string name="url_copy_failed">Se ha producido un error cargando el registro a Pasty</string>
<!-- Lock gesture -->
<string name="gesture_locked_warning">Desliza nuevamente para desbloquear los gestos</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> añadido a Espacio de Juego</string>
<!-- App lock -->
<string name="unlock_application">Desbloquear <xliff:g id="label" example="Telegram">%1$s</xliff:g></string>
<!-- Pocket Lock -->
<string name="pocket_mode_title">Modo juego activado</string>
<string name="pocket_mode_illustration_description">Ilustración del teléfono en el bolsillo</string>
Expand All @@ -16,6 +22,4 @@
<string name="pocket_mode_instruction_step2">2. Presiona y mantén el botón de encendido para salir del modo bolsillo.</string>
<!-- Cycle through ringer modes -->
<string name="volume_dialog_ringer_guidance_normal">Sonarán las llamadas y las notificaciones</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> añadido a Espacio de Juego</string>
</resources>
8 changes: 6 additions & 2 deletions core/res/res/values-et-rEE/cr_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<string name="aerr_copy">Kopeeri rikke logi URL</string>
<string name="url_copy_success">URL kopeeritud</string>
<string name="url_copy_failed">Logi Pasty\'sse üleslaadimisel esines viga</string>
<!-- Lock gesture -->
<string name="gesture_locked_warning">Liigutuste avamiseks pühkige uuesti</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> added to GameSpace</string>
<!-- App lock -->
<string name="unlock_application">Lukusta <xliff:g id="label" example="Telegram">%1$s</xliff:g> lahti</string>
<!-- Pocket Lock -->
<string name="pocket_mode_title">Taskurežiim on sees</string>
<string name="pocket_mode_illustration_description">Taskus oleva telefoni illustratsioon</string>
Expand All @@ -16,6 +22,4 @@
<string name="pocket_mode_instruction_step2">2. Vajuta ja hoia toitenuppu, et väljuda tasku režiimist.</string>
<!-- Cycle through ringer modes -->
<string name="volume_dialog_ringer_guidance_normal">Calls and notifications will ring</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> added to GameSpace</string>
</resources>
8 changes: 6 additions & 2 deletions core/res/res/values-fa-rIR/cr_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<string name="aerr_copy">کپی کردن آدرس گزارش خرابی</string>
<string name="url_copy_success">آدرس با موفقیت کپی شد</string>
<string name="url_copy_failed">هنگام بارگزاری گزارش در Pasty خطایی روی داد</string>
<!-- Lock gesture -->
<string name="gesture_locked_warning">با کشیدن دوباره، حرکات را فعال کنید</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> به فضای بازی اضافه شد</string>
<!-- App lock -->
<string name="unlock_application">بازگشایی <xliff:g id="label" example="Telegram">%1$s</xliff:g></string>
<!-- Pocket Lock -->
<string name="pocket_mode_title">حالت جیب فعال است</string>
<string name="pocket_mode_illustration_description">تصویر گوشی در جیب</string>
Expand All @@ -16,6 +22,4 @@
<string name="pocket_mode_instruction_step2">2. دکمه پاور را فشار داده و نگه دارید تا از حالت جیبی خارج شوید.</string>
<!-- Cycle through ringer modes -->
<string name="volume_dialog_ringer_guidance_normal">تماس‌ها و اعلان‌ها زنگ خواهند خورد</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> به فضای بازی اضافه شد</string>
</resources>
8 changes: 6 additions & 2 deletions core/res/res/values-fi-rFI/cr_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<string name="aerr_copy">Kopioi kaatumislokin URL-osoite</string>
<string name="url_copy_success">URL-osoite kopioitu onnistuneesti</string>
<string name="url_copy_failed">Virhe ladatessa lokia Pasty-palvelimelle</string>
<!-- Lock gesture -->
<string name="gesture_locked_warning">Swipe again to unlock gestures</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> added to GameSpace</string>
<!-- App lock -->
<string name="unlock_application">Avaa <xliff:g id="label" example="Telegram">%1$s</xliff:g></string>
<!-- Pocket Lock -->
<string name="pocket_mode_title">Pocket mode is active</string>
<string name="pocket_mode_illustration_description">Illustration of phone in pocket</string>
Expand All @@ -16,6 +22,4 @@
<string name="pocket_mode_instruction_step2">2. Press and hold the power button to exit pocket mode.</string>
<!-- Cycle through ringer modes -->
<string name="volume_dialog_ringer_guidance_normal">Calls and notifications will ring</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> added to GameSpace</string>
</resources>
8 changes: 6 additions & 2 deletions core/res/res/values-fr-rFR/cr_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<string name="aerr_copy">Copier l\'URL du rapport d\'erreur</string>
<string name="url_copy_success">URL copiée avec succès</string>
<string name="url_copy_failed">Une erreur est survenue pendant l\'envoi du rapport</string>
<!-- Lock gesture -->
<string name="gesture_locked_warning">Balayez à nouveau pour déverrouiller les gestes</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> ajouté au mode immersif</string>
<!-- App lock -->
<string name="unlock_application">Déverrouiller <xliff:g id="label" example="Telegram">%1$s</xliff:g></string>
<!-- Pocket Lock -->
<string name="pocket_mode_title">Le mode poche est activé</string>
<string name="pocket_mode_illustration_description">Illustration d\'un téléphone dans une poche</string>
Expand All @@ -16,6 +22,4 @@
<string name="pocket_mode_instruction_step2">2. Appuyez et maintenez le bouton d\'alimentation pour sortir du mode poche.</string>
<!-- Cycle through ringer modes -->
<string name="volume_dialog_ringer_guidance_normal">Les appels et les notifications sonnent</string>
<!-- GameSpace -->
<string name="gamespace_new_game_added"><xliff:g id="name" example="MyApp">%s</xliff:g> ajouté au mode immersif</string>
</resources>
Loading