mirror of
https://github.com/haorendashu/nowser.git
synced 2025-12-17 09:54:19 +01:00
android config change and bugfix
This commit is contained in:
@@ -12,7 +12,8 @@
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
android:windowSoftInputMode="adjustResize"
|
||||
android:requestLegacyExternalStorage="true">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
@@ -24,6 +25,8 @@
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"/>
|
||||
<action android:name="android.hardware.usb.action.USB_DEVICE_DETACHED"/>
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
@@ -45,6 +48,10 @@
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
<meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
|
||||
android:resource="@xml/device_filter" />
|
||||
<meta-data android:name="android.hardware.usb.action.USB_DEVICE_DETACHED"
|
||||
android:resource="@xml/device_filter" />
|
||||
|
||||
<provider
|
||||
android:name="com.github.haorendashu.nowser.NowserSignerProvider"
|
||||
@@ -75,4 +82,6 @@
|
||||
<data android:mimeType="text/plain"/>
|
||||
</intent>
|
||||
</queries>
|
||||
|
||||
<uses-feature android:name="android.hardware.usb.host" />
|
||||
</manifest>
|
||||
|
||||
5
android/app/src/main/res/xml/device_filter.xml
Normal file
5
android/app/src/main/res/xml/device_filter.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- 0x2323 / 0x3434: Nesigner -->
|
||||
<usb-device vendor-id="8995" product-id="13364" />
|
||||
</resources>
|
||||
@@ -41,7 +41,7 @@ class _UserLoginDialog extends CustState<UserLoginDialog> {
|
||||
|
||||
@override
|
||||
Future<void> onReady(BuildContext context) async {
|
||||
if (PlatformUtil.isPC()) {
|
||||
if (PlatformUtil.isPC() || PlatformUtil.isAndroid()) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
checkNesigner();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user