Skip to content

Commit 930c6d3

Browse files
author
lucky
committed
1.5.9
1 parent 409fe57 commit 930c6d3

File tree

20 files changed

+212
-91
lines changed

20 files changed

+212
-91
lines changed

.github/workflows/super-linter.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

README.md

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Lock a device and wipe its data on emergency.
1212
height="80">](https://play.google.com/store/apps/details?id=me.lucky.wasted)
1313

1414
<img
15-
src="https://raw.githubusercontent.com/x13a/Wasted/main/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png"
15+
src="fastlane/metadata/android/en-US/images/phoneScreenshots/1.png"
1616
width="30%"
1717
height="30%">
1818

@@ -27,9 +27,8 @@ Also you can:
2727
* fire when a fake messenger app is launched
2828
* fire when a duress password is entered (companion app: [Duress](https://github.com/x13a/Duress))
2929

30-
The app works in `Work Profile` too. Use [Shelter](https://github.com/PeterCxy/Shelter) to install
31-
risky apps and `Wasted` in it. Then you can wipe this profile data with one click without wiping
32-
the whole device.
30+
The app works in `Work Profile` too, but with limitations. Use it to install risky apps and
31+
`Wasted` in it. Then you can wipe this profile data with one click without wiping the whole device.
3332

3433
Only encrypted device may guarantee that the data will not be recoverable.
3534

@@ -45,30 +44,13 @@ Only encrypted device may guarantee that the data will not be recoverable.
4544
* FOREGROUND_SERVICE - receive lock and USB state events
4645
* RECEIVE_BOOT_COMPLETED - persist lock job and foreground service across reboots
4746

48-
## Example
49-
50-
Broadcast:
51-
```sh
52-
$ adb shell am broadcast \
53-
-a me.lucky.wasted.action.TRIGGER \
54-
-n me.lucky.wasted/.TriggerReceiver \
55-
-e code "b49a6576-0c27-4f03-b96b-da53501022ba"
56-
```
57-
5847
## Localization
5948

60-
Is `Wasted` not in your language, or the translation is incorrect or incomplete? Get involved on
61-
[Crowdin](https://crwd.in/me-lucky-wasted).
62-
6349
[<img
64-
src="https://user-images.githubusercontent.com/53379023/153461055-50169c86-b187-40c7-8ec8-97d5e93660b8.png"
65-
alt="Crowdin"
66-
height="51">](https://crwd.in/me-lucky-wasted)
50+
height="51"
51+
src="https://badges.crowdin.net/badge/dark/crowdin-on-light@2x.png"
52+
alt="Crowdin">](https://crwd.in/me-lucky-wasted)
6753

6854
## License
69-
[![GNU GPLv3 Image](https://www.gnu.org/graphics/gplv3-127x51.png)](https://www.gnu.org/licenses/gpl-3.0.en.html)
7055

71-
This application is Free Software: You can use, study share and improve it at your will.
72-
Specifically you can redistribute and/or modify it under the terms of the
73-
[GNU General Public License v3](https://www.gnu.org/licenses/gpl.html) as published by the Free
74-
Software Foundation.
56+
[![GNU GPLv3 Image](https://www.gnu.org/graphics/gplv3-127x51.png)](https://www.gnu.org/licenses/gpl-3.0.en.html)

SECURITY.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

app/build.gradle

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ android {
1010
applicationId "me.lucky.wasted"
1111
minSdk 23
1212
targetSdk 32
13-
versionCode 37
14-
versionName "1.5.8"
13+
versionCode 38
14+
versionName "1.5.9"
1515

1616
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1717
}
@@ -40,15 +40,19 @@ android {
4040

4141
dependencies {
4242
implementation 'androidx.core:core-ktx:1.8.0'
43-
implementation 'androidx.appcompat:appcompat:1.4.2'
43+
implementation 'androidx.appcompat:appcompat:1.5.0'
4444
implementation 'com.google.android.material:material:1.6.1'
4545
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
4646
testImplementation 'junit:junit:4.13.2'
4747
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
4848
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
4949

5050
implementation 'androidx.security:security-crypto:1.0.0'
51-
implementation 'androidx.preference:preference-ktx:1.2.0'
51+
// https://issuetracker.google.com/issues/238425626
52+
implementation('androidx.preference:preference-ktx:1.2.0') {
53+
exclude group: 'androidx.lifecycle', module:'lifecycle-viewmodel'
54+
exclude group: 'androidx.lifecycle', module:'lifecycle-viewmodel-ktx'
55+
}
5256
implementation 'androidx.biometric:biometric:1.1.0'
5357
implementation 'androidx.drawerlayout:drawerlayout:1.1.1'
5458
implementation 'info.guardianproject.panic:panic:1.0'

app/src/main/java/me/lucky/wasted/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ open class MainActivity : AppCompatActivity() {
4343
prefs = Preferences(this)
4444
prefsdb = Preferences(this, encrypted = false)
4545
prefs.copyTo(prefsdb)
46-
NotificationManager(this).createNotificationChannels()
4746
}
4847

4948
private fun init2() {
49+
NotificationManager(this).createNotificationChannels()
5050
replaceFragment(MainFragment())
5151
}
5252

app/src/main/java/me/lucky/wasted/trigger/notification/NotificationListenerService.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ class NotificationListenerService : NotificationListenerService() {
4141
override fun onListenerConnected() {
4242
super.onListenerConnected()
4343
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
44-
migrateNotificationFilter(0, null)
44+
migrateNotificationFilter(
45+
FLAG_FILTER_TYPE_CONVERSATIONS
46+
or FLAG_FILTER_TYPE_ALERTING
47+
or FLAG_FILTER_TYPE_SILENT
48+
or FLAG_FILTER_TYPE_ONGOING,
49+
null,
50+
)
4551
}
4652
}

app/src/main/res/layout/fragment_main.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
android:layout_width="match_parent"
7272
android:layout_height="wrap_content"
7373
android:textAppearance="?attr/textAppearanceTitleMedium"
74+
android:theme="@style/Theme.Wasted.ToggleButton"
7475
app:layout_constraintBottom_toBottomOf="parent"
7576
app:layout_constraintEnd_toEndOf="parent"
7677
app:layout_constraintStart_toStartOf="parent" />

app/src/main/res/values-es-rES/strings.xml

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,44 @@
44
<string name="wipe_data_checkbox">Borrar datos</string>
55
<string name="wipe_embedded_sim_checkbox">Borrar eSIM</string>
66
<string name="panic_app_dialog_title">Confirmar aplicación de pánico</string>
7-
<string name="panic_app_dialog_message">¿Está seguro de que desea permitir que %1$s active acciones de pánico destructivas\?</string>
7+
<string name="panic_app_dialog_message">¿Está seguro de que desea permitir que %1$s active acciones de pánico destructivas\\?</string>
88
<string name="panic_app_unknown_app">una aplicación desconocida</string>
99
<string name="allow">Permitir</string>
1010
<string name="tile_label">Modo avión</string>
1111
<string name="shortcut_label">Pánico</string>
12-
<string name="trigger_lock_description">Limpia un dispositivo cuando no fue desbloqueado por N días.</string>
12+
<string name="trigger_lock_time_hint">tiempo</string>
13+
<string name="trigger_lock_time_error">7d / 48h / 120m</string>
14+
<string name="trigger_lock_time_helper_text">Cuánto tiempo de espera. Modificadores: [d]ías [h]oras [m]inutos</string>
15+
<string name="trigger_tile_delay_description">Retraso seguro antes de que se dispare. Te da algo de tiempo para cancelar el disparo si tocas el mosaico accidentalmente.</string>
1316
<string name="notification_channel_default_name">Predeterminado</string>
14-
<string name="foreground_service_notification_title">Guardia</string>
17+
<string name="foreground_service_notification_title">Guardián</string>
1518
<string name="trigger_panic_kit">PanicKit</string>
16-
<string name="trigger_tile">Título</string>
19+
<string name="trigger_tile">Mosaico</string>
1720
<string name="trigger_shortcut">Acceso directo</string>
18-
<string name="trigger_broadcast">Transmisión</string>
21+
<string name="trigger_broadcast">Difusión</string>
1922
<string name="trigger_notification">Notificación</string>
23+
<string name="trigger_lock">Bloqueo</string>
24+
<string name="trigger_usb">USB</string>
25+
<string name="trigger_application">Aplicación</string>
2026
<string name="copied_popup">Copiado</string>
27+
<string name="main">Principal</string>
28+
<string name="settings">Ajustes</string>
29+
<string name="edit">Editar</string>
30+
<string name="goto_button">GOTO</string>
31+
<string name="authentication">Autenticación</string>
32+
<string name="edit_secret_hint">secreto</string>
33+
<string name="edit_secret_helper_text">Use un secreto lo suficientemente fuerte.</string>
34+
<string name="edit_secret_error">¡No debe estar en blanco!</string>
35+
<string name="trigger_panic_kit_description">Habilite el respondedor de pánico. PanicKit es una colección de herramientas para crear \"botones de pánico\" que pueden desencadenar una respuesta en todo el sistema cuando el usuario se encuentra en una situación ansiosa o peligrosa. Permite que las aplicaciones de activación y las aplicaciones de respuesta se conecten entre sí de forma segura y sencilla. El usuario interactúa con la aplicación de activación cuando se encuentra en una situación de pánico. Las aplicaciones de respuesta reciben esa señal de activación y ejecutan individualmente los pasos para los que fueron configuradas.</string>
36+
<string name="trigger_tile_description">Habilite el servicio de mosaicos. Es un botón en el panel de configuración rápida cuando se desliza desde la parte superior de la pantalla. Este botón imitará el modo avión.</string>
37+
<string name="trigger_shortcut_description">Habilitar icono de acceso directo. Es un botón que verás cuando hagas un toque prolongado en el ícono Wasted.</string>
38+
<string name="trigger_broadcast_description">Habilitar receptor de transmisión. Es útil para comunicarse con otras aplicaciones de Android. Por ejemplo, puede disparar Wasted desde Tasker usando esto.</string>
39+
<string name="trigger_notification_description">Habilite el detector de notificaciones del dispositivo. Escaneará todas las notificaciones a las que tenga acceso en busca del código secreto. Cuando lo encuentre, se disparará.</string>
40+
<string name="trigger_lock_description">Habilite el programador de trabajos de bloqueo. Programará un trabajo cada vez que bloquee un dispositivo y lo cancelará cada vez que desbloquee un dispositivo. Cuando no desbloquea un dispositivo durante X tiempo, se activará un trabajo.</string>
41+
<string name="trigger_usb_description">Habilite el receptor de estado USB. Cuando realiza una conexión de datos USB mientras un dispositivo está bloqueado, se activará. No debe dispararse en el cargador, solo en el dispositivo y el accesorio.</string>
42+
<string name="trigger_application_description">Habilitar aplicación falsa. Agregará aplicaciones de mensajería falsas. Lanzarlos disparará Wasted.</string>
43+
<string name="signal">Signal</string>
44+
<string name="telegram">Telegram</string>
45+
<string name="threema">Threema</string>
46+
<string name="session">Sesión</string>
2147
</resources>

app/src/main/res/values-fr/strings.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
33
<string name="app_name">Wasted</string>
4-
<string name="wipe_data_checkbox">Suppression des données</string>
5-
<string name="wipe_embedded_sim_checkbox">Suppression de l\'eSIM</string>
4+
<string name="wipe_data_checkbox">Effacer les données</string>
5+
<string name="wipe_embedded_sim_checkbox">Effacer l\'eSIM</string>
66
<string name="panic_app_dialog_title">Confirmer l\'application de panique</string>
77
<string name="panic_app_dialog_message">Êtes-vous sûr de vouloir permettre à %1$s de déclencher des actions de panique destructrices.\\?</string>
88
<string name="panic_app_unknown_app">une application inconnue</string>
@@ -27,12 +27,12 @@
2727
<string name="main">Accueil</string>
2828
<string name="settings">Réglages</string>
2929
<string name="edit">Éditer</string>
30-
<string name="goto_button">GOTO</string>
30+
<string name="goto_button">Aller à</string>
3131
<string name="authentication">Authentification</string>
3232
<string name="edit_secret_hint">secret</string>
3333
<string name="edit_secret_helper_text">Utiliser un secret suffisamment fort.</string>
3434
<string name="edit_secret_error">Ne doit pas être vide!</string>
35-
<string name="trigger_panic_kit_description">Activer le répondeur de panique. PanicKit est une collection d\'outils permettant de créer des "boutons de panique" qui peuvent déclencher une réponse à l\'échelle du système lorsque l\'utilisateur se trouve dans une situation anxieuse ou dangereuse. Il permet aux applications de déclenchement et aux applications de réponse de se connecter facilement et en toute sécurité. L\'utilisateur s\'engage avec l\'application de déclenchement lorsqu\'il est dans une situation problématique. Les applications de réponse reçoivent ce signal de déclenchement et exécutent individuellement les étapes pour lesquelles elles ont été configurées.</string>
35+
<string name="trigger_panic_kit_description">Activer le répondeur de panique. PanicKit est une collection d\'outils permettant de créer des \"boutons de panique\" qui peuvent déclencher une réponse à l\'échelle du système lorsque l\'utilisateur se trouve dans une situation anxieuse ou dangereuse. Il permet aux applications de déclenchement et aux applications de réponse de se connecter facilement et en toute sécurité. L\'utilisateur s\'engage avec l\'application de déclenchement lorsqu\'il est dans une situation problématique. Les applications de réponse reçoivent ce signal de déclenchement et exécutent individuellement les étapes pour lesquelles elles ont été configurées.</string>
3636
<string name="trigger_tile_description">Activer le service de tuiles rapide. Il s\'agit d\'un bouton dans le panneau des paramètres rapides lorsque vous balayez depuis le haut de l\'écran. Ce bouton imitera le mode avion.</string>
3737
<string name="trigger_shortcut_description">Activer le raccourci d\'icône. Il s\'agit d\'un bouton que vous verrez lorsque vous appuyez longuement sur l\'icône de Wasted.</string>
3838
<string name="trigger_broadcast_description">Activez le récepteur de diffusion. Il est utile pour communiquer avec d\'autres applications Android. Par exemple, vous pouvez lancer Wasted depuis Tasker en utilisant ceci.</string>

app/src/main/res/values-night/themes.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,10 @@
88
<item name="colorSecondary">@color/teal_200</item>
99
<item name="colorOnSecondary">@color/black</item>
1010
<!-- Customize your theme here. -->
11+
<item name="android:windowTranslucentStatus">true</item>
12+
</style>
13+
14+
<style name="Theme.Wasted.ToggleButton" parent="Theme.Wasted">
15+
<item name="colorAccent">@color/green_500</item>
1116
</style>
1217
</resources>

0 commit comments

Comments
 (0)