Commit Graph

15 Commits

Author SHA1 Message Date
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
Raff Tsai
ecc5bf11f1 Remove ignore in Robolectric test
This was broken due to framework changes. Now framework works with
this well.

Change-Id: I2d862d4851efaefcd9866e9fd4b6deb6450f296c
Fixes: 119592320
Test: make RunSettingsRoboTests
2018-12-22 17:06:52 +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
Raff Tsai
d103f8eb81 Fix testcase fail
-Ignore testcase in RemoteDeviceNameDialogFragmentTest
-Fix SettingsPreferenceFragmentTest and ApnEditorTest testcase fail

Test: make RunSettingsRoboTests
Change-Id: I63053cd2256c9c00f92b57a813513e5df05fd60a
Bug: 119592320
2018-11-16 12:26:23 +08:00
tmfang
c28c836dcb Remove FragmentUtilsTest class
We directly use FragmentController to start fragment.

Change-Id: Iff78f321165d666f96d84f001ff054257a1aaede
Fixes: 111195449
Test: robotest
2018-09-27 18:51:20 +08:00
Raff Tsai
72cfe1a17a Fix failed test cases
It looks like robolectric need some change to fit current
support library or framework. We add shadow to replace
some crashed function.

Fixes: 111941314
Test: make RunSettingsRoboTests
Change-Id: If5afadf3c602fc2aa961a04f7022079c43e99c63
2018-08-08 11:17:44 +08:00
Fan Zhang
f732c3a0e3 Clean up task affinity.
If activity is launched through external intent, back button should just
go back to previous screen.

Change-Id: I5b2e57d2751f5ed7c17140d3eb8d54736b78053c
Fixes: 111864355
Test: manual
2018-07-27 17:44:46 -07:00
tmfang
5bd7151413 Migrate all AlertDialogs to AndroidX version
- 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
2018-07-20 13:38:58 +08:00
tmfang
f12e6adcdc Settings Fragment Migration (Fix test cases)
Fix all Roboletric test cases.
In this CL, some test cases are broken.
So, We ignored these test cases temporarily.

Test: make RunSettingsRoboTests -j56
Bug: 110259478
Change-Id: I1a3075438a614432a2de4f2d96d8abf9a83ce58c
2018-07-11 18:24:51 -07: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