Skip to content

Commit

Permalink
#1196 fix access to app from lock screen
Browse files Browse the repository at this point in the history
  • Loading branch information
deckerst committed Sep 16, 2024
1 parent fc04a1c commit 4851b99
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@
android:label="@string/app_name"
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:showWhenLocked="true"
android:supportsRtl="true"
tools:targetApi="tiramisu">
<activity
Expand All @@ -128,7 +127,6 @@
android:exported="true"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:showWhenLocked="true"
android:supportsPictureInPicture="true"
android:theme="@style/NormalTheme"
android:windowSoftInputMode="adjustResize">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ open class MainActivity : FlutterFragmentActivity() {

val keyguardManager = getSystemService(Context.KEYGUARD_SERVICE) as android.app.KeyguardManager
val isLocked = keyguardManager.isKeyguardLocked
setShowWhenLocked(isLocked)
if (isLocked) {
// device is locked, so access to content is limited to intent URI by default
fields[INTENT_DATA_KEY_SECURE_URIS] = listOf(uri.toString())
Expand Down

0 comments on commit 4851b99

Please sign in to comment.