public double getLevel ( ) { final Object value = getInput ( ) . get ( "level" ) ; if ( value instanceof Long ) { return ( ( Long ) value ) . doubleValue ( ) ; } return ( double ) value ; }
Returns battery level .