mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-31 20:25:38 +00:00
Added power saving to debug info
This commit is contained in:
parent
75fcc16c8b
commit
1a40bf5109
1 changed files with 5 additions and 0 deletions
|
@ -51,6 +51,7 @@ import android.os.DeadSystemException;
|
|||
import android.os.Debug;
|
||||
import android.os.IBinder;
|
||||
import android.os.OperationCanceledException;
|
||||
import android.os.PowerManager;
|
||||
import android.os.RemoteException;
|
||||
import android.os.TransactionTooLargeException;
|
||||
import android.provider.Settings;
|
||||
|
@ -1921,6 +1922,10 @@ public class Log {
|
|||
ignoring == null ? null : Boolean.toString(!ignoring),
|
||||
Boolean.FALSE.equals(ignoring) ? "!!!" : ""));
|
||||
|
||||
PowerManager power = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
|
||||
boolean psaving = power.isPowerSaveMode();
|
||||
sb.append(String.format("Battery saving: %s %s\r\n", psaving, psaving ? "!!!" : ""));
|
||||
|
||||
sb.append(String.format("Charging: %b; level: %d\r\n",
|
||||
Helper.isCharging(context), Helper.getBatteryLevel(context)));
|
||||
|
||||
|
|
Loading…
Reference in a new issue