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

Commit fcd259d2 authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Reduce the overhead of historical appops

- Use cheaper round method

Fixes: 164465976
Test: TH
Change-Id: I2c661b94ee4a87f96620bde25b2dfae297dc1f5e
parent f747948b
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -81,8 +81,6 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.reflect.Method;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
@@ -5021,8 +5019,7 @@ public class AppOpsManager {
         * @hide
         */
        public static double round(double value) {
            final BigDecimal decimalScale = new BigDecimal(value);
            return decimalScale.setScale(0, RoundingMode.HALF_UP).doubleValue();
            return Math.floor(value + 0.5);
        }

        @Override