]> hydra-www.ietfng.org Git - acmetensortoys-ctfws-android/commitdiff
Make the app usable over the lockscreen
authorNathaniel Wesley Filardo <nwfilardo@gmail.com>
Mon, 28 Feb 2022 20:29:08 +0000 (20:29 +0000)
committerNathaniel Wesley Filardo <nwfilardo@gmail.com>
Wed, 2 Mar 2022 23:39:37 +0000 (23:39 +0000)
Leave the preferences activity as requiring unlock, FWIW

mobile/src/main/AndroidManifest.xml
mobile/src/main/java/com/acmetensortoys/ctfwstimer/service/MainServiceNotification.java

index b2e9efc8a3cacd955b266d9816fa5ccc22c333b3..44ca6ef1787d8309a0bca9e25fa2faa06b15f5c4 100644 (file)
@@ -25,7 +25,9 @@
         tools:ignore="UnusedAttribute">
 
         <activity android:name=".activity.main.Activity"
-            android:exported="true">
+            android:exported="true"
+            android:showWhenLocked="true"
+            android:showForAllUsers="true">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
 
             </intent-filter>
         </activity>
 
-        <activity android:name=".activity.AboutActivity" />
+        <activity android:name=".activity.AboutActivity"
+            android:showWhenLocked="true"
+            android:showForAllUsers="true" />
 
         <activity android:name=".activity.SettingsActivity" />
 
         <activity
             android:name=".activity.HandbookActivity"
             android:icon="@mipmap/ic_shield_1"
-            android:label="@string/app_name_hand">
+            android:label="@string/app_name_hand"
+            android:showWhenLocked="true"
+            android:showForAllUsers="true">
 
             <!--
             <intent-filter>
index 63037e93d574fe555648bcdb06cb2182b308ab97..348751785f86366dcabd9a9bef43d4008372f5cf 100644 (file)
@@ -43,7 +43,8 @@ class MainServiceNotification {
         Intent ni = new Intent(ms, Activity.class);
         ni.setAction(Intent.ACTION_MAIN);
         ni.addCategory(Intent.CATEGORY_LAUNCHER);
-        ni.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        ni.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+                  | Intent.FLAG_ACTIVITY_CLEAR_TOP);
 
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
             NotificationChannel nc = new NotificationChannel(