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
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
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
- 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
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
Remove OverlayManagerWrapper and use IOverlayManager instead. Based on
comment from reviewer to refactor ThemePreferenceController.
Bug: 76167422
Test: RunSettingsRoboTests
Change-Id: I0bddf50d8ea7721fe258a9a9b51f8c56dd5afcce
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
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
- 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
Replace all SettingsLib/PackageManagerWrapper in Settings,
by PackageManager,
Remove ShadowPackageManagerWrapper.
Bug: 62067063
Test: make RunSettingsRoboTests
Change-Id: I6d1af55c13d80c1907b98b21e0207cc903cd9b1f
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
- 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
- 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
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
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
When setting a new locale, SettingsActivity restarts to load
everything in the new locale.
Data (containing locale specific title/summary etc) is reloaded
correctly and triggers a callback to UI to redraw.
However we skip the first callback as an optimization for app startup
time. When we restart fragment, we failed to save the state whether we
have already seen the first callback. So when data with new locale text
triggers the callback, it's being skipped and this make UI still render
in old locale.
The fix is to just save the state before fragment gets destroyed before
locale change so the callback can trigger later.
A better fix is: make data (Tile object) not cache text. Then we don't
need to worry about locale cache at all. We should do this fix in the
long term.
Test: localeswitcher
Test: adb shell am broadcast -a com.google.android.testing.i18n.localeswitcher.CHANGE_LOCALE -e LANGUAGE_TAG "zh"
Test: adb shell am broadcast -a com.google.android.testing.i18n.localeswitcher.CHANGE_LOCALE -e LANGUAGE_TAG "ja"
Fixes: 77470788
Bug: 77600770
Change-Id: Ic4223ddbb679db64d0fc3c29d16a5f61a66cc99c
Some of the AmbientDisplay preference controllers were
crashing when their isAvailable methods were being called
by their fragment's search index providers, which meant that
the entire collection of non-indexable keys failed. Thus,
all search results were showing up. In the case of a secondary
user, they were able to see developer options which crashed
settings when clicked.
There are two issues addressed in this cl.
1. Fix the crashes so the non-indexable keys collection works
2. Contain each fragment's collection, so that if a fragment does
crash, the damage is minimized.
Part 1 is checking that the config in isAvailable is not null,
and creating one if so.
Part 2 is fixed by surrounding the collection of non-indexable
keys in a try-catch, with an option in the catch to re-throw the
error if a system property is set. Thus, in a new pre-submit
instrumentation test, we can and docheck if any of the fragments crash
when collecting non-indexable keys.
Change-Id: I820bd9cb2649aa6faff7f82fcf575a62e41dc4fc
Fixes: 77486668
Test: atest NonIndexableCrashTest, robotests
- Year 2018 is picked as the new time zone data
for picker is introduced in 2018. I can be adjusted
in the future to show more merged time zones.
- Add test to ensure each region has at least
one time zone.
- Fix a issue not using a singleton of TimeZoneData
in commit 6c33caad4b
Bug: 72142943
Test: atest SettingsUnitTests:TimeZoneDataTest
Change-Id: I5eba7fbd59a2d3fd2e8062c9615946dc4bbb6314
If the fragment was started via ACTION_PRINT_SETTINGS the intent extra
does not get transformed into a fragment argument. Hence need to check
the intent extra.
Fixes: 74456525
Test: Opened print job settings from a print notification,
atest com.android.settings.print.PrintJobSettingsActivityTest
Change-Id: I6c4605309c348456a862c4d7b48a11400b62fb70
The duplicate page already removed in b/70848054, we need to update
the test.
Change-Id: Ia1f313d211e7528311e56596dbab152aad54bf22
Fixes: 70848054
Test: runtest -x UniquePreferenceTest
Matching changes to the framework behavior. The
setting is on by default iff the user has agreed
to use the a11y shortcut.
Bug: 70944865
Test: Adding new test for this fragment that checks
this behavior
Change-Id: I7831f64cf3ec59c2d266340cc570227433a4febb
- Discovered a few more fragments that weren't whitelisted, so I
whistlisted those as well.
- Also found ZenModeExternalRuleSettings is misconfigured in manifest
and no longer needed, so deleted all artifacts about this activity.
Fixes: 74060141
Test: atest
Change-Id: I159e403bfa6707e2939d075ecc2b8d2f13514153