Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6b3293a authored by Jenny Ho's avatar Jenny Ho Committed by Automerger Merge Worker
Browse files

Merge "create setChargingPolicy" into main am: aa96fbbf am: f026ce47

parents d07f45a2 f026ce47
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -212,6 +212,16 @@ class HealthServiceWrapperAidl extends HealthServiceWrapper {
        }
    }

    public void setChargingPolicy(int policy) throws RemoteException {
        IHealth service = mLastService.get();
        if (service == null) return;
        try {
            service.setChargingPolicy(policy);
        } catch (UnsupportedOperationException | ServiceSpecificException ex) {
            return;
        }
    }

    private static void traceBegin(String name) {
        Trace.traceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, name);
    }