fix: permission screen - location tap opens settings when permanently denied, battery dialog re-checks on done

This commit is contained in:
fiatcode 2026-04-30 16:21:07 +07:00
parent 650a6efeca
commit 6cbb7a2070
No known key found for this signature in database
3 changed files with 83 additions and 38 deletions

View file

@ -104,4 +104,16 @@ class LocationBridge {
return false;
}
}
static Future<bool> isBatteryOptimizationDisabled() async {
try {
final result = await _methodChannel.invokeMethod<bool>(
'isBatteryOptimizationDisabled',
);
return result ?? false;
} on PlatformException catch (e) {
debugPrint('Failed to check battery optimization: ${e.message}');
return false;
}
}
}