mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-10-29 15:19:41 +00:00
Fix battery level not being set yet when a request arrived
This commit is contained in:
@@ -85,7 +85,8 @@ public class BatteryPlugin extends Plugin {
|
||||
IntentFilter intentFilter = new IntentFilter();
|
||||
intentFilter.addAction(Intent.ACTION_BATTERY_CHANGED);
|
||||
intentFilter.addAction(Intent.ACTION_BATTERY_LOW);
|
||||
context.registerReceiver(receiver, intentFilter);
|
||||
Intent currentState = context.registerReceiver(receiver, intentFilter);
|
||||
receiver.onReceive(context, currentState);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user