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

Commit aa96fbbf authored by Jenny Ho's avatar Jenny Ho Committed by Gerrit Code Review
Browse files

Merge "create setChargingPolicy" into main

parents d860f08a cad0f5a1
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -198,6 +198,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);
    }