Commit Graph

2765 Commits

Author SHA1 Message Date
Jeff Sharkey
e398a84199 Merge "Follow storage API polishing." into oc-dev 2017-04-17 22:26:44 +00:00
TreeHugger Robot
8e1d588cdf Merge "Use standard preference layout for wallpaper picker" into oc-dev 2017-04-17 21:10:31 +00:00
Jeff Sharkey
b80f1ddaf0 Follow storage API polishing.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Bug: 37325923, 35812899, 35806020
Change-Id: I4965b7391018354157f0683a643a14c5e9cd338d
2017-04-17 14:29:15 -06:00
Fan Zhang
1a4fea2b72 Use standard preference layout for wallpaper picker
Change-Id: I7c76a9af5e64af4ac8641227289a94ab00f923f2
Fix: 37351626
Test: visual
2017-04-17 12:23:52 -07:00
Christine Franks
c2d56691fe Merge "Add test for Settings#ACTION_NIGHT_DISPLAY_SETTINGS" into oc-dev 2017-04-17 18:30:27 +00:00
Christine Franks
66d59f8d38 Add test for Settings#ACTION_NIGHT_DISPLAY_SETTINGS
Bug: 35356645
Test: Verify for both config_nightDisplayAvailable true and false,
adb shell am instrument -e class
com.android.settings.display.NightDisplayTest -w
com.android.settings.tests.unit/android.support.test.runner.AndroidJUnitRunner
Change-Id: I7de3eddf62428d75bef621d3387fa33a76205fe7
2017-04-17 09:47:26 -07:00
Daniel Nishi
95261b9239 Fix storage settings crash.
It may crash if opened during the uninstall of an app. By catching
the exception which may occur, we can just skip the uninstalled app
and avoid crashing.

Change-Id: I1b96b0697f4041be356260d6c675593affc1cb69
Merged-In: If556db7b5a299ba53a29baefbbe9709ba6d12190
Fixes: 36793223
Fixes: 36793372
Test: Settings unit test
2017-04-13 13:21:26 -07:00
Daniel Nishi
89bec9c941 Fix storage settings crash.
It may crash if opened during the uninstall of an app. By catching
the exception which may occur, we can just skip the uninstalled app
and avoid crashing.

Change-Id: If556db7b5a299ba53a29baefbbe9709ba6d12190
Fixes: 36793223
Fixes: 36793372
Test: Settings unit test
2017-04-10 16:06:16 -07:00
Daniel Nishi
f588f7678d Add a movies & tv apps category to storage settings.
Change-Id: I055e93d2a151195b90a5fd64f4fddebbbcffef59
Merged-In: Idfabe83739272b19cbef4b13a82339170f8f97b3
Fixes: 36223441
Test: Settings Robotest
2017-04-06 13:36:12 -07:00
TreeHugger Robot
ab13d8990f Merge "Change test type from InstrumentationTest to AndroidJUnitTest" 2017-04-01 04:49:19 +00:00
Daniel Nishi
c2157ab443 Add a movies & tv apps category to storage settings.
Change-Id: Idfabe83739272b19cbef4b13a82339170f8f97b3
Fixes: 36223441
Test: Settings Robotest
2017-03-28 17:18:15 -07:00
Dan Shi
0322efaac4 Change test type from InstrumentationTest to AndroidJUnitTest
Details about test configs changes are tracked in doc
https://docs.google.com/document/d/1EWUjJ7fjy8ge_Nk0YQbFdRp8DSHo3z6GU0R8jLgrAcw/edit#

Bug: 35882476
Test: local test
Change-Id: Ib403ce00ed33de3a39534f84da2a679f244e7a1c
2017-03-22 23:33:31 -07:00
Dan Shi
41d96207e8 Add test config to SettingsUnitTests
Details about test configs changes are tracked in doc
https://docs.google.com/document/d/1EWUjJ7fjy8ge_Nk0YQbFdRp8DSHo3z6GU0R8jLgrAcw/edit#

Bug: 35882476
Test: local test
Change-Id: Ie9fdc4717a71cb0f472b004b704acf3c4f770267
2017-03-22 12:07:08 -07:00
Paul Duffin
6b58b5c9f7 Remove ambiguous wildcard import of org.mockito.Matchers.*
The recent upgrade to Mockito 2.7.13 has caused some problems
for grok (and new javac toolchain). The changed files used
wildcard imports to import the same methods from both Matchers
and Mockito.

This was not a problem previously because in the previous
version of Mockito the Mockito class extended the Matchers class
and so even though two methods with the same name were imported
they were not treated as a conflict because they were treated as
being the same method. In 2.7.13 the Mockito class no longer
extends the Matchers class instead they both extend the
ArgumentMatchers class and so for some reason javac no longer
treats them as the same method.

This was not detected by presubmit builds because jack is
still treating the methods as being the same.

Bug: 32912773
Test: m -j32 ANDROID_FORCE_JACK_ENABLED=disabled FrameworksWifiTests
Change-Id: I8c2b1dd39d2d653fe0fba19ed6421b7de25bb82f
2017-03-17 13:10:03 +00:00
TreeHugger Robot
7c22d1f181 Merge "packages/apps/Settings: Add APCT tests to the device-tests suite." 2017-03-16 18:06:24 +00:00
Simran Basi
1897993edb packages/apps/Settings: Add APCT tests to the device-tests suite.
This CL adds the APCT tests within this project to
a similar suite as CTS known as device-tests.

The current method of running APCT tests in the infrastructure
is unaffected.

Bug: 35882476
Test: `make dist device-tests -j` and local builds of
      continuous_instrumentation_tests & continuous_native_tests

Change-Id: Ie1b2c6aefbe1497a2e90077a3ed8ab75721dc87b
2017-03-15 15:12:51 -07:00
Daniel Nishi
02b269be4b Merge "Category breakdown size should match total size." 2017-03-15 20:30:10 +00:00
Daniel Nishi
fd82752694 Count legacy games as games in Storage view.
The old Games flag was being ignored for categorization.
This caused the very few games which used the flag to be
miscategorized as "Other apps."

Change-Id: Ib8650d1c43579bc1698576c09c884e5a7bc4626d
Fixes: 36109122
Test: Settings robotest
2017-03-13 13:20:30 -07:00
Daniel Nishi
325d38043f Category breakdown size should match total size.
The system apps' base size was not being properly attributed
to the system. This was causing the storage to go totally
unattributed (and causing roughly a 1GB gap in sizes.) On my
test device, the sizes now sum properly.

Change-Id: Ibc13015e40f854090a7a3ec09eef4c5c52918e0f
Fixes: 35144717
Test: Settings robo
2017-03-10 15:15:42 -08:00
Paul Duffin
c1542f1fd4 Refactor code incompatible with Mockito 2.7.13
Bug: 32912773
Test: make checkbuild
Change-Id: Idcd89438aa05ed2d010934cc6613763d4cfb9885
2017-03-10 14:59:09 +00:00
Jason Monk
2859b9a302 Update theme setting to not require reboot
Add calls into the OverlayManagerService to update the overlays
directly and remove reboot dialog.

Test: make RunSettingsRobotTests
Change-Id: I92841e643eab70b4b194f60cce95ce3cedb75972
Fixes: 34701451
2017-03-08 20:20:16 -05:00
Daniel Nishi
73a1c2afb3 Use the new package stats query.
This allows us to remove the logic w.r.t. uid merging.

Bug: 35754646
Test: StorageAsyncLoaderTest
Change-Id: I93aff1d55e0e761269c135f0e821ed2067eeda06
2017-02-28 13:30:13 -08:00
Chris Tate
eb32ad8779 Merge "Send the tethering entitlement broadcast to manifest receivers" 2017-02-23 00:50:08 +00:00
Christopher Tate
9ea3dcb994 Send the tethering entitlement broadcast to manifest receivers
Bug 35661943
Test: manual

Change-Id: I8bf9fcd7634c15b2380e83274db18eb29f993686
2017-02-22 14:09:47 -08:00
Anton Philippov
b7948cedc2 Remove intent-filter from PrivacySettingsActivity
BackupSettingsActivity should be the only activity listenting to the
BACKUP_AND_RESET_SETTINGS intent. It then decides which acitivity to
launch.

Bug: 35237721
Test: make SettingsUnitTests
Change-Id: I2021ec57e08c305771dd040c52725065597fd042
2017-02-22 00:25:56 +00:00
Daniel Nishi
422e7c354d Update the loading of info for the secondary users.
Bug: 34715777, 34225103
Test: Settings Robotest
Change-Id: I32bb15ad8bc866c1fd41728e56faa8b09ae11eb6
2017-02-21 12:08:28 -08:00
Daniel Nishi
7cec1bc53c Use the "fast track" storage calculation for all categories.
Bug: 34204877
Test: Settings Robo
Change-Id: I4a3e26e6e96e9b697c1019160c053b079076d3a2
2017-02-02 13:02:32 -08:00
Daniel Nishi
0905600b7a Use the fast track calculation for apps.
This replaces the calculation of the apps category
and add in a calculation for the games category using
the faster GID calculation. This should result in app
sizes loading roughly 10 times after.

Bug: 34204877
Test: Settings unit & robo tests
Change-Id: I78044a8d50f695f8c0a7e04183030232a9719260
2017-02-01 14:02:03 -08:00
Jason Monk
6324cffc7e Move theme setting out of tuner to display
Test: runtest --path
packages/apps/Settings/tests/unit/src/com/android/settings/display/
Fixes: 34682466

Change-Id: Ifc21e390bf8441308871d487bd60d59826603ec2
2017-01-25 10:34:29 -05:00
TreeHugger Robot
5228059c50 Merge "Add example of google truth in a non robolectric test" 2017-01-19 23:15:49 +00:00
Matthew Fritze
1212b0ea3f Add example of google truth in a non robolectric test
Change-Id: I6549ae01b31df39462d252e767fc3255b05813fe
Fixes: 34277648
Test: make SettingsUnitTests, make RunSettingsRoboTests
2017-01-19 11:21:20 -08:00
Paul Duffin
8cedf7e8e8 Merge "Prepare for removal of legacy-test from default targets" 2017-01-19 11:56:38 +00:00
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