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

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

Merge "Make final factors configurable." into tm-dev

parents 0e861f09 d7189cc7
Loading
Loading
Loading
Loading
+42 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2022 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:paddingStart="20dp"
    android:paddingEnd="20dp"
    android:paddingTop="16dp"
    android:paddingBottom="12dp">

    <EditText
        android:id="@+id/edittext"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:inputType="textCapSentences"
        android:minHeight="@dimen/min_tap_target_size"
        android:maxLength="50"
        android:singleLine="true" />

    <Spinner
        android:id="@+id/spinner"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:minHeight="@dimen/min_tap_target_size" />
</LinearLayout>
+3 −1
Original line number Diff line number Diff line
@@ -27,7 +27,9 @@
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="20dp"
        android:text="On"
        android:textOff="@string/tare_off"
        android:textOn="@string/tare_on"
        android:showText="true"
        android:background="?android:attr/colorBackground" />
    <TextView
        android:id="@+id/alarmmanager"
+12 −1
Original line number Diff line number Diff line
@@ -13842,6 +13842,10 @@
    <!-- TARE settings title in developer options; "TARE" is the name of the feature and cannot be
     translated. [CHAR LIMIT=40] -->
    <string name="tare_settings">TARE Settings</string>
    <!-- Summary for the TARE feature being on (ie. enabled) [CHAR LIMIT=NONE] -->
    <string name="tare_on">On</string>
    <!-- Summary for the TARE feature being off (ie. disabled) [CHAR LIMIT=NONE] -->
    <string name="tare_off">Off</string>
    <!-- Allows user to revert the TARE settings to their default values [CHAR LIMIT=40] -->
    <string name="tare_revert">Revert to Default Settings</string>
    <!-- Allows user to view AlarmManager policy factors. Alarm in this context is referring to the
@@ -13892,7 +13896,7 @@
    <string name="tare_rewards_instantaneous">Rewards per single event</string>
    <!-- Title for the rewards apps can obtain for the total duration (in seconds) of an event that
    implies the user finds the app behavior useful. [CHAR LIMIT=40]-->
    <string name="tare_rewards_ongoing">Rewards for total event duration</string>
    <string name="tare_rewards_ongoing">Rewards per second of event duration</string>
    <!-- Title for the max rewards apps can obtain within a 24 hour period for different actions
    that benefit the user. [CHAR LIMIT=40]-->
    <string name="tare_rewards_max">Maximum Rewards Per Day</string>
@@ -14059,6 +14063,13 @@
    </string-array>
    <!-- TARE dialog button to proceed with a value change [CHAR LIMIT=none] -->
    <string name="tare_dialog_confirm_button_title">Confirm</string>
    <!-- Array used to populate dropdown menu to select the units of the factor value. Not
    translatable since they're base units. [CHAR LIMIT=40]-->
    <string-array name="tare_units" translatable="false">
        <item>ARC</item>
        <item>Cake</item>
    </string-array>
    <!-- Button to preview the selected screensaver in settings [CHAR LIMIT=40] -->
    <string name="dream_preview_button_title">Preview</string>
    <!-- The title of the category to show for the screensaver selector in settings [CHAR LIMIT=none] -->
+8 −5
Original line number Diff line number Diff line
@@ -98,6 +98,7 @@ public class AlarmManagerFragment extends Fragment implements
                resources.getString(R.string.tare_actions_ctp),
                resources.getString(R.string.tare_actions_base_price),
                resources.getString(R.string.tare_rewards_instantaneous),
                resources.getString(R.string.tare_rewards_ongoing),
                resources.getString(R.string.tare_rewards_max)
        };

@@ -109,6 +110,7 @@ public class AlarmManagerFragment extends Fragment implements
                resources.getStringArray(R.array.tare_alarm_manager_actions),
                resources.getStringArray(R.array.tare_alarm_manager_actions),
                resources.getStringArray(R.array.tare_rewards_subfactors),
                {resources.getString(R.string.tare_top_activity)},
                resources.getStringArray(R.array.tare_rewards_subfactors)
        };

@@ -150,12 +152,13 @@ public class AlarmManagerFragment extends Fragment implements
                        EconomyManager.KEY_AM_ACTION_ALARM_ALARMCLOCK_BASE_PRICE
                },
                {
                        EconomyManager.KEY_AM_REWARD_TOP_ACTIVITY_MAX,
                        EconomyManager.KEY_AM_REWARD_NOTIFICATION_SEEN_MAX,
                        EconomyManager.KEY_AM_REWARD_NOTIFICATION_INTERACTION_MAX,
                        EconomyManager.KEY_AM_REWARD_WIDGET_INTERACTION_MAX,
                        EconomyManager.KEY_AM_REWARD_OTHER_USER_INTERACTION_MAX,
                        EconomyManager.KEY_AM_REWARD_TOP_ACTIVITY_INSTANT,
                        EconomyManager.KEY_AM_REWARD_NOTIFICATION_SEEN_INSTANT,
                        EconomyManager.KEY_AM_REWARD_NOTIFICATION_INTERACTION_INSTANT,
                        EconomyManager.KEY_AM_REWARD_WIDGET_INTERACTION_INSTANT,
                        EconomyManager.KEY_AM_REWARD_OTHER_USER_INTERACTION_INSTANT,
                },
                {EconomyManager.KEY_AM_REWARD_TOP_ACTIVITY_ONGOING},
                {
                        EconomyManager.KEY_AM_REWARD_TOP_ACTIVITY_MAX,
                        EconomyManager.KEY_AM_REWARD_NOTIFICATION_SEEN_MAX,
+8 −8
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ public class JobSchedulerFragment extends Fragment implements
                resources.getString(R.string.tare_actions_ctp),
                resources.getString(R.string.tare_actions_base_price),
                resources.getString(R.string.tare_rewards_instantaneous),
                // resources.getString(R.string.tare_rewards_ongoing),
                resources.getString(R.string.tare_rewards_ongoing),
                resources.getString(R.string.tare_rewards_max)
        };

@@ -111,7 +111,7 @@ public class JobSchedulerFragment extends Fragment implements
                resources.getStringArray(R.array.tare_job_scheduler_actions),
                resources.getStringArray(R.array.tare_job_scheduler_actions),
                resources.getStringArray(R.array.tare_rewards_subfactors),
                // {resources.getString(R.string.tare_top_activity)},
                {resources.getString(R.string.tare_top_activity)},
                resources.getStringArray(R.array.tare_rewards_subfactors)
        };

@@ -154,13 +154,13 @@ public class JobSchedulerFragment extends Fragment implements
                        EconomyManager.KEY_JS_ACTION_JOB_TIMEOUT_PENALTY_BASE_PRICE
                },
                {
                        EconomyManager.KEY_JS_REWARD_TOP_ACTIVITY_MAX,
                        EconomyManager.KEY_JS_REWARD_NOTIFICATION_SEEN_MAX,
                        EconomyManager.KEY_JS_REWARD_NOTIFICATION_INTERACTION_MAX,
                        EconomyManager.KEY_JS_REWARD_WIDGET_INTERACTION_MAX,
                        EconomyManager.KEY_JS_REWARD_OTHER_USER_INTERACTION_MAX,
                        EconomyManager.KEY_JS_REWARD_TOP_ACTIVITY_INSTANT,
                        EconomyManager.KEY_JS_REWARD_NOTIFICATION_SEEN_INSTANT,
                        EconomyManager.KEY_JS_REWARD_NOTIFICATION_INTERACTION_INSTANT,
                        EconomyManager.KEY_JS_REWARD_WIDGET_INTERACTION_INSTANT,
                        EconomyManager.KEY_JS_REWARD_OTHER_USER_INTERACTION_INSTANT,
                },
                // {EconomyManager.KEY_JS_REWARD_TOP_ACTIVITY_ONGOING},
                {EconomyManager.KEY_JS_REWARD_TOP_ACTIVITY_ONGOING},
                {
                        EconomyManager.KEY_JS_REWARD_TOP_ACTIVITY_MAX,
                        EconomyManager.KEY_JS_REWARD_NOTIFICATION_SEEN_MAX,
Loading