Bluetooth app will indicate BluetoothOppReceiver to receive
device picker intent. But for fix the security issue we
removed the setClassName() method in ag/14111132 to avoid attack.
It causes BluetoothOppReceiver cannot receive the intent.
This CL will compare to calling package name with launch package name.
If they are not equal, the setClassName() will not invoke.
Bug: 186490534
Bug: 179386960
Bug: 179386068
Test: make RunSettingsRoboTests -j56
Change-Id: Ia51528f2a44ab73edbc86899ca0846d3262fe1f0
(cherry picked from commit bb5be240c0)
- Show restricted text in guest mode
- Screenshot:
https://screenshot.googleplex.com/6nYcmazMM46TxaB
Bug: 177573895
Test: manual test
make RunSettingsRoboTests \
ROBOTEST_FILTER=WifiNetworkDetailsFragmentTest
Change-Id: I5f857b2079e0f550e4be601d27dd54dac56b2f57
BluetoothPermissionActivity and DevicePickerFragment will send
broadcast to return the result to calling apps. As this broadcast
intent is from Settings with uid 1000, it will be sent to any
protected BroadcastReceivers in the device. It can make an attacker
send broadcast to protected BroadcastReceivers like factory reset intent
(android/com.android.server.MasterClearReceiver) via
BluetoothPermissionActivity or DevicePickerFragment.
This CL will not allow to set package name and class name to avoid
the attacker.
Bug: 179386960
Bug: 179386068
Test: make -j42 RunSettingsRoboTests and use test apk to manually test
to verify factory reset not started and no system UI notification.
Change-Id: Id27a78091ab578077853b8fbb97a4422cff0a158
(cherry picked from commit 8adedc6249)
When initialized SimStatusDialogController, also create TelephonyManager
with sub id.
Bug: 174171839
Test: Manual test passed, see b/174171839#25
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SimStatusDialogControllerTest passed
Change-Id: I6bd6975e39c75884252b9d0bcd9d5548dbdfe6d5
Merged-In: I6bd6975e39c75884252b9d0bcd9d5548dbdfe6d5
Bug: 172009945
Test: Trigger adaptive charging and verify string in menu
Change-Id: Iba2d81e779e2b4aaa3c7b7c38710a03c6792c4a9
Merged-In: Iba2d81e779e2b4aaa3c7b7c38710a03c6792c4a9
(cherry picked from commit b60870cb7d)
canSubscriptionBeDisplayed is more readable.
Reasonale:
When cherry-picking ag/12886476 into Android R branch (ag/13209427), a comment from code reviewer suggested this change.
Since ag/12886476 has been merged for a while, another patch for it is perferred option when comparing with reverting that CL and resubmit it.
Bug: 175830728
Change-Id: Ie91eb82504fd7cff6671803a2bc2560139690952
Test: build pass
Merged-In: Ie91eb82504fd7cff6671803a2bc2560139690952
Some carrier(s) expand their service through providing eSIM in companion
with pSIM. Group UUID is designed to group them together as a single
SIM.
Bug: 169455114
Bug: 175069803
Test: make RunSettingsRoboTests ROBOTEST_FILTER=SubscriptionsPreferenceControllerTest
Change-Id: I0934a45a2917ab106627c733162efbee9a13f216
(cherry picked from commit a6b249d625)
Merged-In: I0934a45a2917ab106627c733162efbee9a13f216
When configuring CBRS profiles this dialog / notification will be
dismissed after configuration is done, to avoid confusion.
Bug: 142092510
Test: manual and unittest
Change-Id: Iaf30062f555ec2c119c4aafd6aa013e73b5253f0
Merged-In: Iaf30062f555ec2c119c4aafd6aa013e73b5253f0
Before this CL, we only compare whether the value of function is
equal to accessory to ensure usb is in accessory mode. But in some
cases there are different accessory combinations, like
"accessory,audio source". It will make the condition return false
when encountering accessory combinations.
This CL will check whether the function will include accessory mode
to fix this issue.
Bug: 162451162
Test: make -j42 RunSettingsRoboTests
Change-Id: I7c80f02de5340799e292949608e19b86b187b982
Merged-In: I7c80f02de5340799e292949608e19b86b187b982
(cherry picked from commit 7d71081d45)
- Before this CL, the device will be disconnected and reconnected
to accessory mode when choosing "File transfer/Android Auto" in
accessory mode. Because the USB menu didn't check state of
function, it should do nothing when choosing
"File transfer/Android Auto" in accessory mode.
This CL add condition to check state of function, it will do
nothing when choosing "File transfer/Android Auto" in
accessory mode.
Bug: 162451162
Test: make -j42 RunSettingsRoboTests
Change-Id: I1749c6c43d2a192e4ce1bf1ae5343ff8deafbe48
Merged-In: I1749c6c43d2a192e4ce1bf1ae5343ff8deafbe48
(cherry picked from commit 3251a04ba3)
- Before this CL, the usb receivers didn't check the extra information
of the accessory. It causes the usb menu not to be aware that the
usb port is switched to accessory mode.
In this CL, the receivers will check whether the intent has an
accessory extra. If the usb port is switched to accessory mode
the usb menu will switch to "File Transfer/Android Auto".
Bug: 162451162
Test: make -j42 RunSettingsRoboTests
Change-Id: I0eca89a23670c674b74753fc526256cc1d52e759
Merged-In: I0eca89a23670c674b74753fc526256cc1d52e759
(cherry picked from commit af0a45bb7a)
* changes:
Redirect to output switcher panel to the new dialog
Update rule of launching media output dialog
Update OutputSwitcher from MediaOutputSlice to MediaOutputDialog in Settings
Add PairNewBluetoothReceiver to launch Bluetooth pairing page
- Adding new tips of Battery Defender, will be presented once battery is overheated
- Launch Help Center article of battery overheat when clicking Battery Defender tip
Screenshots: https://screenshot.googleplex.com/7jUibTJANgR6UQ6.pnghttps://screenshot.googleplex.com/tUj2LLi87SfndBN.png
Bug: 172794045
Bug: 173497281
Bug: 173496188
Test: make RunSettingsRoboTests -j40
Merged-In: Ibb106a5d42cdf6232abf9ddf4b3225bdcebccf4a
Change-Id: Id400cec248a87dd27194d93bdf035e43bbcb7f4f
Before this CL, we didn't check whether the remote session existed
in the list before. If the priority of a remote session is higher than
a local session, it causes us to return the local session even if
the list has a remote session.
This CL uses a list to cache package names of remote sessions.
If the local session has the same package name of the remote session
then don't return the local session.
Bug: 169052790
Test: make -j42 RunSettingsRoboTests
Change-Id: I2726a3deb397f646e4c74a8c445dde6fafb694a8
Merged-In: I2726a3deb397f646e4c74a8c445dde6fafb694a8
(cherry picked from commit 3a7293cbbf)
-Redirect for Cast button
-Send intent when call MediaOutputPanel::create()
-Return null to finish the activity
Bug: 172178632
Test: make -j50 RunSettingsRoboTests
Merged-In: I1038e237113f433c847aff98a45b1dd6089d80a8
Change-Id: I1038e237113f433c847aff98a45b1dd6089d80a8
-Do not hide Media Output Dialog in Settings, and let dialog handles
-Hide Media output slice panel when launching dialog
Bug: 155822415
Test: make -j50 RunSettingsRoboTests
Merged-In: I16732f625f100b259d6e53c85db40af0ec1652c5
Change-Id: I16732f625f100b259d6e53c85db40af0ec1652c5
-Update entry point at media indicator in volume panel
-Update entry point at remote media slice in volume panel
-Update entry point at remote volume group in Sound Settings
-Update entry point at media output preference in Sound Settings
-Hide Media output dialog when the caller is not active
Bug: 155822415
Test: make -j50 RunSettingsRoboTests
Merged-In: Ib6c86067522925c439f336644e4d027dbae3379c
Change-Id: Ib6c86067522925c439f336644e4d027dbae3379c
Before this CL, output switcher will show 2 media sessions when
some apps are remote playing. The root cause is some apps will
also create local media sessions when they cast media to remote
playing.
This CL add condition to only show remote sessions on output switcher
if apps both have remote and local sessions.
Bug: 169052790
Test: make -j42 RunSettingsRoboTests
Change-Id: I80479d35b2bb2e353cf41f41f457f2dfd15cadbf
Merged-In: I80479d35b2bb2e353cf41f41f457f2dfd15cadbf
(cherry picked from commit e16a8077b5)
Since Bedtime mode can suppress AoD, after reviewed by UX, we decide
update the summary to "Unavailable because Bedtime mode is on" when AoD
is suppressed by Bedtime mode.
Bug: 168790245
Test: manual & robotest
Change-Id: I96b401bcba213598344c4c4f01b12c275304b809
Merged-In: Id2511cb0ad93b44f6bf701a707b7ddef9438653d
Revert "Update the summary of Idle lock screen when Bedtime mode..."
Revert submission 13071396-cherrypick-cherrypick-bedtime-hpxwlbiuim-0q85x8kaar
Reason for revert: Broken test b/173663404
Reverted Changes:
Id2511cb0a:Update the summary of AoD when Bedtime mode is on
I041599b9c:Update the summary of Idle lock screen when Bedtim...
Bug: 173663404
Change-Id: I9bea7499393d3ab1733b82140942499dddd9a2aa
Merged-In: I3b7053ad752f548f421dcca10cc1203500b1220b
Since Bedtime mode can suppress AoD, after reviewed by UX, we decide
update the summary to "Unavailable because Bedtime mode is on" when AoD
is suppressed by Bedtime mode.
Bug: 168790245
Test: manual & robotest
Change-Id: Id2511cb0ad93b44f6bf701a707b7ddef9438653d
Merged-In: Id2511cb0ad93b44f6bf701a707b7ddef9438653d
- When the saved certificate is loaded into the UI, the EAP method
spinner will trigger a redundant item selection event to refresh the
certificate to the default value.
- Filter out redundant item selection event of the EAP method spinner.
- Analysis report:
https://docs.google.com/document/d/1uzyO0NQsT0PVT-ZKbWtDTt4KRXvm3L994MmZTXZ4d5Y/edit?usp=sharing
Bug: 161569880
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=WifiConfigController2Test
Merged-In: I947fb7668ffa7e9ed8c150fe14e6ae9d7a67393c
Change-Id: I00b73b4bfc078aca37396aab4c802a3de64318cf
This change is to update the related UI in the battery page if the
battery is not present. This includes the following updates:
1. Update the summary of battery tile in the Settings homepage
2. Replace the battery level with "Unknown"
3. Replace the summary with help message in the battery page
4. Remove the battery meter icon
Bug: 171368508
Test: verify on an issue device
Change-Id: I892e0d137143160a0bce0c11ce9265120ebb8fd4
Merged-In: I892e0d137143160a0bce0c11ce9265120ebb8fd4
- The WifiEntry info might not be ready in early stage. (ex:
WifiEntry#canSetPrivacy())
- The Wi-Fi detailed setting listens to the WifiEntry callback to
refresh the preferences, it should first update the preference status to
be editable or not, and then display preferences to the UI.
- The privicy preference should be able to set back to selectable when
WifiEntry#canSetPrivicy() change from false to true.
Bug: 170148009
Test:
make RunSettingsRoboTests
ROBOTEST_FILTER=WifiNetworkDetailsFragment2Test
make RunSettingsRoboTests
ROBOTEST_FILTER=WifiPrivacyPreferenceController2Test
Change-Id: I48ca060e6b468232f19c82e9de0ce4fce39cba7f
Merged-In: I567b2b80163631a01d165c0ac5c0aba392e014ef
The carrier config nr_enabled_bool is false, preferred network mode
should hide 5G UI. This bug is that the summary show 5G item when
nr_enabled_bool is false.
Solution: if nr_enabled_bool is false, it checks capability and then
removes 5G capability of network mode.
Bug: 170460943
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
EnabledNetworkModePreferenceControllerTest (PASS)
Change-Id: I3f7d41c196569c0cb61e89cfc270b957e2f0add5
There are currently no callers of the setSubscriptionPlan() API that
have a MDP app set up. Remove the button when SubscriptionPlans are
defined, since it does nothing and causes confusion for users.
Test: manually verify button does not exist when a plan is defined
Test: make RunSettingsRoboTests
Bug: 169806315
Change-Id: Ieda020bfa692e9465d6297e50cf338deff91a8a9
- Before this CL, users can share their mobile data through enabling
tethering in the USB menu when in a guest account.
It will cause main users to spend their money unexpectedly.
This CL will hide the tethering option on the USB menu when in the
guest account.
- Add test cases.
Bug: 166125765
Test: 1. make -j42 RunSettingsRoboTests. 2. Switch to a guest account
to verify whether the tethering option is hiding.
Change-Id: I7523b3f3c3a1372bb128a58a6a7fac973d27cfbe
Merged-In: I7523b3f3c3a1372bb128a58a6a7fac973d27cfbe
(cherry picked from commit bde627b263)
It adds a minimum value if it shows only one available
cast device in the output switcher. Because users can only
change the volume slider or stop control in the output switcher.
It's too hidden to have the user stop cast in the UI.
- This CL will disable the entry point of the output switcher
if there is only one available cast device in the list.
- Update test cases.
Bug: 163095048
Test: make -j42 RunSettingsRoboTests
Change-Id: I8906878e1ba769d6940041f17d83b5de6b2a32c0
Merged-In: I8906878e1ba769d6940041f17d83b5de6b2a32c0
(cherry picked from commit b6840ced0d)
When users open volume panel and keep on changing the volume slider for
a while, the panel starts to defer the slider updating, and finally gets
stuck and causes an ANR.
Root cause:
Volume panel has four volume adjusting slices. Each of them registers
a broadcast receiver to listen to the volume changed and muted events.
However, when the media volume changes, AudioManager will send four
broadcasts (music, assistant, accessibility, tts) to every receiver, and
each of them will reload slice four times. Thus, one media volume
changed event will lead to 16 (4*4) UI updates. Consequently, keeping on
sliding the volume bar will trigger hundreds of broadcasts and UI
updates, which makes the system busy and getting stuck.
Solution:
Introduce a VolumeSliceHelper to integrate the broadcasts of the volume
slices specifically.
1. Only register one broadcast receiver to reduce the broadcast loading
since the four slices are listening to the same signal.
2. Filter the only one eligible broadcast among the multiple concurrent
ones, and then relay it to the registered slice.
3. Listen to one more action STREAM_DEVICES_CHANGED_ACTION to update the
volume panel when audio output device changes.
Test: robotest, visual
Fixes: 144134209
Fixes: 160489394
Change-Id: I780b9eee35802b19a5f0ab0a7d07bd3e081f5556
Merged-In: I780b9eee35802b19a5f0ab0a7d07bd3e081f5556
(cherry picked from commit 2c7b77dad7)
Re-launching volume panel continuously will trigger an endless panel
loading, show a transparent unfinished UI, and then block the user's
screen.
Root cause:
When the activity receives a new intent from user's clicking, it will
call PanelFragment#createPanelContent to update the current fragment.
The method triggers an animation and then loads the panel content. If
multiple invocations run concurrently before the animation or the
loading finish, the loader's countdown latch will be increased
abnormally and lead to the endless loading.
Solution:
1. Since the invocations are in UI thread, simply add a flag to avoid
reentrance when the panel is animating or loading.
2. Filter out the same panel's creation request when the panel is still
visible.
3. Do not force a panel's recreation when it's under construction.
Fixes: 143889510
Fixes: 160491854
Test: robotest, manual
Change-Id: I821faedeb62354929f3af9804cbbe44ee5bb8a53
Merged-In: I821faedeb62354929f3af9804cbbe44ee5bb8a53
(cherry picked from commit 6a8d2c5e55)
- This CL uses new CachedBluetoothDevice callback instance
in construct to avoid unregister wrong callback.
- This CL uses flag to make sure preference will register callback
on onAttached() when preference remove callback on
onPrepareForRemoval() or onDetached().
- Update test case
Bug: 168682778
Bug: 157653997
Test: make -j42 RunSettingsRoboTests
Change-Id: I7a0d9f5332153ee80634e191847b84cd7c380b7d
Merged-In: I7a0d9f5332153ee80634e191847b84cd7c380b7d
(cherry picked from commit cafeab2813)
- Before this CL, the output switch panel will show a default
icon if there is no media session or album art.
This CL will hide the icon if there is no media session
or album art.
- Add test case
Bug: 161495909
Test: make -j42 RunSettingsRoboTests
Change-Id: I5f80158b12f89c8499fb97d0b203ebeffefbc18b
Merged-In: I5f80158b12f89c8499fb97d0b203ebeffefbc18b
(cherry picked from commit 30805af9de)
Root cause:
Sometimes loading contextual cards exceeds 1 second and a timeout
expires. In the past, we used the timeout in order not to update
homepage UI and to avoid screen scrolling. But we've introduced a
mechanism of card space pre-allocation to avoid flickering, so when the
timeout expires, the pre-allocated space will be always blank.
Solution:
Display a card on timeout if the one-card space is pre-allocated.
Fixes: 165886791
Test: robotest
Change-Id: I79b29c5fd6d9c4fe6b53dd4f5eab4cd3a606d76d