diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 88c79b7b..379253be 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -50,6 +50,10 @@ Allows app to use ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS --> + + diff --git a/android/app/src/main/kotlin/im/cwtch/flwtch/MainActivity.kt b/android/app/src/main/kotlin/im/cwtch/flwtch/MainActivity.kt index dd39a06d..fdd61251 100644 --- a/android/app/src/main/kotlin/im/cwtch/flwtch/MainActivity.kt +++ b/android/app/src/main/kotlin/im/cwtch/flwtch/MainActivity.kt @@ -12,6 +12,7 @@ import android.os.PowerManager import android.provider.Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS import android.util.Log import android.view.Window +import android.view.WindowManager import androidx.annotation.NonNull import androidx.lifecycle.Observer import androidx.localbroadcastmanager.content.LocalBroadcastManager @@ -71,6 +72,20 @@ class MainActivity: FlutterActivity() { private var dlToFileKey = "" private var exportFromPath = "" + override fun onCreate(savedInstanceState: android.os.Bundle?) { + super.onCreate(savedInstanceState) + window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE) + // Todo: when we support SDK 31 + // hideOverlay() + } + + /* + @TargetApi(31) + fun hideOverlay() { + window.setHideOverlayWindows(true); + } + */ + // handles clicks received from outside the app (ie, notifications) override fun onNewIntent(intent: Intent) { super.onNewIntent(intent) diff --git a/pubspec.yaml b/pubspec.yaml index ac8ccde0..b855591d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.6.2+27 +version: 1.7.0+28 environment: sdk: ">=2.15.0 <3.0.0"