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

Commit 39c9441b authored by Kweku Adams's avatar Kweku Adams Committed by Android (Google) Code Review
Browse files

Merge "Allow modifying minimum consumption limit."

parents d2569ff1 f6f9a4b7
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -11586,13 +11586,17 @@
    <!-- Title for the TARE policy factor that determines the initial maximum amount of credits that
    can be consumed by all the apps [CHAR LIMIT=80]-->
    <string name="tare_initial_consumption_limit">Initial Consumption Limit</string>
    <!-- Title for the TARE policy factor that determines the minimum consumption limit the system
     can have [CHAR LIMIT=80]-->
    <string name="tare_min_consumption_limit">Minimum Consumption Limit</string>
    <!-- Title for the TARE policy factor that determines the maximum consumption limit the system
     can have [CHAR LIMIT=80]-->
    <string name="tare_hard_consumption_limit">Maximum Consumption Limit</string>
    <string name="tare_max_consumption_limit">Maximum Consumption Limit</string>
    <!-- Titles for the consumption limits factors. [CHAR LIMIT=40]-->
    <string-array name="tare_consumption_limit_subfactors" translatable="false">
        <item>@string/tare_initial_consumption_limit</item>
        <item>@string/tare_hard_consumption_limit</item>
        <item>@string/tare_min_consumption_limit</item>
        <item>@string/tare_max_consumption_limit</item>
    </string-array>
    <!-- Title for the various modifiers that alter the cost of TARE tasks based on battery status
    (charging, power save mode, etc.) [CHAR LIMIT=40]-->
+2 −1
Original line number Diff line number Diff line
@@ -117,7 +117,8 @@ public class AlarmManagerFragment extends Fragment implements
        mKeys = new String[][]{
                {
                        EconomyManager.KEY_AM_INITIAL_CONSUMPTION_LIMIT,
                        EconomyManager.KEY_AM_HARD_CONSUMPTION_LIMIT
                        EconomyManager.KEY_AM_MIN_CONSUMPTION_LIMIT,
                        EconomyManager.KEY_AM_MAX_CONSUMPTION_LIMIT,
                },
                {
                        EconomyManager.KEY_AM_MAX_SATIATED_BALANCE,
+2 −1
Original line number Diff line number Diff line
@@ -118,7 +118,8 @@ public class JobSchedulerFragment extends Fragment implements
        mKeys = new String[][]{
                {
                        EconomyManager.KEY_JS_INITIAL_CONSUMPTION_LIMIT,
                        EconomyManager.KEY_JS_HARD_CONSUMPTION_LIMIT
                        EconomyManager.KEY_JS_MIN_CONSUMPTION_LIMIT,
                        EconomyManager.KEY_JS_MAX_CONSUMPTION_LIMIT,
                },
                {
                        EconomyManager.KEY_JS_MAX_SATIATED_BALANCE,
+14 −6
Original line number Diff line number Diff line
@@ -117,9 +117,13 @@ public class TareFactorController {
                new TareFactorData(mResources.getString(R.string.tare_initial_consumption_limit),
                        EconomyManager.DEFAULT_AM_INITIAL_CONSUMPTION_LIMIT_CAKES,
                        POLICY_ALARM_MANAGER));
        mAlarmManagerMap.put(EconomyManager.KEY_AM_HARD_CONSUMPTION_LIMIT,
                new TareFactorData(mResources.getString(R.string.tare_hard_consumption_limit),
                        EconomyManager.DEFAULT_AM_HARD_CONSUMPTION_LIMIT_CAKES,
        mAlarmManagerMap.put(EconomyManager.KEY_AM_MIN_CONSUMPTION_LIMIT,
                new TareFactorData(mResources.getString(R.string.tare_min_consumption_limit),
                        EconomyManager.DEFAULT_AM_MIN_CONSUMPTION_LIMIT_CAKES,
                        POLICY_ALARM_MANAGER));
        mAlarmManagerMap.put(EconomyManager.KEY_AM_MAX_CONSUMPTION_LIMIT,
                new TareFactorData(mResources.getString(R.string.tare_max_consumption_limit),
                        EconomyManager.DEFAULT_AM_MAX_CONSUMPTION_LIMIT_CAKES,
                        POLICY_ALARM_MANAGER));
        mAlarmManagerMap.put(EconomyManager.KEY_AM_REWARD_TOP_ACTIVITY_INSTANT,
                new TareFactorData(mResources.getString(R.string.tare_top_activity),
@@ -306,9 +310,13 @@ public class TareFactorController {
                new TareFactorData(mResources.getString(R.string.tare_initial_consumption_limit),
                        EconomyManager.DEFAULT_JS_INITIAL_CONSUMPTION_LIMIT_CAKES,
                        POLICY_JOB_SCHEDULER));
        mJobSchedulerMap.put(EconomyManager.KEY_JS_HARD_CONSUMPTION_LIMIT,
                new TareFactorData(mResources.getString(R.string.tare_hard_consumption_limit),
                        EconomyManager.DEFAULT_JS_HARD_CONSUMPTION_LIMIT_CAKES,
        mJobSchedulerMap.put(EconomyManager.KEY_JS_MIN_CONSUMPTION_LIMIT,
                new TareFactorData(mResources.getString(R.string.tare_min_consumption_limit),
                        EconomyManager.DEFAULT_JS_MIN_CONSUMPTION_LIMIT_CAKES,
                        POLICY_JOB_SCHEDULER));
        mJobSchedulerMap.put(EconomyManager.KEY_JS_MAX_CONSUMPTION_LIMIT,
                new TareFactorData(mResources.getString(R.string.tare_max_consumption_limit),
                        EconomyManager.DEFAULT_JS_MAX_CONSUMPTION_LIMIT_CAKES,
                        POLICY_JOB_SCHEDULER));
        mJobSchedulerMap.put(EconomyManager.KEY_JS_REWARD_APP_INSTALL_INSTANT,
                new TareFactorData(mResources.getString(R.string.tare_app_install),