Add two type SortType.TYPE_DEFAULT and SortType.TYPE_FIFO in BluetoothDevicePreference.
It needs to decide the sort type when you create the BluetoothDevicePreference.
TYPE_DEFAULT - According to the CacheBluetoothDevice state to sort
TYPE_FIFO - According to the timestamp to sort
Bug: 112546918
Test: make -j42 RunSettingsRoboTests
Change-Id: Icd25d9b76a44d5a105f8daf64e5bc1f9ead8cd92
notifyHierarchyChanged() is used before when we have
connected/disconnect deivce in same list. So only use it in
DevicePickerFragment.java, not other normal fragments.
Also that call will rebuild whole preference list, which is heavy.
Bug: 119479725
Test: Manual
Change-Id: I06cf221588001b38634fec9f02dee8bc1e561ea8
The resources available to tests are now exactly the merged resources
located in the APK under test.
Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
- Let test cases can be compatible with AndroidX AlertDialog.
- Theme of Transparent needs to support AndroidX AlertDialog.
Change-Id: I0789b66f52feef30ebab7fb824d0e39d5ae9cc96
Fixes: 111413092
Test: make RunSettingsRoboTests -j56
This allows Settings to test against the latest framework changes.
Also replaced TestConfig with traditional robolectric.properties.
Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
The BluetoothDevicePreference need to know whether to display with an
invalid name. However pass in the whole fragment is over-killing.
This cl decouple it for several reasons:
1. In P, BluetoothDevicePreference will be used in other fragment.
2. In preference lifecycle from end user side, this flag is constant.
Bug: 69333961
Test: RunSettingsRoboTests
Change-Id: I3dbcd2a4aafa3ead74371534250e5e7c3ee221f7
* Add a developer menu option to allow name-less devices to be shown
when a Bluetooth developer needs it, but hide it for non-developer
users.
* Set BluetoothDevicePreference to invisible when CachedBluetoothDevice
does not have a name besides MAC address and the above developer option
is false.
* This affects BluetoothPairingDetail and DevicePickerFragment, but does
not affect BluetoothSettings. BluetoothSettings will show all paired
devices regardless whether an user friendly name exists.
Bug: 34685932
Test: pair Bluetooth device, send file over Bluetooth, unit tests
Change-Id: Idd7ad4b1671dfdcf3204efb50eddb6dae1065aa5
This cl change util method in bluetooth package to return
drawable instead of resId.
If the bt device has battery level, then method return customized
layerDrawable, otherwise return a simple drawable created from
resId.
Bug: 63393322
Test: RunSettingsRoboTests
Change-Id: Ib21822eafda0e8570212ce5cb070478e4f4876a2
Merged-In: Ib21822eafda0e8570212ce5cb070478e4f4876a2
All the other Bluetooth icons were switched to gray at some point in the
past, but we must have missed this one.
Bug: 63858978
Test: make RunSettingsRoboTests
Change-Id: I2ebefa42f3ecff8ae6d58f4bdb22dce39ae4dbd4
Previously everything lived in an inner class method of
SettingsRobolectricTestRunner. That method has now been turned into
a static method so that it can be called by other runners.
Bug: 62460102
Test: robotests
Change-Id: I6612b1f26404587301c534c8ba60e39d59d6c840
This reverts commit 457c3cbec2.
Revert with fix/test.
The fix is that we removed DevicePickerFragment#initDevicePreference(),
which incorrectly set a useless widget on preference, and removes the
gear icon from preference, preventing bind() call to go through
Change-Id: Ia70cdb51d13cca6035a4e7fe8008d195f7f00c6e
Fix: 36511169
Test: runtest --path tests/app/src/com/android/settings/bluetooth/DevicePickerActivityTest.java
- Add logging when users selects the listed devices to connect or
disconnect, and when connection error is shown
- Update the event for the top level bluetooth master switch toggle to
have its own event.
Change-Id: I58f21256fdd07fad9d733ff987ff38df1148f4f8
Fix: 35065258
Test: make RunSettingsRoboTests