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

Commit 21ae4c48 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Allow updating app updater balance increments."

parents a6aa1693 f5572684
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -11751,6 +11751,10 @@
    Balance is the same meaning as having money in a bank account.
    Remaining apps are those apps that don't fit into predefined categories. [CHAR LIMIT=80]-->
    <string name="tare_min_balance_other_app">Minimum Satiated Balance (Remaining Apps)</string>
    <!-- Title for the TARE factor that app updaters (for example, an app store) additional
    credits. "Satiated" in this context means that the battery is fully charged.
    Balance is the same meaning as having money in a bank account. [CHAR LIMIT=80]-->
    <string name="tare_min_balance_addition_app_updater">Minimum Satiated Balance Addition (App Updaters)</string>
    <!-- Titles for the minimum satiated credit balances for different types of apps
    (per battery cycle). Satiated means battery is fully charged. [CHAR LIMIT=40]-->
    <string-array name="tare_app_balance_subfactors" translatable="false">
@@ -11759,6 +11763,15 @@
        <item>@string/tare_min_balance_headless_app</item>
        <item>@string/tare_min_balance_other_app</item>
    </string-array>
    <!-- Titles for the minimum satiated credit balances for different types of apps
    (per battery cycle). Satiated means battery is fully charged. [CHAR LIMIT=40]-->
    <string-array name="tare_job_scheduler_app_balance_subfactors" translatable="false">
        <item>@string/tare_max_satiated_balance</item>
        <item>@string/tare_min_balance_exempted</item>
        <item>@string/tare_min_balance_headless_app</item>
        <item>@string/tare_min_balance_other_app</item>
        <item>@string/tare_min_balance_addition_app_updater</item>
    </string-array>
    <!-- Various modifier subfactors that alter the cost of TARE tasks depending on what battery
    state the device is in [CHAR LIMIT=50]-->
    <string-array name="tare_modifiers_subfactors">
+3 −2
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ public class JobSchedulerFragment extends Fragment implements

        mChildren = new String[][]{
                resources.getStringArray(R.array.tare_consumption_limit_subfactors),
                resources.getStringArray(R.array.tare_app_balance_subfactors),
                resources.getStringArray(R.array.tare_job_scheduler_app_balance_subfactors),
                // TODO: support
                // mResources.getStringArray(R.array.tare_modifiers_subfactors),
                resources.getStringArray(R.array.tare_job_scheduler_actions),
@@ -124,7 +124,8 @@ public class JobSchedulerFragment extends Fragment implements
                        EconomyManager.KEY_JS_MAX_SATIATED_BALANCE,
                        EconomyManager.KEY_JS_MIN_SATIATED_BALANCE_EXEMPTED,
                        EconomyManager.KEY_JS_MIN_SATIATED_BALANCE_HEADLESS_SYSTEM_APP,
                        EconomyManager.KEY_JS_MIN_SATIATED_BALANCE_OTHER_APP
                        EconomyManager.KEY_JS_MIN_SATIATED_BALANCE_OTHER_APP,
                        EconomyManager.KEY_JS_MIN_SATIATED_BALANCE_INCREMENT_APP_UPDATER,
                },
                // {},
                {
+5 −0
Original line number Diff line number Diff line
@@ -293,6 +293,11 @@ public class TareFactorController {
                new TareFactorData(mResources.getString(R.string.tare_min_balance_other_app),
                        EconomyManager.DEFAULT_JS_MIN_SATIATED_BALANCE_OTHER_APP_CAKES,
                        POLICY_JOB_SCHEDULER));
        mJobSchedulerMap.put(EconomyManager.KEY_JS_MIN_SATIATED_BALANCE_INCREMENT_APP_UPDATER,
                new TareFactorData(
                        mResources.getString(R.string.tare_min_balance_addition_app_updater),
                        EconomyManager.DEFAULT_JS_MIN_SATIATED_BALANCE_INCREMENT_APP_UPDATER_CAKES,
                        POLICY_JOB_SCHEDULER));
        mJobSchedulerMap.put(EconomyManager.KEY_JS_MAX_SATIATED_BALANCE,
                new TareFactorData(mResources.getString(R.string.tare_max_satiated_balance),
                        EconomyManager.DEFAULT_JS_MAX_SATIATED_BALANCE_CAKES,