Commit Graph

360 Commits

Author SHA1 Message Date
Arc Wang
e1b6712926 Implement QR code parser WifiQrCodetest.
The parser supports standard WI-Fi DPP QR code & ZXing reader library's
Wi-Fi Network config format.

Bug: 118797380
Test: atest WifiQrCodetest
      atest RunSettingsRoboTests

Change-Id: Ia47b8f65a900099749a6aa24afa3abd21ede1582
2018-12-20 15:12:34 +08:00
pastychang
1b1666855e Migrating to new footer button for fingerprint and face enrolling pages.
Bug: 120805516
Test: RunSettingsRoboTests
Change-Id: I89a5e3674b8ba9ec66945c03c9b783664eee214f
2018-12-19 23:24:48 +08:00
Brett Chabot
031dcf5019 Migrate packages/apps/Settings to androidx.test
See go/jetpack-test-android-migration

Test: make checkbuild
Change-Id: If67b124188fd4e303154eb11263d03abfb3718c6
2018-12-17 09:20:05 -08:00
Arc Wang
4ab0d168e2 Implement Wi-Fi DPP UI.
Add WifiDppEnrolleeActivity
  Remove bottom buttons of WifiDppQrCodeScannerFragment
  Add ActionBar in WifiDppQrCodeScannerFragment &
      WifiDppQrCodeGeneratorFragment

Bug: 118797380
Bug: 118794858
Test: atest WifiDppConfiguratorActivityTest
      atest WifiDppQrCodeScannerFragmentTest
      atest WifiDppQrCodeGeneratorFragmentTest
      atest atest RunSettingsRoboTests

Change-Id: I1d464dc9a8d54a896b8e0c9185a74bed7b193b60
2018-12-12 10:07:20 +08:00
Arc Wang
e43bb77e5d Use multiple actions to launch Wi-Fi DPP configurator with different mode.
Bug: 118797380
Bug: 118794858
Test: atest WifiDppConfiguratorActivityTest
      atest WifiDppQrCodeScannerFragmentTest
      atest atest RunSettingsRoboTests

Change-Id: I96aba3c5e3d57c89d6948d3bf3dd85f29f705778
2018-12-04 11:46:37 +08:00
Johnson Lu
a558c01696 Integrate QrCode Camera with WifiDppQrCodeScannerFragment
Bug: 118797380
Test: RunSettingsRoboTests
Change-Id: I328bebbbcf44136df2c18ca1929a5da377a0cf6b
2018-12-01 09:03:39 +08:00
Arc Wang
6f8dc162df Merge "Upload basic UI files for Wi-Fi DPP Settings development II." 2018-11-30 02:48:53 +00:00
Fan Zhang
53f75f0df9 Move all custom slice uris to a registry class.
Change-Id: I192320f95ac81d14c8891ce2531d603912e59f56
Fixes: 119776308
Test: robotests
2018-11-29 16:41:21 -08:00
Arc Wang
f5d6089d35 Upload basic UI files for Wi-Fi DPP Settings development II.
Add 3 fragments:

  WifiDppQrCodeGeneratorFragment
  WifiDppChooseSavedWifiNetworkFragment
  WifiDppAddDeviceFragment

Bug: 118797380
     118797202
     118794978
     118796825
     118794858
Test: atest WifiDppConfiguratorActivityTest
      atest WifiDppQrCodeScannerFragmentTest
      atest atest RunSettingsRoboTests

Change-Id: I2fbc2f46f941d49b63e4ac74d92f94bf617d2b9b
2018-11-29 07:11:29 +00:00
Arc Wang
4591d82bdf Upload basic UI files for Wi-Fi DPP Settings development.
WifiDppQrCodeScannerActivity is the activity for user to scan
QR code and add device to a saved network.

Bug: 118797380
Test: manual
Change-Id: If2c8c5ba1620e5584fb47ba7b0ea2bc2d7acb641
2018-11-21 10:06:47 +00:00
TreeHugger Robot
ae30afb820 Merge "Enable Skip fingerprint when adding corp account." 2018-11-09 22:02:17 +00:00
Doris Ling
3e6d80c121 Enable Skip fingerprint when adding corp account.
- override the internal activity for picking screen lock from setup
wizard, so that when adding corp account, it can skip fingerprint even
when device is not yet provisioned.

Change-Id: I9485c54d097c82a584297fcaeb63b3271e05c1b6
Fixes: 112706989
Test: atest com.android.settings.password.SetupChooseLockGenericTest
2018-11-09 10:36:22 -08:00
Fan Zhang
5e6e6a14f2 Move all contextual card related classes.
... from homepage to contextualcards.

Test: rebuild
Change-Id: Id7889566ce1e7257eb699d963ae996906fdb58ff
2018-10-26 10:02:04 -07:00
Fan Zhang
130c477044 Remove DashboardSummary and all related classes.
- Condition is already supported in PersonalSettingsFragment
- Suggestion is already supported in PersonalSettingsFragment
- Static/dynamic tiles are supported in TopLevelSettings

Change-Id: I51882e3bd0919ad95109baefac683d98667c11e3
Fixes: 110405144
Test: robotests
2018-10-25 11:27:47 -07:00
Raff Tsai
db55661271 Change homepage layout
- merge PersonalSettingsFragment and TopLevelSettings together

Bug: 118224579
Test: manual
Change-Id: Ieee50a22babb25023e2a1767793e220862a38363
2018-10-23 19:37:19 +08:00
Mill Chen
77b2a30e9d Updated misc in Contextual Settings Homepage
- Set static cards with full width and removed packageName from setName
method.
- Removed Storage card from createStaticCards method because it does not
belong to default category.
- Changed the parameter type of setSliceUri from String to Uri in ContextualCard.
- Added StorageSlice and DeviceInfoSlice to the contextual card
provider.
- Fixed test cases related to these changes.

bug: 117874766
Test: robotest
Change-Id: Ic2dca353f85d0b6191ab19882dd8c5cb9c6cc658
2018-10-18 10:43:23 +08:00
Emily Chuang
9f25efc4d8 Add a filter to take out unnecessary homepage data.
After getting the full list from CardContentProvider, at render side
(Settings side) we should perform final filtering to filter out those
data that are not applicable at that moment. Apart from that, we should
also perform slice URI check in this stage to take out invalid slices.

Bug: 116063073
Test: robotests
Change-Id: Idfa94ec6176a9d9cb3379543e0a23858941af742
2018-10-09 16:20:34 +08:00
Fan Zhang
6632529ba1 Remove DeviceIndex feature/service.
Change-Id: I8444101669aef013183842c2d13cf3960c756398
Fixes: 112587202
Test: rerun all tests
2018-10-08 13:47:07 -07:00
Mill Chen
623eb5a904 Create the default static cards for Contextual Settings Homepage
Adding three default ContextualCard data to CardContentProvider, in case
of empty database or no SettingsIntelligence, to keep Contextual
Settings Homepage working well.

Bug: 113372471
Test: visual, atest SettingsHomepageActivityTest
Change-Id: Id7b26818e10f7945b2618100901310a005d8cc0d
2018-09-28 14:23:14 -07:00
Matthew Fritze
7f0a30226a Refactor WifiSlice to CustomSliceManager
Modify the WifiSliceCode to follow the pattern for
Slices that do not match existing UI components.

Test: robotests
Bug: 80263568
Change-Id: Id69e019608777282f4b64ff945e8c30c97aaf577
2018-08-20 08:03:34 -07:00
Felipe Leme
9bf591b832 Added autofill options on Developer Options screen.
Test: manual verification
Test: atest AutofillResetOptionsPreferenceControllerTest\
            AutofillLoggingLevelPreferenceControllerTest
Test: runtest --path packages/apps/Settings/tests/unit/src/com/android/settings/core/PreferenceControllerContractTest.java
Fixes: 65700540

Change-Id: I6b35fbf549529f4d97df164ce3fb6d641ee37650
2018-07-26 09:53:11 -07:00
jackqdyulei
dd9b8af6b9 Remove the anomaly detection added in O-DR
1. Remove unused class and resources
2. Update function in AdvancedPowerUsageDetail since
we don't need pass in anomaly anymore

Change-Id: I96fbe5ddaae902b34b756c7aae0338e49afef1f3
Bug: 74529048
Test: 1. manual test in settings page. 2. robo test still pass
2018-07-17 12:42:43 -07: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
tmfang
99cc23d0da Settings Fragment Migration (Change imports)
This commit *only* changes imports and optimize imports.
We don't do anything else.

This patch can't compile pass and run test case.
We will update other patches to fix these problem.

Change list.

1. import android.app.Fragment; ->
   import androidx.fragment.app.Fragment;
2. import android.app.DialogFragment; ->
   import androidx.fragment.app.DialogFragment;
3. import android.app.ListFragment; ->
   import androidx.fragment.app.ListFragment;
4. import android.app.LoaderManager; ->
   import androidx.loader.app.LoaderManager;
5. import android.content.AsyncTaskLoader; ->
   import androidx.loader.content.AsyncTaskLoader;
6. import android.content.Loader; ->
   import androidx.loader.content.Loader;
7. import android.app.FragmentTransaction; ->
   import androidx.fragment.app.FragmentTransaction;
8. import android.app.FragmentManager; ->
   import androidx.fragment.app.FragmentManager;
9. import android.app.LoaderManager.LoaderCallbacks; ->
    import androidx.loader.app.LoaderManager.LoaderCallbacks;

Bug: 110259478
Test: Can't test it.
Change-Id: I0a3f98fff34a3494a839c3c42aeabcec3df2c8b3
2018-07-11 18:23:51 -07:00
Kevin Chyn
871e55fc54 Move Fingerprint settings to biometrics/fingerprint
Bug: 110589286

Test: make -j56 RunSettingsRoboTests
Test: adb shell am start -a android.settings.FINGERPRINT_ENROLL still works
Test: adb shell am start -a android.settings.FINGERPRINT_SETUP still works
Change-Id: If33b557137cae7b57e4a0e906ee95032bc589436
2018-06-25 16:51:16 -07:00
Fan Zhang
807dfbb0ad Misc tweaks to create shortcut handler
- Add restriction to only allow system apps provide shortcuts
- Load icon from target package when building shortcut icons
- Codestyle clean up

Change-Id: If9e5c5e60601efda216ce2cc2d4fd7beb44279e1
Fixes: 110393916
Test: visual, robotests
2018-06-19 12:42:18 -07:00
Matthew Fritze
111fc0344b Merge "Fix DND crash from SpringboardActivity" into pi-dev am: 3f790b76b0
am: 7fcbaf4ac9

Change-Id: I999288a61ebc780986ed108cd0b255db6ee4d791
2018-05-29 12:52:43 -07:00
Matthew Fritze
a559103b1b Fix DND crash from SpringboardActivity
Special case Uris need to explicitly add their intents.
This unfortunately duplicates a list of special-cased Slices,
but I have attached a bug with a plan to address this duplicity in Q.

Change-Id: I346915c32543713d33716422018d7c950cce323d
Fixes: 80065409
Test: atest SliceDeepLinkSpringBoardTest
2018-05-25 13:35:23 -07:00
Ching-Sung Li
feae5d79cf Remove OverlayManagerWrapper class out from Settings
Remove OverlayManagerWrapper and use IOverlayManager instead. Based on
comment from reviewer to refactor ThemePreferenceController.

Bug: 76167422
Test: RunSettingsRoboTests
Change-Id: I0bddf50d8ea7721fe258a9a9b51f8c56dd5afcce
2018-05-25 12:59:18 -07:00
Todd Kennedy
4fa4eeb675 Merge "OMS: rebase settings when overlays update" into pi-dev am: 203b7b1792
am: 45d58cab2c

Change-Id: Iab503a1196a7412d101e4c5c7831785bf5fd18bb
2018-05-11 11:53:09 -07:00
Todd Kennedy
203b7b1792 Merge "OMS: rebase settings when overlays update" into pi-dev 2018-05-11 17:44:53 +00:00
Fan Zhang
4979f434fc Merge "Fix a typo in AndroidManifest.xml" into pi-dev am: 3a9fbac582
am: e50f5effa0

Change-Id: I68689c03344b1987b905b32f95f91d82b5a9e129
2018-05-10 11:32:23 -07:00
Todd Kennedy
94fecb94e9 OMS: rebase settings when overlays update
When an overlay package has been upgraded, OMS needs to reconcile any
previous settings about the overlay with the new state of affairs.
Sometimes it is possible to rebase the OMS settings on the new
information [e.g. the overlay has changed categories]; sometimes the OMS
settings have to be scrapped [e.g. the overlay has changed target
package]. Update OMS to do The Right Thing.

Bug: 78809704
Test: manual (adb shell stop, adb push specially prepared overlays, adb shell start, adb exec-out cmd overlay dump)
Test: ran unit tests
Test: adb install out/target/product/walleye/data/app/SettingsUnitTests/SettingsUnitTests.apk
Test: adb shell am instrument -w -e class com.android.settings.display.ThemePreferenceControllerTest com.android.settings.tests.unit/android.support.test.runner.AndroidJUnitRunner
Test: NOTE: 3 of 4 failures both pre and post change; looks like there are issue with the unit tests themselves

Change-Id: Icd1ae633dbee5b5ca957fa6b652af6209b4b1260
2018-05-10 11:02:42 -07:00
Fan Zhang
66156d68e7 Fix a typo in AndroidManifest.xml
And some drive-by clean up.

Change-Id: Ic036f8f5bec8064a5d55e0e032ce45e483323b14
Fixes: 78889604
Test: atest
2018-05-09 18:06:27 -07:00
hjchangliao
e86eec0c07 Rename SubSettingLauncher.setTitle, add java doc
For make this method usage more clear,
setTitle(charSequence) rename as setTitleText,
add java doc: it is only for user generated string
setTitle(int) rename as setTitleRes.

Change-Id: I972cb6a8ff90873dfdc25c23f6dc3d68103c8e4e
Fixes: 78347436
Test: make RunSettingsRoboTests
2018-05-09 10:00:05 +08:00
Fan Zhang
10b4bc01f1 Merge "Add a test to verify lifecycle events are triggered" into pi-dev am: 139ebd91c0
am: cd3e50d4a5

Change-Id: I01d49c423c5ef56d59a51a2f03b4f11d956e19bc
2018-05-01 12:33:06 -07:00
Fan Zhang
1f1c7042f5 Add a test to verify lifecycle events are triggered
- Added a footer in feature flags, displaying "Experimental" during
  onStart.
- Ui test to verify the text shows correctly.

Change-Id: Ibf4f79cb3c12e460384e83201a16005a18d6437d
Fixes: 78887450
Test: atest
2018-05-01 01:32:49 +00:00
HJ ChangLiao
5693be2863 Replace PackageManagerWrapper with PackageManager
Replace all SettingsLib/PackageManagerWrapper in Settings,
by PackageManager,
Remove ShadowPackageManagerWrapper.

Bug: 62067063
Test: make RunSettingsRoboTests
Change-Id: I6d1af55c13d80c1907b98b21e0207cc903cd9b1f
2018-04-24 15:12:31 +08:00
Lei Yu
1ddcf81ddc Update insert method for battery database am: 4bfbaa6047
am: 71dca7d131

Change-Id: Id7d1247efd12ead31584e46126108b5370bd1101
2018-04-23 14:37:30 -07:00
Lei Yu
4bfbaa6047 Update insert method for battery database
1. Add conflict code to ignore the confliction and return -1 when
insert fails.
2. Add boolean return value to show whether insert sucessfully
3. Add unit test. We don't write robo test because robolectirc use
"update" to shadow "insert" operation, which returns the wrong data.

Bug: 77968649
Test: SettingsUnitTest
Change-Id: Ibd3b53cdb1796d74ea4a2ca1f067e2b302b939e9
2018-04-23 13:13:56 -07:00
Lei Yu
fca1b345cc Merge "Fix bugs in auto restriction." into pi-dev am: f6e2c19fcc
am: a9e4d4a42a

Change-Id: If82969696eb492ea3875a0e0fb92f038024f00f9
2018-04-23 10:13:31 -07:00
Lei Yu
f6e2c19fcc Merge "Fix bugs in auto restriction." into pi-dev 2018-04-23 17:03:39 +00:00
Fan Zhang
0e5a3273af Catch exception when failing to create slice
- Created a non-generic exception type when failing SliceData.build()
- Catch exception and log error instead of crash.
- Added a presubmit test

Fixes: 78347031
Test: robotests, atest
Change-Id: I06e528cb5e1cd328f82f9561553f3c4b5b0bed26
Merged-In: I06e528cb5e1cd328f82f9561553f3c4b5b0bed26
2018-04-20 23:55:39 +00:00
Fan Zhang
2a7fcc4d6f Catch exception when failing to create slice
- Created a non-generic exception type when failing SliceData.build()
- Catch exception and log error instead of crash.
- Added a presubmit test

Fixes: 78347031
Test: robotests, atest
Change-Id: I06e528cb5e1cd328f82f9561553f3c4b5b0bed26
2018-04-20 15:46:35 -07:00
Lei Yu
252d4e1fc0 Fix bugs in auto restriction.
1. Dismiss this tip once user clicks it and goes to detail page.
2. In auto restriction, since apps are automatically restricted,
we need to remove apps in list that unrestricted by user.
3. Refactor the code to remove the unnecessary parameter(i.e.
SettingsActivity)

Bug: 78187414
Test: RunSettingsRoboTests
Change-Id: I1c950f7c55df35795641c2ea8579ce9e011dba28
2018-04-20 12:55:53 -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
Lei Yu
689ac2e67d Merge "Add ui tests for restrict app tips" into pi-dev am: 79580c94a7
am: 48aac7f5d1

Change-Id: Ia9b4d3139ddc132b57eeb548f67dd41147c3ef15
2018-04-11 18:21:39 -07:00
Lei Yu
2c13459b5c Add ui tests for restrict app tips
Add anomaly data to database then check whether it shows correct
data in settings UI.

We can also use this test to trigger anomalies and test it manually.

Change-Id: Ic4bbe3de1e828415b9b3f1180cbb41c737b43232
Fixes: 77477035
Test: atest SettingsUnitTest
2018-04-11 11:00:03 -07:00
Nicolas Geoffray
761c47628b Merge "Exempt tests from hidden API checks." into pi-dev am: 8838b3fa9c
am: b3ef209fc6

Change-Id: I7c8b34160f79e103da7907f77ae8991595e3d941
2018-04-06 14:00:39 -07:00
Nicolas Geoffray
932679b141 Exempt tests from hidden API checks.
Bug: 64382372
Bug: 74963051

Test: m
Change-Id: I4e51a8a7d86ac79668f66057daf550a8f04711dd
2018-04-06 14:55:46 +01:00