fix: permission screen - location tap opens settings when permanently denied, battery dialog re-checks on done
This commit is contained in:
parent
650a6efeca
commit
6cbb7a2070
3 changed files with 83 additions and 38 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue