forked from cwtch.im/cwtch-ui
Merge pull request 'add android flag secure, pubspec vewrsion bump, and stubs for sdk31 hide overlay' (#427) from androidFlags into trunk
Reviewed-on: cwtch.im/cwtch-ui#427 Reviewed-by: Sarah Jamie Lewis <sarah@openprivacy.ca>
This commit is contained in:
commit
548e7f4925
|
@ -50,6 +50,10 @@
|
||||||
Allows app to use ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS -->
|
Allows app to use ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS -->
|
||||||
<uses-permission-sdk-23 android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
<uses-permission-sdk-23 android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
||||||
|
|
||||||
|
<!-- TODO when we support sdk 31
|
||||||
|
<uses-permission-sdk-23 android:name="android.permission.HIDE_OVERLAY_WINDOWS" />
|
||||||
|
-->
|
||||||
|
|
||||||
<!--Needed to check if activity is foregrounded or if messages from the service should be queued-->
|
<!--Needed to check if activity is foregrounded or if messages from the service should be queued-->
|
||||||
<uses-permission android:name="android.permission.GET_TASKS" />
|
<uses-permission android:name="android.permission.GET_TASKS" />
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ import android.os.PowerManager
|
||||||
import android.provider.Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
|
import android.provider.Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import android.view.Window
|
import android.view.Window
|
||||||
|
import android.view.WindowManager
|
||||||
import androidx.annotation.NonNull
|
import androidx.annotation.NonNull
|
||||||
import androidx.lifecycle.Observer
|
import androidx.lifecycle.Observer
|
||||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
import androidx.localbroadcastmanager.content.LocalBroadcastManager
|
||||||
|
@ -71,6 +72,20 @@ class MainActivity: FlutterActivity() {
|
||||||
private var dlToFileKey = ""
|
private var dlToFileKey = ""
|
||||||
private var exportFromPath = ""
|
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)
|
// handles clicks received from outside the app (ie, notifications)
|
||||||
override fun onNewIntent(intent: Intent) {
|
override fun onNewIntent(intent: Intent) {
|
||||||
super.onNewIntent(intent)
|
super.onNewIntent(intent)
|
||||||
|
|
|
@ -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.
|
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||||
# Read more about iOS versioning at
|
# Read more about iOS versioning at
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
version: 1.6.2+27
|
version: 1.7.0+28
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.15.0 <3.0.0"
|
sdk: ">=2.15.0 <3.0.0"
|
||||||
|
|
Loading…
Reference in New Issue