mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-22 18:07:55 +00:00
Fix battery level not being set yet when a request arrived
This commit is contained in:
parent
e716205a48
commit
cff55ab8dd
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user