mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-01 12:04:21 +01:00
Hide app screen from switcher (#870)
This commit is contained in:
@@ -11,6 +11,7 @@ import io.flutter.plugin.common.MethodChannel;
|
|||||||
|
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
@@ -56,7 +57,7 @@ public class MainActivity extends FlutterFragmentActivity {
|
|||||||
handler.post(() -> result.success(bytes));
|
handler.post(() -> result.success(bytes));
|
||||||
break;
|
break;
|
||||||
case "getUnstoppableDomainAddress":
|
case "getUnstoppableDomainAddress":
|
||||||
int version = Build.VERSION.SDK_INT;
|
int version = Build.VERSION.SDK_INT;
|
||||||
if (version >= UNSTOPPABLE_DOMAIN_MIN_VERSION_SDK) {
|
if (version >= UNSTOPPABLE_DOMAIN_MIN_VERSION_SDK) {
|
||||||
getUnstoppableDomainAddress(call, result);
|
getUnstoppableDomainAddress(call, result);
|
||||||
} else {
|
} else {
|
||||||
@@ -87,4 +88,10 @@ public class MainActivity extends FlutterFragmentActivity {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -110,4 +110,12 @@ import UnstoppableDomainsResolution
|
|||||||
GeneratedPluginRegistrant.register(with: self)
|
GeneratedPluginRegistrant.register(with: self)
|
||||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override func applicationWillResignActive(_: UIApplication ) {
|
||||||
|
self.window?.isHidden = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
override func applicationDidBecomeActive(_: UIApplication) {
|
||||||
|
self.window?.isHidden = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user