Commit Graph

963 Commits

Author SHA1 Message Date
Michael Groover
911f7e7aa9 Add unaudited exported flag to exposed runtime receivers
Android T allows apps to declare a runtime receiver as not exported
by invoking registerReceiver with a new RECEIVER_NOT_EXPORTED flag;
receivers registered with this flag will only receive broadcasts from
the platform and the app itself. However to ensure developers can
properly protect their receivers, all apps targeting T or later
registering a receiver for non-system broadcasts must specify either
the exported or not exported flag when invoking #registerReceiver;
if one of these flags is not provided, the platform will throw a
SecurityException. This commit updates all the exposed receivers
with a new RECEIVER_EXPORTED_UNAUDITED flag to maintain the existing
behavior of exporting the receiver while also flagging the receiver
for audit before the T release.

Bug: 161145287
Test: Build
Change-Id: Ie97372efebd8258d9a4c503771d55109a85e6ae9
2021-12-09 20:34:02 -08:00
Etienne Ruffieux
0a3cbd319e Merge "Make BluetoothCodecConfig and BluetoothCodecStatus public" am: 0e1a4d3bdf am: 328169a11c am: 76560b4e5b am: 3a0084534f
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1849631

Change-Id: Ib4065e57d28f4b253c45bb212fb157095a66403e
2021-12-06 16:34:05 +00:00
Etienne Ruffieux
3a0084534f Merge "Make BluetoothCodecConfig and BluetoothCodecStatus public" am: 0e1a4d3bdf am: 328169a11c am: 76560b4e5b
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1849631

Change-Id: I50c12636bb26250d58a6bd69dc1887e304fb876a
2021-12-06 16:18:10 +00:00
Etienne Ruffieux
328169a11c Merge "Make BluetoothCodecConfig and BluetoothCodecStatus public" am: 0e1a4d3bdf
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1849631

Change-Id: I248efd0968d1a4c3207d78c9d015142ba9e02030
2021-12-06 15:40:19 +00:00
Xin Li
bf45599d43 Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918
Bug: 205056467
Merged-In: I9ac05f5da437030e1b5db082ddaf7959f82acccd
Change-Id: Iaf8ebc4877a8276672354b45db0dd502c0f71bd3
2021-11-11 16:54:23 +00:00
Etienne Ruffieux
e004eaa51b Make BluetoothCodecConfig and BluetoothCodecStatus public
Tag: #feature
Bug: 200202780
Test: make RunSettingsRoboTests
Change-Id: I2a81216de050b143cee5c537d899a699d5012330
2021-11-10 10:12:51 +00:00
Jason Chiu
7f6b9e26c9 Merge changes from topic "slice-highlight" into sc-v2-dev am: 6821b6be32 am: 026b1b5df6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16151654

Change-Id: If46903bb26371ea90075d1c6cc063af4d10a88d4
2021-11-02 02:43:42 +00:00
Jason Chiu
026b1b5df6 Merge changes from topic "slice-highlight" into sc-v2-dev am: 6821b6be32
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16151654

Change-Id: Ib03d41631d8bf961fa3ff3957eb5452411da7792
2021-11-02 02:28:16 +00:00
Jason Chiu
2989c50a23 Add highlight menu keys for all toggle pref controllers and custom slices
Bug: 204695404
Test: manual, robotest build pass, unit
Change-Id: Iad2e28ada8ddb766ffa7eff2c8dc581250cbd6f8
2021-11-01 15:00:18 +08:00
Tim Peng
07b3675717 Phone fails to switch channel mode from stereo to mono
-Set codec to SBC when HD audio is off

Bug: 194349060
Test: make -j50 RunSettingsRoboTests

Change-Id: Iae4aa3f1d77350f5b4d91e7a687e048091c1daea
2021-10-29 03:28:14 +00:00
Roopa Sattiraju
04e10ffc28 Merge "Phone fails to switch channel mode from stereo to mono" into stage-aosp-master am: f2295126b6 am: ebc8a9fd1c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15942380

Change-Id: I1261f696aa6d7a74c6b5bcdcc6e961fb7302d760
2021-10-14 18:46:52 +00:00
Tim Peng
9e1455492b Phone fails to switch channel mode from stereo to mono
-Set codec to SBC when HD audio is off

Bug: 194349060
Test: make -j50 RunSettingsRoboTests

Change-Id: Iae4aa3f1d77350f5b4d91e7a687e048091c1daea
Merged-In: Iae4aa3f1d77350f5b4d91e7a687e048091c1daea
(cherry picked from commit 1469626b4a)
2021-09-29 18:57:41 +00:00
TreeHugger Robot
98cad31f2a Merge "Revert "Move Automatic System Updates from Developer Options to ..."" into sc-qpr1-dev am: cc1cc9a5f7 am: 59461a5836 am: 734ad243bf
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15895168

Change-Id: I977c218433b1eb2daf493b6b238293fbe96620f4
2021-09-24 06:25:28 +00:00
TreeHugger Robot
59461a5836 Merge "Revert "Move Automatic System Updates from Developer Options to ..."" into sc-qpr1-dev am: cc1cc9a5f7
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15895168

Change-Id: I869ee6339bce5342b023ca65bba44afc9e594a68
2021-09-24 05:54:39 +00:00
TreeHugger Robot
cc1cc9a5f7 Merge "Revert "Move Automatic System Updates from Developer Options to ..."" into sc-qpr1-dev 2021-09-24 05:44:36 +00:00
Tsung-Mao Fang
b57265fa31 Revert "Move Automatic System Updates from Developer Options to ..."
Revert submission 15552651-cherrypick-automatic-system-update-n9jr24y6ba

Reason for revert: Legal team decided to have this entry in GMS, so we can move this setting item back.
Reverted Changes:
Iaea3e11d9:Move Automatic System Updates from Developer Optio...
I077607a6a:Move Automatic System Updates from Developer Optio...

Change-Id: If000388f2dd0f9e3e06a29dcbdd362181d1bfd47
Bug: 196297425
2021-09-23 09:26:58 +00:00
TreeHugger Robot
1fc8de7343 Merge "Fix QR code scanner layout in "Pair devices over Wi-Fi" page." into sc-qpr1-dev am: 85d20f5957
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15854410

Change-Id: If671b194ea453ac406f280b5fdfe72d62cf1f550
2021-09-22 09:21:58 +00:00
Joshua Duong
c960e8973a Fix QR code scanner layout in "Pair devices over Wi-Fi" page.
The toolbar needs to be disabled to remove the empty space at the top
of the page. Also added the landscape layout xml.

Bug: 193602141
Test: atest SettingsUnitTests and manual

Change-Id: I30368835979b360a8f09e16f70adf57064784517
(cherry picked from commit fd009229e5)
2021-09-17 15:36:32 +00:00
Wilson Wu
395e839b10 Merge "Update settings PrimarySwitchPreference reference" 2021-09-07 02:51:20 +00:00
Wilson Wu
9edf79741d Update settings PrimarySwitchPreference reference
To make InputMethodPreference support 2 target
reference, CL[1] move the PrimarySwitchPreference
into SettingsLib.

Change all PrimarySwitchPreference reference to
Settingslib one and remove the original one.

[1]: Idea3935d95b8d22b00ca89313e9eb3e979e4aa74

Bug: 197705032
Test: Presubmit
Change-Id: I95d111522344bb7cbdd380382e48fe60a5ebc9a2
2021-09-02 13:10:19 +08:00
TreeHugger Robot
622e910981 Merge "Phone fails to switch channel mode from stereo to mono" 2021-09-01 09:47:24 +00:00
Tim Peng
1469626b4a Phone fails to switch channel mode from stereo to mono
-Set codec to SBC when HD audio is off

Bug: 194349060
Test: make -j50 RunSettingsRoboTests

Change-Id: Iae4aa3f1d77350f5b4d91e7a687e048091c1daea
2021-09-01 08:42:30 +00:00
Joshua Duong
12f0a063ac Merge "Fix QR code scanner layout in "Pair devices over Wi-Fi" page." 2021-08-25 15:35:56 +00:00
TreeHugger Robot
b1ca0b6db2 Merge "Move Automatic System Updates from Developer Options to System" into sc-qpr1-dev am: 190603f53d am: a513ecb2da am: 8fc64966fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15552651

Change-Id: Ibc9082d528bbc161f0f8e6177feb6d4ac219eae6
2021-08-18 18:45:56 +00:00
TreeHugger Robot
a513ecb2da Merge "Move Automatic System Updates from Developer Options to System" into sc-qpr1-dev am: 190603f53d
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15552651

Change-Id: Ia854e365a828137bcc3f6d112695ed2b1c051313
2021-08-18 18:12:32 +00:00
Joshua Lewis
d16c016142 Merge "Add JobScheduler support in factor controller" 2021-08-14 01:04:34 +00:00
Joshua
76ca8923ab Add JobScheduler support in factor controller
Initializes the JobScheduler constants string in Global Settings and
takes it through the parsing of creating a map with the key:value pairs
linked to the JobScheduler policy. Also changes the way the getter
methods work to take a factor policy so we can know what policy to
change.

Bug: 195056296
Bug: 195056102
Bug: 195055895

Test: Manual
Change-Id: Id82101b2a045dd14bb8eacfbe51c363b4bafb1ce
2021-08-13 23:44:59 +00:00
Joshua Lewis
a162022d31 Merge "Update AlarmManager Global Settings String" 2021-08-13 22:00:30 +00:00
Joshua
347f58ad6e Update AlarmManager Global Settings String
Implements methods that update the AlarmManager Global Settings String
when the user confirms a value in the Dialog. updateAlarmManagerValue
takes the key of the factor being edited and the edited value enterd by
the user in the dialog assigning it as the current value of the key.
This a new string is then rebuilt with the updated values and assigned
to be the new Settings Global String.

Bug: 195056102
Bug: 195055895

Test: Manual
Change-Id: I5776822c665bdfa052f23099d367ba8cf29743df
2021-08-13 19:16:20 +00:00
Joshua Lewis
385d36ac2d Merge "Parse AM Constants to get keys:value for Dialog" 2021-08-13 16:46:31 +00:00
Tsung-Mao Fang
74b1a46cb1 Move Automatic System Updates from Developer Options to System
- Move the preference to the system xml file.
- DisableAutomaticUpdatesPreferenceController should not
inherit from the developer preference controller now since it's not used
in developer page anymore. Instead, just use toggle preference
controller for changing the state.
- Rewrite the test cases based on new controller.

Test: The ui works well and search can navigate to correct path.
Fix: 196001125
Change-Id: Iaea3e11d9cdbfa073ebd41bc3c84356d564c7e71
2021-08-13 08:11:22 +00:00
Joshua
7b2293ef9a Parse AM Constants to get keys:value for Dialog
Takes the AlarmManager csv string and parsees it for key:value
pairs. These key value pairs are then used to fill in information that
the DialogFragment class needs to display information. An ArrayMap is
used to initialize and store a key and the values associated with it
through a data object class. This data can be retrived in updated by
providing only a key.

Bug: 195056296
Bug: 195056102
Bug: 195055428

Test: Manual
Change-Id: Ia11f41bdd1790f7f3483d33148c251c58243e890
2021-08-13 00:12:24 +00:00
TreeHugger Robot
1d441b72c5 Merge "Update UI when TARE settings revert to default" 2021-08-12 22:52:55 +00:00
Joshua Duong
fd009229e5 Fix QR code scanner layout in "Pair devices over Wi-Fi" page.
The toolbar needs to be disabled to remove the empty space at the top
of the page. Also added the landscape layout xml.

Bug: 193602141
Test: atest SettingsUnitTests and manual

Change-Id: I30368835979b360a8f09e16f70adf57064784517
2021-08-12 18:44:15 +00:00
Joshua Lewis
144f222afb Merge "Create Dialog to edit TARE factors" 2021-08-11 16:54:45 +00:00
Treehugger Robot
4cfaa7d957 Merge "IAdbManager.getPairDevices returns FingerprintAndPairDevice[]." am: fdea2eaffa am: 1079d2160d am: 4d00d08afa am: 57fba3fd53 am: deeda01639
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1780668

Change-Id: I3ae58ec64af90800c4393bd22993d5214070753f
2021-08-10 04:08:06 +00:00
Treehugger Robot
4d00d08afa Merge "IAdbManager.getPairDevices returns FingerprintAndPairDevice[]." am: fdea2eaffa am: 1079d2160d
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1780668

Change-Id: I2c4e3487ce8295d6058a096a446c0014080407c2
2021-08-10 03:19:55 +00:00
Joshua
5ebb245618 Create Dialog to edit TARE factors
This CL is the base framework for creating and adjusting TARE factor
values. TareFactorDialogFragment sets the basic outline for a factor
that uses a DialogBox to adjust the value. It takes the "title" or name
of the factor, the key that will be associated with the factor, and an
initial value for the factor; then sets up everything so that the factor
value can be easily changed and stored. These factors are also
registered into the settings observer class.

Bug: 195055619
Bug: 193238774

Test: Manual (Made a temporary class instance of the DialogFragment and
showed it in inactive apps onResume())

Change-Id: I3bb67717175e70eab3bbb11f4a42ee63a42f60bc
2021-08-09 19:45:25 +00:00
alinasuarez
9dc7f45725 Update UI when TARE settings revert to default
When the TARE revert to default button is clicked, the TARE homepage
updates to the value of the DEFAULT_ENABLE_TARE global variable with this code.

Bug: 195543827

Test: Manual (Settings -> developer options -> TARE -> click revert to
default settings and see the page disabled)

Change-Id: Ia4d126d97ebfb35fbf831bb29cee302acad92e7c
2021-08-06 15:44:41 +00:00
alinasuarez
1031bb2693 TARE Global Toggle
Add functionality to the global toggle within the TARE homepage in the
developer settings. This allows for users and developers to turn these
settings on/off.

Bug: 195552339

Test: Manual (open Settings > System > Developer Options > TARE > turn
on/off the global toggle and leave and go back and make sure it is being
kept track of correctly)

Change-Id: Ifb8dee1aeb04d2b6883ee9e449ed8ab0493dc27a
2021-08-05 15:33:52 +00:00
alinasuarez
e2d2f44888 Revert to Default Settings
Add functionality to the revert default settings button. This currently
writes a null value to the ENABLE_TARE constant. In the future this will
also make the AlarmManager and JobScheduler constants null so that the
default values are used instead of custom config values.

Bug: 195543827

Test: Click on revert to default settings button, check that the value
for ENABLE_TARE is null by running "adb shell settings get global
enable_tare" in the command line

Change-Id: I558e8f1121021eca3224e4bc9b26bbe0dd2467c7
2021-08-04 20:39:09 +00:00
TreeHugger Robot
cbacb4aec0 Merge "Handle blobs and leases that never expire correctly." 2021-08-04 16:05:31 +00:00
TreeHugger Robot
a59a192625 Merge "Job Scheduler TARE page implementation" 2021-08-04 15:54:12 +00:00
Yifan Hong
045354fa8c Merge "PairDevice to structured Parcelable." am: f7ff663887 am: eddbc8a356 am: bbd851fea7 am: e3aecc8290
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1780667

Change-Id: Ib469a94982990b0cb98a9146a7a4da474f0bbe20
2021-08-04 00:37:59 +00:00
Yifan Hong
bbd851fea7 Merge "PairDevice to structured Parcelable." am: f7ff663887 am: eddbc8a356
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1780667

Change-Id: Ife1bbb4e839ee6115b2809113c715068cdb94e59
2021-08-04 00:07:38 +00:00
Yifan Hong
1b586ec8dc IAdbManager.getPairDevices returns FingerprintAndPairDevice[].
Map is not supported in C++ backend. To compile IAdbManager in C++,
Map is translated into a list of key, value tuples.

Test: pass
Bug: 190867939
Change-Id: I1a057306161a4f8eaef33e3c40b1db9494aea3e5
2021-08-03 14:05:32 -07:00
Yifan Hong
d61750990d PairDevice to structured Parcelable.
Bug: 194829333
Test: pass
Change-Id: I202ae5aa16d4323afa2a48cc3070f8e13c701efd
2021-08-03 14:05:31 -07:00
Varun Shah
eefce6a1f3 Handle blobs and leases that never expire correctly.
Add logic to properly handle blobs and leases that never expire.

Also add the relevant strings required in this package.

Fixes: 194439893
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SharedDataPreferenceControllerTest
Test: manual (visual)
Change-Id: Ifeb216a92a3be8d1db3574b4f63e2d04adace4ea
2021-08-03 12:09:14 -07:00
alinasuarez
8073d4eb92 Job Scheduler TARE page implementation
A Job Scheduler policy page is needed in the TARE developer options
settings to allow developers to both view and edit the current values of
all the factors under the job scheduler policy. The page uses a dropdown
so that the user can easily switch between the different policies. For
the factors with subfactors, the user simply clicks on the factor and
the subfactors wil pop up under it.

Bug: 191877052

Test: Manual (open Settings > System > Developer Options > TARE >
JobScheduler and verify all factors are there)

Change-Id: Icea6cda5e4b59d1736f85defcb9532839c3720f5
2021-08-03 02:26:19 +00:00
alinasuarez
aef6ac2889 Alarm Manager policy TARE page implementation
An alarm manager policy page is needed in the TARE developer option
settings to allow developers to both view and edit the current values of
all the factors under the alarm manager policy. The page uses a dropdown
so that the user can easily switch between the different policies. For
the factors with subfactors, the user simply clicks on the factor and
the subfactors will pop up under it.

Bug: 191876714
Bug: 191876567

Test: Manual (open Settings > System > Developer Options > TARE > Alarm
Manger and verify all factors are there)

Change-Id: Ie036e26df80947d23041bedfd5b1385e48069b6b
2021-08-02 17:39:36 +00:00