update wipe on inactivity scheduler

This commit is contained in:
lucky 2022-06-28 12:32:14 +03:00
parent 4e8737e50e
commit 16b79689c6
22 changed files with 72 additions and 134 deletions

View File

@ -10,8 +10,8 @@ android {
applicationId "me.lucky.wasted"
minSdk 23
targetSdk 32
versionCode 26
versionName "1.4.1"
versionCode 27
versionName "1.4.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View File

@ -30,8 +30,6 @@
<receiver
android:name=".DeviceAdminReceiver"
android:label="@string/device_admin_label"
android:description="@string/device_admin_description"
android:permission="android.permission.BIND_DEVICE_ADMIN"
android:exported="true">
<meta-data android:name="android.app.device_admin"
@ -104,14 +102,12 @@
<service
android:name=".WipeJobService"
android:exported="true"
android:description="@string/wipe_job_description"
android:permission="android.permission.BIND_JOB_SERVICE">
</service>
<service
android:name=".ForegroundService"
android:exported="false"
android:description="@string/foreground_service_description">
android:exported="false">
</service>
<receiver
@ -126,8 +122,6 @@
<service
android:name=".NotificationListenerService"
android:label="@string/notification_listener_service_label"
android:description="@string/notification_listener_service_description"
android:enabled="false"
android:exported="true"
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">

View File

@ -42,8 +42,4 @@ class DeviceAdminManager(private val ctx: Context) {
fun makeRequestIntent() =
Intent(DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN)
.putExtra(DevicePolicyManager.EXTRA_DEVICE_ADMIN, deviceAdmin)
.putExtra(
DevicePolicyManager.EXTRA_ADD_EXPLANATION,
ctx.getString(R.string.device_admin_description),
)
}

View File

@ -15,7 +15,7 @@ class ForegroundService : Service() {
private const val NOTIFICATION_ID = 1000
}
private val unlockReceiver = UnlockReceiver()
private val lockReceiver = LockReceiver()
override fun onCreate() {
super.onCreate()
@ -28,11 +28,14 @@ class ForegroundService : Service() {
}
private fun init() {
registerReceiver(unlockReceiver, IntentFilter(Intent.ACTION_USER_PRESENT))
registerReceiver(lockReceiver, IntentFilter().apply {
addAction(Intent.ACTION_USER_PRESENT)
addAction(Intent.ACTION_SCREEN_OFF)
})
}
private fun deinit() {
unregisterReceiver(unlockReceiver)
unregisterReceiver(lockReceiver)
}
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
@ -52,12 +55,24 @@ class ForegroundService : Service() {
return null
}
private class UnlockReceiver : BroadcastReceiver() {
private class LockReceiver : BroadcastReceiver() {
private var unlocked = false
override fun onReceive(context: Context?, intent: Intent?) {
if (intent?.action != Intent.ACTION_USER_PRESENT ||
context?.getSystemService(KeyguardManager::class.java)?.isDeviceSecure != true ||
!Preferences(context).isWipeOnInactivity) return
Thread(Runner(context, goAsync())).start()
if (!Preferences(context ?: return).isWipeOnInactivity) return
when (intent?.action) {
Intent.ACTION_USER_PRESENT -> {
if (context.getSystemService(KeyguardManager::class.java)
?.isDeviceSecure != true) return
unlocked = true
WipeJobManager(context).cancel()
}
Intent.ACTION_SCREEN_OFF -> {
if (!unlocked) return
unlocked = false
Thread(Runner(context, goAsync())).start()
}
}
}
private class Runner(

View File

@ -1,6 +1,5 @@
package me.lucky.wasted
import android.app.job.JobScheduler
import android.content.ClipData
import android.content.ClipboardManager
import android.content.ComponentName
@ -8,6 +7,8 @@ import android.content.Intent
import android.content.pm.PackageManager
import android.os.Build
import android.os.Bundle
import android.view.Menu
import android.view.MenuItem
import android.view.View
import androidx.activity.result.contract.ActivityResultContracts
import androidx.appcompat.app.AppCompatActivity
@ -55,6 +56,16 @@ open class MainActivity : AppCompatActivity() {
setup()
}
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
menuInflater.inflate(R.menu.main, menu)
return super.onCreateOptionsMenu(menu)
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {
if (item.itemId == R.id.triggers) showTriggers()
return super.onOptionsItemSelected(item)
}
override fun onStart() {
super.onStart()
update()
@ -116,9 +127,6 @@ open class MainActivity : AppCompatActivity() {
private fun setup() {
binding.apply {
authenticationCode.setOnClickListener {
showTriggersSettings()
}
authenticationCode.setOnLongClickListener {
copyAuthenticationCode()
true
@ -156,10 +164,6 @@ open class MainActivity : AppCompatActivity() {
MODIFIER_MINUTES -> i
else -> return@setEndIconOnClickListener
}
if (prefs.isEnabled && prefs.isWipeOnInactivity) {
if (job.schedule() == JobScheduler.RESULT_FAILURE)
showWipeJobScheduleFailedPopup()
}
}
toggle.setOnCheckedChangeListener { _, isChecked ->
if (isChecked) requestAdmin() else setOff()
@ -191,7 +195,7 @@ open class MainActivity : AppCompatActivity() {
}, CLIPBOARD_CLEAR_DELAY)
}
private fun showTriggersSettings() {
private fun showTriggers() {
var triggers = prefs.triggers
val values = Trigger.values().toMutableList()
val strings = resources.getStringArray(R.array.triggers).toMutableList()
@ -248,14 +252,6 @@ open class MainActivity : AppCompatActivity() {
updateCodeColorState()
}
private fun showWipeJobScheduleFailedPopup() {
Snackbar.make(
binding.toggle,
R.string.wipe_job_schedule_failed_popup,
Snackbar.LENGTH_LONG,
).show()
}
private fun setOff() {
prefs.isEnabled = false
setWipeOnInactivityState(false)
@ -284,7 +280,7 @@ open class MainActivity : AppCompatActivity() {
}
private fun setWipeOnInactivityState(value: Boolean) {
job.setState(value)
if (!value) job.cancel()
setForegroundState(value)
}

View File

@ -23,10 +23,5 @@ class WipeJobManager(private val ctx: Context) {
) ?: JobScheduler.RESULT_FAILURE
}
fun setState(value: Boolean): Boolean {
if (value) {
if (schedule() == JobScheduler.RESULT_FAILURE) return false
} else { scheduler?.cancel(JOB_ID) }
return true
}
fun cancel() = scheduler?.cancel(JOB_ID)
}

View File

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z"/>
</vector>

View File

@ -7,25 +7,14 @@
android:padding="32dp"
tools:context=".MainActivity">
<TextView
android:id="@+id/description"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/description"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ScrollView
android:id="@+id/scrollView"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginVertical="16dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:isScrollContainer="false"
app:layout_constraintBottom_toTopOf="@+id/toggle"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/description">
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
@ -69,7 +58,7 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layoutDirection="rtl"
android:text="@string/wipe_esim_check_box"
android:text="@string/wipe_embedded_sim_check_box"
android:textSize="16sp" />
<View

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/triggers"
android:title="@string/triggers"
android:icon="@drawable/ic_baseline_settings_24"
app:showAsAction="always" />
</menu>

View File

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Wasted</string>
<string name="description">Aktiviere Wasted, um dein Gerät im Notfall zu sperren. Du kannst hierfür PanicKit, Tile und Shortcut verwenden, oder eine Nachricht mit diesem Authentifizierungscode auf dein Gerät senden.</string>
<string name="device_admin_label">Wasted</string>
<string name="device_admin_description">Wasted erlauben das Gerät zu sperren und optional die Daten in einem Notfall zu löschen</string>
<string name="service_unavailable_popup">Geräteadministrator nicht verfügbar</string>
<string name="wipe_data_check_box">Daten löschen</string>
<string name="wipe_esim_check_box">eSim löschen</string>
<string name="wipe_embedded_sim_check_box">eSim löschen</string>
<string name="panic_app_dialog_title">Bestätige Panik App</string>
<string name="panic_app_dialog_message">Bist du sicher, dass du %1$s erlauben willst, destruktive Aktionen auslösen zu lassen\?</string>
<string name="panic_app_unknown_app">eine unbekannte App</string>
@ -16,17 +13,12 @@
<string name="wipe_on_inactivity_switch">Bei Inaktivität löschen</string>
<string name="wipe_on_inactivity_description">Den Speicher des Geräts löschen, wenn es für N Tage nicht entsperrt wurde.</string>
<string name="notification_channel_default_name">Standard</string>
<string name="wipe_job_description">Den Speicher bei Inaktivität löschen</string>
<string name="wipe_job_schedule_failed_popup">Fehler bei der Durchführung des Wipes</string>
<string name="foreground_service_description">Receive events which require foreground service</string>
<string name="foreground_service_notification_title">Guard</string>
<string name="triggers_array_panic_kit">PanicKit</string>
<string name="triggers_array_tile">Tile</string>
<string name="triggers_array_shortcut">Shortcut</string>
<string name="triggers_array_broadcast">Broadcast</string>
<string name="triggers_array_notification">Benachrichtigung</string>
<string name="notification_listener_service_label">Viper</string>
<string name="notification_listener_service_description">Benachrichtigungen nach dem Authentifizierungscode absuchen</string>
<string name="triggers">Auslöser</string>
<string name="copied_popup">Kopiert</string>
</resources>

View File

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Wasted</string>
<string name="description">Active Wasted para bloquear un dispositivo en caso de emergencia. Puede usar PanicKit, title, acceso directo o enviar un mensaje con este código de autenticación.</string>
<string name="device_admin_label">Wasted</string>
<string name="device_admin_description">Permita que Wasted bloquee un dispositivo y, opcionalmente, borre sus datos en caso de emergencia</string>
<string name="service_unavailable_popup">Administrador de dispositivos no disponible</string>
<string name="wipe_data_check_box">Borrar datos</string>
<string name="wipe_esim_check_box">Borrar eSIM</string>
<string name="wipe_embedded_sim_check_box">Borrar eSIM</string>
<string name="panic_app_dialog_title">Confirmar aplicación de pánico</string>
<string name="panic_app_dialog_message">¿Está seguro de que desea permitir que %1$s active acciones de pánico destructivas\?</string>
<string name="panic_app_unknown_app">una aplicación desconocida</string>
@ -16,17 +13,12 @@
<string name="wipe_on_inactivity_switch">Borrar por inactividad</string>
<string name="wipe_on_inactivity_description">Limpia un dispositivo cuando no fue desbloqueado por N días.</string>
<string name="notification_channel_default_name">Predeterminado</string>
<string name="wipe_job_description">Borrar un dispositivo por inactividad</string>
<string name="wipe_job_schedule_failed_popup">Error al programar un trabajo de borrado</string>
<string name="foreground_service_description">Recibir eventos que requieren servicio de primer plano</string>
<string name="foreground_service_notification_title">Guardia</string>
<string name="triggers_array_panic_kit">PanicKit</string>
<string name="triggers_array_tile">Título</string>
<string name="triggers_array_shortcut">Acceso directo</string>
<string name="triggers_array_broadcast">Transmisión</string>
<string name="triggers_array_notification">Notificación</string>
<string name="notification_listener_service_label">Viper</string>
<string name="notification_listener_service_description">Escanear notificaciones para el código de autenticación</string>
<string name="triggers">Activadores</string>
<string name="copied_popup">Copiado</string>
</resources>

View File

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Wasted</string>
<string name="description">Attiva Wasted per bloccare un dispositivo in caso di pericolo. Puoi usare PanicKit, un toggle, una scorciatoia o inviare un messaggio con questo codice di autenticazione.</string>
<string name="device_admin_label">Wasted</string>
<string name="device_admin_description">Consenti a Wasted di bloccare un dispositivo e, facoltativamente, cancellare i suoi dati in caso di pericolo</string>
<string name="service_unavailable_popup">Amministrazione dispositivo non disponibile</string>
<string name="wipe_data_check_box">Cancella i dati</string>
<string name="wipe_esim_check_box">Cancella eSIM</string>
<string name="wipe_embedded_sim_check_box">Cancella eSIM</string>
<string name="panic_app_dialog_title">Conferma app di panico</string>
<string name="panic_app_dialog_message">Sei sicuro di voler consentire a %1$s di attivare azioni di panico distruttive\?</string>
<string name="panic_app_unknown_app">un\'app sconosciuta</string>
@ -16,17 +13,12 @@
<string name="wipe_on_inactivity_switch">Cancella in caso di inattività</string>
<string name="wipe_on_inactivity_description">Cancella i dati quando il dispositivo non viene sbloccato per N giorni.</string>
<string name="notification_channel_default_name">Predefinito</string>
<string name="wipe_job_description">Cancella i dati in caso di inattività</string>
<string name="wipe_job_schedule_failed_popup">Impossibile pianificare un processo di cancellazione</string>
<string name="foreground_service_description">Ricevi eventi che richiedono il servizio in primo piano</string>
<string name="foreground_service_notification_title">Guardia</string>
<string name="triggers_array_panic_kit">PanicKit</string>
<string name="triggers_array_tile">Toggle</string>
<string name="triggers_array_shortcut">Scorciatoia</string>
<string name="triggers_array_broadcast">Broadcast</string>
<string name="triggers_array_notification">Notifica</string>
<string name="notification_listener_service_label">Viper</string>
<string name="notification_listener_service_description">Scansiona le notifiche per il codice di autenticazione</string>
<string name="triggers">Attivatori</string>
<string name="copied_popup">Copiato</string>
</resources>

View File

@ -1,6 +1,6 @@
<resources>
<!-- Base application theme. -->
<style name="Theme.Wasted" parent="Theme.Material3.DayNight.NoActionBar">
<style name="Theme.Wasted" parent="Theme.Material3.DayNight">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item>
<item name="colorOnPrimary">@color/black</item>

View File

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Потрачено</string>
<string name="description">Включите приложение, чтобы заблокировать устройство при возникновении опасности. Вы можете использовать Тревожную кнопку, плитку быстрых настроек, ярлык или отправить сообщение с этим кодом аутентификации.</string>
<string name="device_admin_label">Потрачено</string>
<string name="device_admin_description">Разрешите приложению блокировать устройство и опционально стирать его данные при возникновении опасности</string>
<string name="service_unavailable_popup">Администратор устройства недоступен</string>
<string name="wipe_data_check_box">Стереть данные</string>
<string name="wipe_esim_check_box">Стереть eSIM</string>
<string name="wipe_embedded_sim_check_box">Стереть eSIM</string>
<string name="panic_app_dialog_title">Подтвердите приложение тревожной кнопки</string>
<string name="panic_app_dialog_message">Вы уверены, что хотите разрешить %1$s запускать действия тревожной кнопки\?</string>
<string name="panic_app_unknown_app">неизвестное приложение</string>
@ -16,17 +13,12 @@
<string name="wipe_on_inactivity_switch">Стереть при неактивности</string>
<string name="wipe_on_inactivity_description">Стереть данные когда устройство не разблокируется N дней.</string>
<string name="notification_channel_default_name">По умолчанию</string>
<string name="wipe_job_description">Стереть данные при неактивности</string>
<string name="wipe_job_schedule_failed_popup">Не удалось запланировать сервис стирания данных</string>
<string name="foreground_service_description">Получать события для которых требуется сервис на переднем плане</string>
<string name="foreground_service_notification_title">Охрана</string>
<string name="triggers_array_panic_kit">Тревожная кнопка</string>
<string name="triggers_array_tile">Плитка</string>
<string name="triggers_array_shortcut">Ярлык</string>
<string name="triggers_array_broadcast">Широковещательное сообщение</string>
<string name="triggers_array_notification">Уведомление</string>
<string name="notification_listener_service_label">Вайпер</string>
<string name="notification_listener_service_description">Сканирует уведомления на наличие кода аутентификации</string>
<string name="triggers">Триггеры</string>
<string name="copied_popup">Скопировано</string>
</resources>

View File

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Wasted</string>
<string name="description">Turn on Wasted to lock a device on emergency. You can use PanicKit, tile, shortcut or send a message with this authentication code.</string>
<string name="device_admin_label">Wasted</string>
<string name="device_admin_description">Allow Wasted to lock a device and optionally wipe its data on emergency</string>
<string name="service_unavailable_popup">Cihaz yöneticisi mevcut değil</string>
<string name="wipe_data_check_box">Verileri sil</string>
<string name="wipe_esim_check_box">eSIM\'i sil</string>
<string name="wipe_embedded_sim_check_box">eSIM\'i sil</string>
<string name="panic_app_dialog_title">Panik uygulamasını onayla</string>
<string name="panic_app_dialog_message">Yıkıcı panik eylemlerini tetiklemek için %1$s\'e izin vermek istediğinizden emin misiniz\?</string>
<string name="panic_app_unknown_app">bilinmeyen bir uygulama</string>
@ -16,17 +13,12 @@
<string name="wipe_on_inactivity_switch">Kullanılmadığında sil</string>
<string name="wipe_on_inactivity_description">N gün boyunca kilidi açılmamış bir cihazı silin.</string>
<string name="notification_channel_default_name">Varsayılan</string>
<string name="wipe_job_description">Cihaz kullanılmadığında siler</string>
<string name="wipe_job_schedule_failed_popup">Silme işi zamanlanamadı</string>
<string name="foreground_service_description">Ön plan hizmeti gerektiren olayları al</string>
<string name="foreground_service_notification_title">Guard</string>
<string name="triggers_array_panic_kit">PanicKit</string>
<string name="triggers_array_tile">Tile</string>
<string name="triggers_array_shortcut">Kısayol</string>
<string name="triggers_array_broadcast">Yayın</string>
<string name="triggers_array_notification">Bildirim</string>
<string name="notification_listener_service_label">Viper</string>
<string name="notification_listener_service_description">Kimlik doğrulama kodu için bildirimleri tara</string>
<string name="triggers">Tetikleyiciler</string>
<string name="copied_popup">Kopyalandı</string>
</resources>

View File

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Wasted</string>
<string name="description">Turn on Wasted to lock a device on emergency. You can use PanicKit, tile, shortcut or send a message with this authentication code.</string>
<string name="device_admin_label">Wasted</string>
<string name="device_admin_description">Allow Wasted to lock a device and optionally wipe its data on emergency</string>
<string name="service_unavailable_popup">Адміністратор пристрою недоступний</string>
<string name="wipe_data_check_box">Стерти дані</string>
<string name="wipe_esim_check_box">Стерти дані eSIM</string>
<string name="wipe_embedded_sim_check_box">Стерти дані eSIM</string>
<string name="panic_app_dialog_title">Confirm panic app</string>
<string name="panic_app_dialog_message">Are you sure that you want to allow %1$s to trigger destructive panic actions\?</string>
<string name="panic_app_unknown_app">невідомий додаток</string>
@ -16,17 +13,12 @@
<string name="wipe_on_inactivity_switch">Wipe on inactivity</string>
<string name="wipe_on_inactivity_description">Видалення пристрою, коли його не було розблоковано протягом N днів.</string>
<string name="notification_channel_default_name">За замовчуванням</string>
<string name="wipe_job_description">Wipe a device on inactivity</string>
<string name="wipe_job_schedule_failed_popup">Failed to schedule a wipe job</string>
<string name="foreground_service_description">Receive events which require foreground service</string>
<string name="foreground_service_notification_title">Захисник</string>
<string name="triggers_array_panic_kit">PanicKit</string>
<string name="triggers_array_tile">Tile</string>
<string name="triggers_array_shortcut">Гарячі клавіші</string>
<string name="triggers_array_broadcast">Трансляція</string>
<string name="triggers_array_notification">Сповіщення</string>
<string name="notification_listener_service_label">Знищувач</string>
<string name="notification_listener_service_description">Сканувати сповіщення для коду автентифікації</string>
<string name="triggers">Тріггери</string>
<string name="copied_popup">Скопійовано</string>
</resources>

View File

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">自毁</string>
<string name="description">开启自毁,在紧急状况下锁定设备。您可以使用触发器、追踪器、快捷方式或者发送验证码信息。</string>
<string name="device_admin_label">自毁</string>
<string name="device_admin_description">允许自毁锁定设备以及可选择在紧急状况下擦除数据</string>
<string name="service_unavailable_popup">设备管理员不可用</string>
<string name="wipe_data_check_box">擦除数据</string>
<string name="wipe_esim_check_box">擦除eSIM</string>
<string name="wipe_embedded_sim_check_box">擦除eSIM</string>
<string name="panic_app_dialog_title">确认需要使用的紧急应用程序</string>
<string name="panic_app_dialog_message">你是否确定允许%1$s触发紧急自毁行为</string>
<string name="panic_app_unknown_app">未知应用</string>
@ -16,17 +13,12 @@
<string name="wipe_on_inactivity_switch">在不使用时擦除</string>
<string name="wipe_on_inactivity_description">当设备在N天内没被解锁时擦除</string>
<string name="notification_channel_default_name">默认设置</string>
<string name="wipe_job_description">擦除不使用的设备</string>
<string name="wipe_job_schedule_failed_popup">无法制定擦除计划</string>
<string name="foreground_service_description">接收需要前台服务的事件</string>
<string name="foreground_service_notification_title">守卫</string>
<string name="triggers_array_panic_kit">恐慌触发器</string>
<string name="triggers_array_tile">追踪器</string>
<string name="triggers_array_shortcut">快捷方式</string>
<string name="triggers_array_broadcast">广播</string>
<string name="triggers_array_notification">通知</string>
<string name="notification_listener_service_label">哨兵</string>
<string name="notification_listener_service_description">扫描通知中的验证码</string>
<string name="triggers">触发器</string>
<string name="copied_popup">复制成功</string>
</resources>

View File

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Wasted</string>
<string name="description">Turn on Wasted to lock a device on emergency. You can use PanicKit, tile, shortcut or send a message with this authentication code.</string>
<string name="device_admin_label">Wasted</string>
<string name="device_admin_description">Allow Wasted to lock a device and optionally wipe its data on emergency</string>
<string name="service_unavailable_popup">Device admin unavailable</string>
<string name="wipe_data_check_box">Wipe data</string>
<string name="wipe_esim_check_box">Wipe eSIM</string>
<string name="wipe_embedded_sim_check_box">Wipe eSIM</string>
<string name="panic_app_dialog_title">Confirm panic app</string>
<string name="panic_app_dialog_message">Are you sure that you want to allow %1$s to trigger destructive panic actions\?</string>
<string name="panic_app_unknown_app">an unknown app</string>
@ -19,17 +16,12 @@
<string name="wipe_on_inactivity_time_error">7d / 48h / 120m</string>
<string name="wipe_on_inactivity_time_helper_text">[d]ays [h]ours [m]inutes</string>
<string name="notification_channel_default_name">Default</string>
<string name="wipe_job_description">Wipe a device on inactivity</string>
<string name="wipe_job_schedule_failed_popup">Failed to schedule a wipe job</string>
<string name="foreground_service_description">Receive events which require foreground service</string>
<string name="foreground_service_notification_title">Guard</string>
<string name="triggers_array_panic_kit">PanicKit</string>
<string name="triggers_array_tile">Tile</string>
<string name="triggers_array_shortcut">Shortcut</string>
<string name="triggers_array_broadcast">Broadcast</string>
<string name="triggers_array_notification">Notification</string>
<string name="notification_listener_service_label">Viper</string>
<string name="notification_listener_service_description">Scan notifications for the authentication code</string>
<string name="triggers">Triggers</string>
<string name="copied_popup">Copied</string>
</resources>

View File

@ -1,6 +1,6 @@
<resources>
<!-- Base application theme. -->
<style name="Theme.Wasted" parent="Theme.Material3.DayNight.NoActionBar">
<style name="Theme.Wasted" parent="Theme.Material3.DayNight">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item>
<item name="colorOnPrimary">@color/white</item>

View File

@ -0,0 +1 @@
update wipe on inactivity scheduler

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 86 KiB