Commit Graph

14 Commits

Author SHA1 Message Date
Sorin Basca
e81d98cc08 Use Mockito 4.6.1 API
Bug: 236636175
Test: atest SettingsRoboTests
Change-Id: I2cfda684059520f6ddd1e72c55f1ab1ec9c99e8b
Merged-In: I2cfda684059520f6ddd1e72c55f1ab1ec9c99e8b
2022-12-29 00:47:06 +00:00
Chienyuan
84a9b23ba8 Show identity address in the bluetooth details page
Bug: 197044261
Test: build pass
Change-Id: Ic1ef1d575f35c4b37d6f9195ec10dd31ed5bdd5b
2022-02-08 11:29:03 +00:00
hughchen
d89518e3c5 Finish bluetooth detail fragment if device is BOND_NONE
This CL is used to check the bluetooth bond state when
fragment is onResume. The bluetooth detail fragment will
finish if the bluetooth bond state is BOND_NONE when
fragment is onResume.

Bug: 146621601
Test: make -j42 RunSettingsRoboTests
Change-Id: I157e1da925dcf527ce2b49ad431079d90b7c4fc3
2019-12-26 11:32:58 +08:00
hjchangliao
c37973f073 Move edit icon from header to action bar
Move edit icon in bluetooth detail page,
from header back to action bar.

Change-Id: I6afd7c611fe4db8c6c27921b5da316d8a1a000db
Fixes: 76206922
Test: make RunSettingsRoboTests
2019-01-12 07:36:32 +08:00
jackqdyulei
22904a05b7 Add UiBlocker for DashboardFragment
If DashboardFragment detects blocker controllers, it won't display
until:
1. All blocking controllers finish bg works.
2. Timeout

This CL adds UiBlockerController to control this behavior and
BlockingSlicePreferenceController as an example.

Bug: 120803703
Test: atest SettingsUnitTests
Change-Id: I66fc194776d46ee49b3ec7685f3167834e673ba2
2019-01-10 14:25:43 -08:00
James Lemieux
f1dade40d2 Use binary resource support in robolectric
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
2018-12-12 19:53:49 -08:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
HJ ChangLiao
f3be34e01b Move device detail edit button from menu to header
Move the edit button on Bluetooth device detail,
From action bar menu to header.
Use EntityHeaderController to add and control,
Rename those method because we use them on
more than one place now.

Change-Id: I3afad6baeab80895c109603e2ab13428582a4dd8
Fixes: 76206922
Test: make RunSettingsRoboTests
2018-04-17 12:33:01 +08:00
James Lemieux
22a39c2b93 Use external/robolectric-shadows/run_robotests.mk
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
2018-03-04 03:50:08 -08:00
jeffreyhuang
cbfb099a40 Rename SDK_VERSION_O to SDK_VERSION
Test: make RunSettingsRoboTests -j40
Change-Id: I6715062d8addadda441e32809db1af55f15e3a90
2017-12-05 16:43:54 -08:00
Fan Zhang
dff6dd687e Move away from deprecated FakeFeatureFactory.setupForTest()
Test: rerun
Change-Id: I896ba414315ddb1664c0499264f4992f0554ef98
2017-12-05 10:12:10 -08:00
jeffreyhuang
4824ff3d00 Move bluetooth test package to sdk 26
Test: make RunSettingsRoboTests -j40
Change-Id: I26e6f437052caafd97f3f164b388d379fc890e7e
2017-11-27 15:42:25 -08:00
Antony Sargent
1b6e7d76ed Fix Bluetooth device details crash on screen rotation
We were getting the following exception when you rotated the Bluetooth
device details screen:

java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.android.settings/com.android.settings.SubSettings}:
java.lang.IllegalStateException: This Activity already has an action bar
supplied by the window decor. Do not request Window.FEATURE_ACTION_BAR
and set android:windowActionBar to false in your theme to use a Toolbar
instead.

It turns out that allowing EntityHeaderController to inflate the
settings_entity_header.xml view seems to cause this - if you instead
manually include a LayoutPreference and hand that to
EntityHeaderController, you don't have the problem.

The rotation failure couldn't be tested with Robolectric because our
version doesn't support using FragmentTestUtil.startFragment for
fragments which use PreferenceScreen's ("sorry, not yet
implemented"). So instead this includes an app test.

Bug: 62447414
Test: runtest --path=BluetoothDeviceDetailsRotationTest.java
Change-Id: I8d052d1f4ab6e2b0ca5c0e513ec366bdcc382d99
2017-06-30 16:34:40 -07:00
Antony Sargent
843c3ead6d Add a rename dialog for paired Bluetooth devices
This adds an icon to the paired device details page which users can
click on to bring up a dialog for changing the display name for that
device.

We already had a dialog for changing the advertised name of the local
Bluetooth adapter that's used on the main Bluetooth settings page, so
I've made that abstract and created two new subclasses to encapsulate
the slight differences for this use case.

Bug: 62535241
Test: make RunSettingsRoboTests
Change-Id: I1c407f276e12aedf066a336e24b4ccd16d67c4df
2017-06-26 10:20:38 -07:00