Commit Graph

23 Commits

Author SHA1 Message Date
Sorin Basca
a962b4b712 NEW Use Mockito 4.6.1 API
Addressing skipping merge issue

Bug: 236636175
Test: atest SettingsRoboTests
Change-Id: Ie7caae0ea9aa212f1ee06d6fe89fa0776979e4e6
Merged-In: I2cfda684059520f6ddd1e72c55f1ab1ec9c99e8b
2023-01-12 01:35:44 +00:00
Karen Lu
869fd2f33e Revert "Use Mockito 4.6.1 API"
Revert submission 20749672-cherrypick-robo-mockito-4.6.1-4rg619yrrf

Reason for revert: Breaking the build on tm-qpr-dev. Bug tracked here: b/264473028

Reverted changes: /q/submissionid:20749672-cherrypick-robo-mockito-4.6.1-4rg619yrrf

Change-Id: Ie9d9d944093752f44eff67627e4a35f4df47e6de
2023-01-05 05:15:10 +00:00
Sorin Basca
93c143ed0a Use Mockito 4.6.1 API
Bug: 236636175
Test: m RunSettingsRoboTests
Change-Id: I2cfda684059520f6ddd1e72c55f1ab1ec9c99e8b
Merged-In: I2cfda684059520f6ddd1e72c55f1ab1ec9c99e8b
2022-12-19 22:24:45 +00:00
Jonathan Scott
b7f4f56cad Add missing settings strings.
Also re-enable and fix tests.

Test: manual
Fixes: 226183482
Fixes: 218799125
Fixes: 219375624

Change-Id: I9605f1f4e2e834baf63e015e96639567c5481b5f
2022-05-05 09:12:59 +00: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
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -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
e155871920 Move enterprise test package to sdk 26
Test: make RunSettingsRoboTests -j40
Change-Id: I6b4c5d1d2ba9e7f48168c545432a5a62d024f43d
2017-11-28 14:51:16 -08:00
Fan Zhang
b5f5ffbece Remove DynamicAvailabilityPreferenceController.
- This class is over complex to use, and get in the way of show/hide
  pref when availability change.
- The function from DynamicAvailabilityPreferenceController can be done
  with PreferenceCategoryController.

Bug: 68956750
Bug: 32953042
Test: robotests
Change-Id: Ia7b7e214c072b8c77f5de3d959fdb1dc79217f76
2017-11-07 12:58:48 -08:00
Andrew Sapperstein
9f1e911759 Refactor test runner to use static list of resource paths
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
2017-06-09 09:21:26 -07:00
Bartosz Fabianowski
55038c0a95 Hide "Changes made by your organization's admin" when empty
The admin of a manged device can take a number actions that will be
listed in the "Changes made by your organization's admin" section of
Settings. If the admin has not taken any such actions, the section
will be empty and should be hidden. This is accomplished by having a
PreferenceController for the section that observes the state of the
PreferenceControllers inside it.

Bug: 35912953
Test: m RunSettingsRoboTests

Change-Id: Ia95754493ee6c5a19b4aa9731fd56fd558e61849
2017-06-02 11:40:41 +02:00
Denis Kuznetsov
0c88ff4ed9 Update List of apps on device string,
remove "XX apps" string.

Bug: 32692748
Test: m RunSettingsRoboTests
Change-Id: I64f833497b5362f95cfc56a1057d97d9539ff029
2017-03-24 13:00:49 +01:00
Bartosz Fabianowski
193e0bedac Finalize strings for enterprise privacy
A few more final string tweaks for the enterprise privacy page.

Bug: 32692748
Test: m RunSettingsRoboTests

Change-Id: Ib955aa5a6e756748ed7422021099234ad3fefa8b
2017-03-23 18:19:19 +01:00
Bartosz Fabianowski
b076e00c5e Finish removing N/A DO disclosures from search index
DO disclosures referring to actions that the admin did not actually
take are hidden in the UI, but still show up in the search index. This
CL switches the remaining PreferenceControllers from setting visibility
to implementing isAvailable() instead.

Bug: 32692748
Test: m RunSettingsRoboTests

Change-Id: I54360698f28b549b18cdc230e3b9087cf4e9ff4a
2017-03-21 15:01:02 +01:00
Bartosz Fabianowski
5dc168af1a Start removing N/A DO disclosures from search index
DO disclosures referring to actions that the admin did not actually
take are hidden in the UI, but still show up in the search index. This
CL takes the following steps toward fixing this:
* Pass the list of PreferenceControllers to the search indexer
* Make the first two PrefrenceControllers set isAvailable() correctly

There are more disclosures to update, but the difficult work is done
as all others will follow the same pattern.

Bug: 32692748
Test: m RunSettingsRoboTests

Change-Id: I7d3e248b80abe72b79fce7afa11f28a822de6986
2017-03-20 11:01:51 +01:00
Bartosz Fabianowski
1a8399ffd0 Update layout and strings for DO Disclosures
This CL updates the DO Disclosures page (aka "Enterprise Privacy")
to incorporate UI layout and string changes proposed since
implementation began. There are no logic changes.

Test: make RunSettingsRoboTests
Bug: 32692748

Change-Id: I6ae972e77bd90eb9c61d6a516046a6eb09981ad3
2017-03-08 19:07:29 +01:00
Bartosz Fabianowski
482908f226 Add admin-set default apps to Enterprise Privacy Settings page
This CL adds information about the number of default handlers for
common intents (e.g. browser, e-mail, calendar) set by the admin.

Bug: 32692748
Test: make RunSettingsRoboTests

Change-Id: I569d9ddabeee2b2aa9a892b28066abb8bf920fcf
2017-01-25 02:31:23 +01:00
Bartosz Fabianowski
9704a28c7b Add admin-granted permissions to Enterprise Privacy Settings page
This CL adds information about the number of apps that have been granted
particularly sensitive permissions (location, microphone, camera) by
the admin.

Bug: 32692748
Test: make RunSettingsRoboTests

Change-Id: I650d3e1ed3950960c58722b0c035a76daeb36478
2017-01-18 15:31:26 +01:00
Bartosz Fabianowski
13f569ebd6 Add number of enterprise-installed apps to Privacy Settings page
This CL adds information about the number of apps that were installed
by the admin to the Enterprise Privacy Settings page.

Test: make RunSettingsRoboTests
Bug: 32692748

Change-Id: Ib710a1249db6d285da962122fd3dfb35a43752a1
2017-01-13 22:20:51 +01:00