Steps:
1. Take any photo/picture and share it via Bluetooth
2. Before choosing remote device in Device Picker Activity, rotate
the device.
Expected result:
File transfer should complete after selecting the device.
Actual result:
The dialog "Bluetooth share: File Unknown file not sent" is shown and
file sharing fails.
Fix:
Add configuration related check in manifest to avoid activity restart during
orientation change.
Test: File transferred successfully after step 2
Fixes: 72715713
Change-Id: I045c2940d3788059c9313e5501a7957608d8879c
Updated testContextMock() how it checks the bluetooth_connected string.
Bug: 72317067
Test: Unit test updated:
make ROBOTEST_FILTER=BluetoothDetailsHeaderControllerTest \
RunSettingsRoboTests
Manual: two headsets and switching the active device
Change-Id: I3db178d71543e4dfa437544350c58241860ae703
Merged-In: I3db178d71543e4dfa437544350c58241860ae703
(cherry picked from commit b58b006e44)
AutoSyncWorkDataPreferenceController gets mUserHandle from
Utils.getManagedProfileWithDisabled which may return null,
crash will happend when updateState called.
So a judgement here seems helpful to make the program more robust.
Bug: https://partnerissuetracker.corp.google.com/u/1/issues/72908879
Test: make ROBOTEST_FILTER="(AutoSyncWorkDataPreferenceControllerTest)"
RunSettingsRoboTests
Change-Id: I53ca027a2f2dd79655cc2eee67db236cfa03f656
Signed-off-by: tiansiming [田思明] <tiansiming@xiaomi.com>
When enter/exit from "Languages & input" screen repeatedly, memory
leak happens since InputDeviceListener is not unregistered.
Listener registration is called in onPause() when exiting from the
screen, but new activity is created when enter the screen and the
listener registered by previous activity is not unregistered in
onResume().
Bug: 72675680
Test: Manual - Repeat enter and exit "Language & input" page for
several times and check if the count of activity doesn't increase.
Change-Id: I8e0be0ab4b1d13d53c3868b10f409d1e06387c2f
When DataSaverPreference is shown repeatedly, memory leak happens
since DataSaverBackend.Listener is not removed on onDetached().
TEST: Repeat enter and exit "Data usage" for
several times and check if the count of activity
is not increasing.
Bug: 72581115
Change-Id: Ic4a72de049bb87f1e522fe46dd0fb4bb58ed65a5
Update usage of A2dpService API calls that take BluetoothDevice
as an additional argument. If the BluetoothDevice argument is null,
the API applies to the device that is currently the Active A2DP device.
Bug: 69269748
Test: Manual
Change-Id: I8031fa4b4256890dcb486228185baf93debb102d
Merged-In: I7417b7b0741f706df475cb2b27fbe6525f744269
The behavior of getQuantityString() is different according to language, it gets
both "other" and "one" string if English is system language. But it always gets
"other" string if non-English, then the "other" string of wrong_pin_code is
shown even if remains 1 time of SIM lock input.
In order to change the string in any language, we add new string for
remains 1 time.
Bug: 71783850
Change-Id: I5de35eb71905b77028bf25226381e1ba79a37e92
The function onAccessPointsChanged will be called many times
and access points will be updated many times in 300ms. So check
if the same event exists before calling postDelayed.
Bug: 68230819
Test: Manual test
Change-Id: Id098e1b77c28b62a5495c3369ed950531e59dba2
This crash can hardly happen under the normal operation of the user,
but it may have a chance to appear in monkey test. To enhance the
robustness of the program, intent.getData() here should not be null
in any situations.
Bug: N/A
Test: adb shell am start -n
'com.android.settings/.Settings\$AppDrawOverlaySettingsActivity'
Change-Id: I732b564056e3e585405f146d99efe3b410edbc41
Signed-off-by: tiansiming <tiansiming@xiaomi.com>
The new developer option modifies the system property
"persist.bluetooth.maxconnectedaudiodevices"; it allows testing
multiple connected devices for A2DP, AVRCP, HFP.
Bug: 71603731
Test: Robolectric test
Change-Id: If8c2c26ad4c9a2b7458a2d16a0c29d5f9b4df5c7