* connect: remove connected device check logic. MapClientService
will check it.
* remove member variable V and related checks.
* wrap if/else statement in curly brackets.
* add robotest for MapClientProfile.
Bug: 111812003
Test: make -j42 RunSettingsLibRoboTests ROBOTEST_FILTER=MapClientProfileTest
Change-Id: Ic3620c8910e5acbb14e33369ff437d434b514ddf
Merged-In: Ic3620c8910e5acbb14e33369ff437d434b514ddf
* connect: remove connected device check logic. PbapClientService
will check it.
* remove member variable V and related checks.
* wrap if/else statement in curly brackets.
* add robotest for PbapClientProfile.
Bug: 111812003
Test: make -j42 RunSettingsLibRoboTests ROBOTEST_FILTER=PbapClientProfileTest
Change-Id: Ide43ee5cec560945ad69639782ad6f214ea0cece
Merged-In: Ide43ee5cec560945ad69639782ad6f214ea0cece
* getConnectionStatus: remove connected device check logic.
HidDeviceService will check it.
* rewrite the annotation about this class
* remove member variable DEBUG and related checks.
* add robotest for HidDeviceProfile
Bug: 111812003
Test: make -j42 RunSettingsLibRoboTests ROBOTEST_FILTER=HidDeviceProfileTest
Change-Id: I2e7fdd69a46707339a32db4304666e50fd0cf954
Merged-In: I2e7fdd69a46707339a32db4304666e50fd0cf954
* connect: remove connected device check logic.
HeadsetClientStateMachine will check it.
* Remove member variable V and related checks.
* wrap if/else statement in curly brackets.
* add robotest for HfpClientProfile.
Bug: 111812003
Test: make -j42 RunSettingsLibRoboTests ROBOTEST_FILTER=HfpClientProfileTest
Change-Id: Ie36efd6d0a9f8e6501a3690b026ea4bd39744b5c
Merged-In: Ie36efd6d0a9f8e6501a3690b026ea4bd39744b5c
* connect: remove connected device check logic. A2dpSinkService
will check it.
* Remove member variable V and related checks.
* wrap if/else statement in curly brackets.
* add robotest for A2dpSinkProfile.
Bug: 111812003
Test: make -j42 RunSettingsLibRoboTests ROBOTEST_FILTER=A2dpSinkProfileTest
Change-Id: Ia0a118d73e5bb35ed3b2b75e67aeb98ae936981f
Merged-In: Ia0a118d73e5bb35ed3b2b75e67aeb98ae936981f
When the DataUsageController calculate the DataUsageInfo
based on the cycle from NetworkPolicyManager, that cycle
should be not null. Otherwise, it couldn't be used to do
operation like toInstant() directly.
The error could be got from logcat is as:
E AndroidRuntime: Caused by: java.lang.NullPointerException:
Attempt to invoke virtual method 'java.time.Instant
java.time.ZonedDateTime.toInstant()' on a null object reference
E AndroidRuntime: at com.android.settingslib.net.
DataUsageController.getDataUsageInfo
(DataUsageController.java:140)
Inside of the core/java/android/net/NetworkPolicyManager.java:
public static Iterator<Pair<ZonedDateTime, ZonedDateTime>>
cycleIterator(NetworkPolicy policy) {
... ...
return Pair.create(null, null);
... ...
}
That should be avoided.
Considering it could be happened in the NetworkPolicyManager side,
and it is reasonable if it did it, validating operation is better
to be considered by any caller such as the DataUsageController.
Bug: 113952713
Test: specify the hasNext to be false but the DataUsageController
don't crash.
Change-Id: I2469c129a160e30615ea6011adf18688f951eac8
Signed-off-by: John Zhao <yuankuiz@qualcomm.corp-partner.google.com>
* disconnect: remove connected device check logic. BluetoothMapService
will check it.
* getConnectionStatus: remove connected device check logic.
BluetoothMapService will check it.
* Rewrite the annotation about this class.
* Remove member variable V and related checks.
* wrap if/else statement in curly brackets.
Bug: 111812003
Test: manual - disconnect MAP from Settings UI
Change-Id: I2469821f0ae2e3f384844326b30c7d3c4c88ab63
From current code, it will check if the device connected before
getConnectionState. We can remove this check logic because
HidHostService will do it.
Bug: 111812003
Test: manual - connect/disconnect HID keyborad from Settings UI
Change-Id: Ib512b3f15109b6f4cacf1f1c517b69d17ddd5ac4
Remove wrapper for BluetoothA2dp
Remove BluetoothA2dpWrapper,
Use BluetoothA2dp to replace all of them.
Bug: 76167422
Test: RunSettingsLibRoboTests
Remove wrapper for LocationManager
Remove LocationManagerWrapper from SettingsLib
Bug: 76167422
Test: RunSettingsLibRoboTests
Test: flashed on a device and checked Legal information webview
Bug: 111179267
Change-Id: I322ddc6903c80840b6f5db7fb9623bfd02b02b40
Merged-In: I5b88fd1c311011300e7db0f010a64150993ba52d
A2dpProfile will disconnect current device when receive connect event
and max connectable device is one. Ideally we shouldn't have any
bluetooth code in settingslib. The corresponding logic is moved to
the Bluetooth A2dpService.
Bug: 111812003
Test: 1. Developer options > Maxium connected Bluetooth device > 1.
2. Connected 2 BT Headset respectively
Change-Id: I298c39942756523b8a2b34a4104bcd247d2455eb
This is to prevent essential default apps from being restricted in using
battery in the background.
Change-Id: Iac9db9c425a477680e41f73b2c0e7bc4e161ce9e
Merged-In: Iac9db9c425a477680e41f73b2c0e7bc4e161ce9e
Fixes: 76435804
Bug: 80428049
Test: robotests
Still drawing battery saver QS icon in code, though it's gaining some
hackery
Test: visual
Change-Id: Id773c036a5823dcb6c679fa0e6b649f26da4e017
Fixes: 80152065
When two Hearing Aids devices are bonded, we should only show one device
in the Settings App and at the correct location based on the connected
state of the HA devices. When at least one HA device is connected, then
the Settings App should show it as connected. Otherwise, the Settings
App should show it as disconnected when both devices are disconnected.
Bug: 79760469
Test: Run the robotests for Settings and SettingsLib
Change-Id: I33e19af054b686b3d71b00dcbd6ff16febde6099
The Hearing Aid toggle in the Device Details page of Hearing Aids in the
Settings App is to be removed.
Bug: 79921361
Test: Manual testing with the Settings App
Change-Id: I8a557112c45fc0004181a58fa5c7794dc0ebe107
Refactor code which update summary in updateState,
Move them into new method refreshSummary.
Fixes: 67997698
Fixes: 67997726
Test: make RunSettingsLibRoboTests
Change-Id: Icbcedcd08efa2103042ba40a756e8d4b615e1352
Merged-In: Icbcedcd08efa2103042ba40a756e8d4b615e1352
Androd auto still need the summaries with "Connected*" strings,
use separate method for android auto.
Bug: 78936284
Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=CachedBluetoothDeviceTest -j28
Change-Id: I0a5dff4ae231108f528f1cd2e2a25b2f4633ac99
With the new Multi-A2DP/HFP support, need to add profile connection state
changed callback for every BT device connect/disconnect to profile.
Bug: 76447449
Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=LocalBluetoothProfileManagerTest -j28
Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=BluetoothEventManagerTest -j28
Change-Id: Iaaec369e8d10f9b1270491632fb5c91de1e28571
Outline the battery with 1dp colorError border when in powersave mode to
make it more obvious.
Also un-bold the '+'. Doesn't look so wonderful
Test: turn on power save mode; look at it
Fixes: visual
Bug: 78638798
Change-Id: I9c649814764c41893c972d707449ad30095a131d
New method takes packageName array and check whether there is doze
package inside.
Bug: 77924141
Test: RunSettingsLibRoboTests
Change-Id: I54d1882397e7bc14176cdd44f2b773952a304e44
- don't use announce in the dnd enable dialog - instead make the radio
button content a live region
- add hints to volume dialog ring button and edit content descriptions
Change-Id: I4b0db5e9d8dc6df3f48a4eccad1045d7baca4031
Fixes: 78914992
Fixes: 76385188
Test: manual
* Add dispatchAudioModeChanged() in CachedBluetoothDeviceManager for notify
CacheBluetoothDevice to update their summary
* Add 5 combination that used to show the summary of CacheBluetoothDevice
case 1: device battery not unknown and is a active device
ex: show summary as "Active, 100% battery"
case 2: device battery unkonwn and is a active device
ex: show summary as "Active"
case 3: device battery not unknown and not a active device
ex: show summary as "100% battery"
case 4: device battery unkonwn and not a active device
ex: not show the summary
case 5: device is in bonding state
ex: show summary as "Pairing..."
Bug: 78318415
Test: make -j50 RunSettingsLibRoboTests
Change-Id: I70bf5386ff045ef4f07fb86fbdc8b943befc634c
*return true if it is in ringing/call/communication(VoIP) status
Bug: 78318415
Test: make -j50 RunSettingsLibRoboTests
Change-Id: Ifb84da386fcd5bf03eaccf78fc264fbad86a9707