Commit Graph

133 Commits

Author SHA1 Message Date
Paul Duffin
1250371b6b Prepare for removal of legacy-test from default targets
In preparation for removing junit classes from the Android API
the legacy-test target will be removed from the
TARGET_DEFAULT_JAVA_LIBRARIES. This change adds explicit
dependencies on junit and/or legacy-android-test to ensure that
modules will compile properly once it is removed.

Bug: 30188076
Test: make checkbuild
Change-Id: I5d2c0685b74ea5ba368c777d9646b9d3ac24dca9
2017-01-18 16:39:34 +00:00
Maurice Lam
92d3c1e653 [Fingerprint] Don't show warning dialog if screen lock is set up
If the keyguard is already secure (i.e. if the backup screen lock is
already set up), do not show the skip dialog which warns user about
the danger of not having a screen lock.

Bug: 34129157
Test: adb shell am instrument -w com.android.settings.tests.unit
Change-Id: I6f777631487de89ab25a08ea017dd6194dde464d
2017-01-12 14:39:29 -08:00
Fan Zhang
9ec4536d8a Show setting tiles for secondary users
Change-Id: I912b3324753731a6633cf6fabfc26ae2e61963a0
Fix: 34176802
Test: runtest --path tests/unit/src/com/android/settings/core/SettingsGatewayTest.java
2017-01-10 13:13:04 -08:00
Fan Zhang
408c6a3e87 Set parent activity for search.
This enables the nav up button from actionbar.

Fix: 34176247
Test:  runtest --path packages/apps/Settings/tests/unit/src/com/android/settings/search/SearchActivityTest.java

Change-Id: I28ef9f1270f5a178346ff9bd9148f7f2035858b2
2017-01-09 16:39:25 -08:00
TreeHugger Robot
a8dee23ee5 Merge "Hide next button when max fingerprints enrolled" 2016-12-15 22:57:27 +00:00
Matthew Fritze
172eac4c51 Test the Columns in the SearchIndexablesContract
The test is going into settings because of the lack testing
support in framework/base for this kind of change, and
because Settings search depends on this change.

Test: make RunSettingsUnitTests
Bug: 33390556
Change-Id: I8a87d4228a37fca475791409b89c7d135c29004a
2016-12-07 09:45:51 -08:00
Maurice Lam
016e4c6dad Hide next button when max fingerprints enrolled
Hide the next button in FingerprintEnrollIntroduction when the
maximum number of fingerprints is enrolled, and show a message
telling the user about the error.

Test: Added FingerprintEnrollIntroductionTest
Bug: 32406375
Change-Id: If8e3c4f5eb13dd2b3edb5c0442d8f34a16a22674
2016-12-06 18:56:44 +00:00
Robin Lee
9c2758f407 VpnSettings PreferenceList tests
For validating that when VPNs are added / removed, the right set of
changes are made to the PreferenceGroup in which they are supposed to
be shown.

Bug: 30998549
Bug: 29093779
Test: runtest -x packages/apps/Settings/tests/unit/src/com/android/settings/vpn2/PreferenceListTest.java
Change-Id: I9394db0e78cc984ab62e3670aa0a7942ae767a66
2016-11-28 17:42:56 +00:00
Nick Desaulniers
a393a4f614 DeviceInfoSettingsTest: test parsing llvm kernel
Adds unit test for DeviceInfoUtils.formatKernelVersion to see if it can
parse a /proc/version string from a kernel compiled with Clang/LLVM.

Bug: 32455817
Change-Id: I25123bf44f67e038e01d8c76d6eab18d5616c7c2
2016-10-31 11:13:10 -07:00
Amin Shaikh
db01a3f0c0 Test for wallpaper preference layout crash.
Test: runtest --path tests/unit/src/com/android/settings/WallpaperPreferenceLayoutTest.java

Bug: 31489007
Change-Id: I3c8440e84f3c169ac97ab13efde7ea7fa2027352
2016-09-15 11:52:18 -07:00
Guang Zhu
2705ae35f9 Avoid JUnit4 collision in android-support-test, mockito-target
Bug: 31072145
Test: make droid checkbuild

Change-Id: I7f2b13a4c28e51d76313ee3b6d13c904c2925228
2016-08-25 19:43:16 +00:00
Fan Zhang
d0f2f3dee5 resolve merge conflicts of 111b81d to master
Change-Id: I2b7eb6dfe73a94b6acd5ef47690ee72022b1ad6d
2016-08-22 17:26:34 -07:00
Salvador Martinez
3fb4e96b0d Tests for launch support on default feature
Includes some espresso tests to ensure that the proper
tab is selected when you attempt to launch settings.

Bug: 30233920
Change-Id: I171293114bd84b064b333091fcf2394d44debed5
(cherry picked from commit d1ef20beaa)
2016-08-22 21:52:46 +00:00
Fan Zhang
5f79ae9677 Move SharedPreferenceLogger to instrumentation package.
Bug: 30914916
Test: SettingsUnitTests and RunSettingsRoboTests

- Added interface to abstract logger
- Added test for SharePrefLogger
- Moved Existing tests for instrumentation to robotests.

Change-Id: I2b431ea4b0fd09d0f11389d8b9181448f08a52c5
2016-08-18 17:38:25 -07:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
TreeHugger Robot
95d55fc687 Merge "Tests for launch support on default feature" 2016-08-15 19:42:55 +00:00
Salvador Martinez
d1ef20beaa Tests for launch support on default feature
Includes some espresso tests to ensure that the proper
tab is selected when you attempt to launch settings.

Bug: 30233920
Change-Id: I171293114bd84b064b333091fcf2394d44debed5
2016-08-15 10:34:11 -07:00
Jeremy Klein
46b1f4843f Fix a broken TetherServiceTest. am: 8681148918 am: be9c338253
am: 9de1885a4d

Change-Id: I66818d04e363d43cae88a713daaf51a746c84f38
2016-08-12 00:10:29 +00:00
Jeremy Klein
8681148918 Fix a broken TetherServiceTest.
This should have been updated when I changed settings to use the new
tethering API.

Bug: 30814807
Change-Id: I3853e6abf1e9976aedae70d4ff41336940545b64
2016-08-11 15:57:29 -07:00
Jeremy Klein
381186d503 Set the tether Entitlement app as active when enabling tethering. am: b04fae204e am: 95fb3f6d3c
am: fc0b9c2f7e

Change-Id: I7bab3f9bede7dc6e3454e4a45aecb6ce25025762
2016-08-03 19:20:13 +00:00
Jeremy Klein
b04fae204e Set the tether Entitlement app as active when enabling tethering.
This fixes tether entitlement timeouts when tethering is enabled
via the QS tile.

Bug: 29514913
Change-Id: I975bf3e52d2df49541544d1b7a6bdcdec1b61d8c
2016-08-01 15:00:19 -07:00
Robin Lee
490849b391 VpnSettings stub unit tests
For:
 - enforcing minimum target SDK
 - enforcing that only actual vpn apps are shown

Bug: 30355704
Change-Id: I4fcbea8ce0d0417c089a637d999ea83299cea5d0
2016-07-28 12:45:03 +00:00
Robin Lee
e68d957777 Include wifi certificates in settings
Deleting wifi certificates isn't supported yet since cascading the
removal back into wifi configs will need some easy way of enumerating
wifi configs first.

Bug: 29208062
Change-Id: I2d9d1ea7e0974701009bfa6ea162b8bc80806639
2016-07-25 15:35:08 +01:00
Daniel Nishi
aad643caf2 Remove the Deletion Helper and Automatic Storage Management jobs.
The automatic storage management settings have been left in place
and updated to use the intent to get into the deletion helper.

Bug: 28965462
Change-Id: I736c8e741b519eceb89075b74d42b38c3aa5d0f4
2016-06-21 10:00:52 -07:00
Victor Chang
4d43e9a764 Merge "Fix Continous loop in unifed screenlock when trying to Trust a CA cert" into nyc-dev
am: b0054ec4e2

* commit 'b0054ec4e2275d8d0444b94c0560374630e077f6':
  Fix Continous loop in unifed screenlock when trying to Trust a CA cert

Change-Id: I01cd2b287d78484c1653476b75b6d300dec0c34d
2016-05-23 11:59:19 +00:00
Victor Chang
5e0a46bff6 Fix Continous loop in unifed screenlock when trying to Trust a CA cert
Cause: with unified screenlock, ConfirmDeviceCredentialActivity didn't
forward result with FLAG_ACTIVITY_FORWARD_RESULT

Also, fixed that ConfirmDeviceCredentialActivity didn't allow fingerprint
authenication in unified screenlock after keystore unlocked.

In ChooseLockSettingsHelper, add one new util function to allow
extra option to set returnCredentials to false while external to true.

Set StrongAuth to "not required" when it has been successfully unlocked.

Test:
1. PO Unified Screenlock/Work Challenge x fingerprint -> ok to trust cert
   (Also, no credential is returned in intent)
2. WorkMode off -> Reboot -> turn on Work mode
   -> no fingerprint option, PIN unlock successful to turn work mode on

Bug: 28752364
Change-Id: I6dc8865e8f005545f8577d7731afb4495647062b
2016-05-20 19:10:33 +01:00
Daniel Nishi
2ef20fb36d Add downloads to the deletion helper.
This adds a deletion service to delete files in the Downloads
folder. All of the files there are collected and offered to the
user to delete.

Bug: 28621781
Change-Id: I94431f9abc3a0afa2d07dbab763312c09e830aef
2016-05-13 13:35:37 -07:00
Daniel Nishi
b84304d4e6 Add a deletion helper view for clearing space.
This view provides an interface which allows users to clear out
apps and other data which they may no longer need to alleviate
storage pressure. This implementation gives the bits to uninstall
apps which have not been used within the last 60 days from the
system.

A future patch will add in the ability to extend the deletion helper
view to have additional clearing types.

Change-Id: I65cba54ca247d52227e67e2fa9b84fe63fb8ab34
(cherry picked from commit a671272bf6)
2016-04-21 10:20:58 -07:00
Jeremy Klein
42320452f8 Merge "Add unit tests for TetherService." 2016-02-02 19:41:10 +00:00
Jeremy Klein
f6b6713d77 Add unit tests for TetherService.
BUG: 26247383
Change-Id: I07ce14f4a2726e35b8b5665a3e0a8df7af864b3b
2016-02-02 11:18:28 -08:00
Benjamin Franz
d72fffea1b Add SmallTest annotation to UserCredentialsTest
Also cleaned up the comments and the imports slightly.

Change-Id: Ieea8af1914ff2f78764d33a9ce6b56621c809fcf
2016-01-25 18:27:18 +00:00
Benjamin Franz
12f5e7b13e Move UserCredentialsTests to unit/
Change-Id: I17bf5fe982016ffc296ade198a74149dc0bd2ddf
2016-01-25 14:11:26 +00:00
Benjamin Franz
d11b713a9f Change build targets for settings tests
1. Split existing tests into fully automatable (unit/) and not fully
automatable (app/)
2. Revert previous changes to test runners on app/
3. Fix some typos in readme

This will enable us to add the fully automatable test target
SettingsUnitTests to the continuous integration tests on the platform.

Change-Id: I0f42c59fde84891e4bfc379150c2f0c61ce1329f
2016-01-21 12:32:15 +00:00