Make final factors configurable.
1. Add configuration support for the ongoing rewards (that are normally less than 1 ARC). 2. Fix key/configuration of instant rewards 3. Fix UI string issue Bug: 158300259 Bug: 189850067 Bug: 191876714 Bug: 191877052 Test: Use UI to change factors. Check Settings via adb and TARE dumpsys Change-Id: I571e188faa6915ea74826b725c9883a825ab152a
This commit is contained in:
42
res/layout/dialog_edittext_dropdown.xml
Normal file
42
res/layout/dialog_edittext_dropdown.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?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>
|
||||
@@ -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"
|
||||
|
||||
@@ -13858,6 +13858,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
|
||||
@@ -13908,7 +13912,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>
|
||||
@@ -14075,6 +14079,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] -->
|
||||
|
||||
Reference in New Issue
Block a user