Commit Graph

2765 Commits

Author SHA1 Message Date
Daniel Nishi
2de5ab35f8 Merge "Add more sane multi-profile app attribution." into oc-dev
am: 4743423a82

Change-Id: I59630cf77da700cd5a159e11ac6f9818f1303199
2017-06-19 17:55:28 +00:00
Daniel Nishi
4743423a82 Merge "Add more sane multi-profile app attribution." into oc-dev 2017-06-19 17:45:31 +00:00
Maurice Lam
33cad22f4f Merge "Make confirm lock screen use the right theme" into oc-dr1-dev am: 98a9d341c8
am: 9b8f36e359

Change-Id: I08f5a9da6f6fac3206a5bb6df2e2106e91033863
2017-06-16 22:42:26 +00:00
Maurice Lam
846172564e Make confirm lock screen use the right theme
Test: cd tests/robotests && mma
Bug: 62348472
Change-Id: Ie05c2e6adba8450a1092f0fefcad6b003398de7d
2017-06-16 13:02:36 -07:00
Daniel Nishi
b088010d12 Add more sane multi-profile app attribution.
Due to issues w.r.t. attribution across multiple users, we originally
duplicated the previous implementation which zeroed out the sizes. This,
however, caused system bloat due to the change in how we calculate the
system size.

By attributing apps which do not exist in the primary profile to the
first user that shows up with it installed, we can avoid accidentally
attributing it to the system size.

Bug: 62623731
Test: Settings unittest & Settings robotest
Change-Id: I9514c9ecef62ea6270723f62e6bf27c69b75f180
2017-06-15 17:25:10 -07:00
Maurice Lam
4c930fc2d5 Allow skipping PIN setup screen
So that setup wizard can show PIN option by default.

Test: Added Robolectric and instrumentation tests
Bug: 38509560
Change-Id: Id72744dd444b9b026ca5f28f230bae3bec254b2f
(cherry picked from commit 0f897d79f6)
2017-06-15 20:23:21 +00:00
Sundeep Ghuman
f4bee3bb18 Allow WifiSettings to show old APs on app resume. am: 4ae59dde43
am: 6ab460c354

Change-Id: I1f3b7d405ea6e98d4cfa0a69b4468494f7867d4a
2017-06-15 04:24:26 +00:00
Sundeep Ghuman
60b814ba43 Allow WifiSettings to show old APs on app resume.
If we do not have any recent scan results, show the previous APs from
when the app was last paused, by not triggering a force update.

Accompanying changes are also made in WifiTracker to prevent
onAccessPointsChanged callbacks from being invoked until the tracker
receives a new 'SCAN_RESULTS_AVAILABLE' broadcast (ag/2409026).

Bug: b/38212080
Test: runtest --path
packages/apps/Settings/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java
one minute later.

Change-Id: I4f9b2ec855e057e28235b0253ab42c6b4521bebc
Merged-In: I4f9b2ec855e057e28235b0253ab42c6b4521bebc
2017-06-14 19:07:05 -07:00
Sundeep Ghuman
4ae59dde43 Allow WifiSettings to show old APs on app resume.
MANUAL MERGE of ag/2398149 to avoid merge conflicts when trying to
submit to oc-dev.

If we do not have any recent scan results, show the previous APs from
when the app was last paused, by not triggering a force update.

Accompanying changes are also made in WifiTracker to prevent
onAccessPointsChanged callbacks from being invoked until the tracker
receives a new 'SCAN_RESULTS_AVAILABLE' broadcast (ag/2409026).

Bug: b/38212080
Test: runtest --path
packages/apps/Settings/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java
one minute later.

Change-Id: I4f9b2ec855e057e28235b0253ab42c6b4521bebc
2017-06-14 19:05:21 -07:00
TreeHugger Robot
f357f78eef Merge "Refactor hotspot into a full page" 2017-06-14 21:33:22 +00:00
Fan Zhang
78d5efdfea Refactor hotspot into a full page
- Deprecated WifiAPEnabler, and copied most of its logic into various
  controllers and WifiTetherSettings.
- Added tests

Fix: 37253404
Fix: 36181835

Test: make RunSettingsRoboTests
Change-Id: Iad994d61b694ad7f1113d045a3e7500eeaec178b
2017-06-14 12:32:44 -07:00
Maurice Lam
0f897d79f6 Allow skipping PIN setup screen
So that setup wizard can show PIN option by default.

Test: Added Robolectric and instrumentation tests
Bug: 38509560
Change-Id: Id72744dd444b9b026ca5f28f230bae3bec254b2f
2017-06-12 18:03:02 -07:00
Fan Zhang
015c7706e4 Hide saved network preference when there is none.
We already do this when wifi is enabled. This change brings same
behavior when wifi is off.

Change-Id: I44301fe46a6183735f8be71c80cfe719ad0e82b4
Fix: 62094681
Test: runtest --path tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java
2017-06-01 12:38:08 -07:00
Fan Zhang
c2b0c7bf31 Use a common style for custom preference icon layouts
Change-Id: Ief3bc54f700cb891041adf92846149c6f41caad0
Fix: 35961001
Test: instrumentation test
2017-05-31 17:09:15 -07:00
Jeff Sharkey
7c236a0c7e Merge commit '47eec246a9293616cb74d2c354be85201ec4e19e' into mergeit
Change-Id: I988ae328e0e9bb99b086490cf2ef48ca19779d13
2017-05-31 09:05:30 -06:00
Jeff Sharkey
77fe8c1e9e Consistent "low storage" behavior.
Fix several bugs related to storage accounting.  Since getDataBytes()
already includes cached data, we need to subtract it to avoid blaming
apps for it.

We also need to blame app code on someone, so we blame it on the
current user.  StorageStatsManager was fixed awhile back to only
return the app code size on the requested storage volume, so we can
remove the system app checks.

Subtract "appBytes" from external storage accounting, since it's
already been blamed elsewhere against specific apps.

Pass along storage results from all users on the device, and subtract
them all when estimating size of "system" data.  To avoid embarrassing
estimation bugs, make sure that "system" data is at least 1GB.

Bug: 38008706
Test: cts-tradefed run commandAndExit cts-dev -m CtsJobSchedulerTestCases -t android.jobscheduler.cts.StorageConstraintTest
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.StorageHostTest
Change-Id: Ide1e6d0690e5ad4e751c87891f63ba1036434619
2017-05-30 23:51:06 -06:00
Daniel Nishi
4fcb5f6b7c Merge "Fix an override filter bug." into oc-dev am: 5cc0a122d3
am: 23c2cf1d68

Change-Id: I88545ebb5e3a1b05268b7485c0d7dc4323ff661f
2017-05-30 19:54:19 +00:00
Daniel Nishi
5d0888be75 Fix an override filter bug.
The override filter for storage to ensure that we filter by UUID and
user id was designed as an override filter. This worked as long as there
never was any other filters which could be used out of Storage Settings.
It turns out the instant apps filter applies here.

As a result, I've moved these filters into being "composite filters"
which are composed with the primary filter instead of overriding the
primary filter.

Fixes: 35245772
Test: Settings Robotests... but as for the composing part it is
b/34768986

Change-Id: I6f5acb909568ab02e81187c09fdda9533d635781
2017-05-25 14:23:29 -07:00
Phil Weaver
be39d57762 Merge "Follow O patterns for a11y settings" 2017-05-24 19:37:41 +00:00
Phil Weaver
ed5f0951f8 Follow O patterns for a11y settings
Move the summary for the toggled features to a footer.
Make the settings appear as a preference.

Bug: 36780887
Test: Start settings and observe the new UI looks a lot
like the mocks referenced in the bug. Also added unit
test to verify that summary text shows up.

Change-Id: I1d002b194991d0901ecb27198ba5de73bd23a5a9
2017-05-24 10:35:20 -07:00
Matthew Fritze
2078bc2358 Remove search2 package and put everything into search
Change-Id: Ie8651c79ef023f154cd7120a88a20f3481abce2b
Fixes: 38502743
Test: make RunSettingsRoboTests
2017-05-23 13:57:28 -07:00
Fan Zhang
462d852808 Fix bug where app list says "No app" in multi-window mode
Move updateUi logic from onPause/onResume to onStop/onStart.

Change-Id: Iebe38d201d531058472cd033a0408239d36d32e4
Fix: 36305836
Test: instrumentation test
2017-05-18 14:37:09 -07:00
Maurice Lam
2eb170cd6f Clean up choose lock intent creation
Consolidated the many variants of ChooseLock*.createIntent, so that
it will take the same set of arguments.

Also modified SetupChooseLock*.createIntent to modifyIntentForSetup,
which will take the intent created by ChooseLock* and modify it for
use with setup.

Test: cd tests/robotests && mma
Change-Id: I5ff033f459c33ec9980872a536b3996d89f2bbbb
2017-05-12 15:35:20 -07:00
Stephen Chen
41aa446c7f Merge "Added WifiSettings Espresso tests." into oc-dev am: 6c0f337d52
am: 95a98f0686

Change-Id: I03d14cabee02252e69ca0c5c0057489446866d4e
2017-05-08 23:45:32 +00:00
Stephen Chen
db332d4aa7 Added WifiSettings Espresso tests.
Added test cases for toggling Wi-Fi state, connected access points, and
saved network preferences.

Bug: 35322629
Bug: 35322690
Bug: 35322875
Test: runtest --path
packages/apps/Settings/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java

Change-Id: Iaba7fb2fa90cf0f37538c4b1ef141cf6b15d7f52
2017-05-08 14:48:01 -07:00
Daniel Nishi
31de4c1766 Merge "Fix a bug where override filter was always on." into oc-dev am: 408fd90102
am: 7d50d9db12

Change-Id: Ie9e9b3978e7a2f52fdd63e203a740068188dc285
2017-05-04 17:38:31 +00:00
Daniel Nishi
bf1f93698e Fix a bug where override filter was always on.
Change-Id: I1df52f13d8e335362d2eec18c968227ed9ecf299
Fixes: 37952170
Test: Settings unit test
2017-05-03 17:31:21 -07:00
Daniel Nishi
c90502627b Merge "Always use GB as the unit in Storage Settings." into oc-dev am: 833927929e
am: f917c0aa24

Change-Id: I632e27fe03241818447998464e1bdbfe96f4c6e5
2017-05-03 18:09:27 +00:00
Daniel Nishi
833927929e Merge "Always use GB as the unit in Storage Settings." into oc-dev 2017-05-03 18:00:19 +00:00
Daniel Nishi
cbeebe1b6c Merge "Filter on volume for category storage view." into oc-dev am: a41a190ac3
am: 854acc9e4b

Change-Id: I21c985df9ee34981b47c080756df5dc442f335b6
2017-05-02 17:09:37 +00:00
Daniel Nishi
a41a190ac3 Merge "Filter on volume for category storage view." into oc-dev 2017-05-02 17:03:36 +00:00
Jaekyun Seok
d427f4fef8 Merge "Do not show static overlays as a theme" into oc-dev am: 170acdb79b
am: 4a6781af1b

Change-Id: I2f4b1f9ab7e7947bb5c95aae7d7400113e4c266b
2017-05-02 01:24:29 +00:00
Daniel Nishi
5aeb6c4fab Filter on volume for category storage view.
The other storage view used a compound filter with a UUID filter and the
normal filter. The category filters were omitting the compound UUID
filter. This adds it.

Test: Settings unit test
Change-Id: Ic0118abf58dabbf430a81e1fbcefb7acfdef472c
Fixes: 37780836
2017-05-01 15:42:50 -07:00
Jaekyun Seok
ef85d880a5 Do not show static overlays as a theme
Static overlays aren't changeable by a user. So we shouldn't list them
as a theme.

This CL fixed b/36812704 as well to run unit tests.

Test: building succeeded and tested on sailfish.
      make RunSettingsRoboTests
      adb shell am instrument -w -e class \
          com.android.settings.display.ThemePreferenceControllerTest \
          com.android.settings.tests.unit/android.support.test.runner.AndroidJUnitRunner
Bug: 37480890
Bug: 36812704

Change-Id: I8c13b6956083095dceaab3da6642bef1647d6a30
2017-05-02 06:18:48 +09:00
Daniel Sheng
b74914eff3 Fixed crash when opening Camera Lift suggestion
Bug: 37742959
Test: manual + make RunSettingsRoboTests +
      adb shell am instrument -w com.android.settings.tests.unit
          /android.support.test.runner.AndroidJUnitRunner

Added missing SettingsGateway entry for Camera Lift Trigger settings
fragment.

Change-Id: Iddce7a672b0bb8430e3c7b3c346788fb23970636
2017-05-01 11:07:34 -07:00
Sundeep Ghuman
4b49c11d87 Merge "Force update APs when enabling wifi in WifiSettings." into oc-dev am: 9797a39ad7
am: f292f23c0c

Change-Id: I5490aab1d5b4845f912c6fcefda76587e09366ea
2017-04-26 18:54:10 +00:00
Sundeep Ghuman
9797a39ad7 Merge "Force update APs when enabling wifi in WifiSettings." into oc-dev 2017-04-26 18:32:48 +00:00
Daniel Nishi
0f127e98e5 Merge "Don't crash on opening ejecting USB." into oc-dev am: 32f95292bf
am: 3803bb966d

Change-Id: Ie26202f072f11983f2f1883811585f77db40f84d
2017-04-26 17:05:59 +00:00
Daniel Nishi
32f95292bf Merge "Don't crash on opening ejecting USB." into oc-dev 2017-04-25 22:30:14 +00:00
Daniel Nishi
63a11c56de Always use GB as the unit in Storage Settings.
Bug: 36901322
Test: Settings unit tests

Change-Id: I08c711db6a271522942a01d1adf3e8e5223010f7
2017-04-25 15:23:49 -07:00
Sundeep Ghuman
87bf49a436 Force update APs when enabling wifi in WifiSettings.
This reverts commit b2bdc8f17b
and fixes a broken Espresso test case.

Reason for revert: Rolling forward after fix in ag/2133493, to fix b/37324736

Bug: b/37324736
Test: runtest --path
packages/apps/Settings/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java

Change-Id: I9cdf8cb1043af5d527eccbd9cc56d3b02419d7ac
2017-04-25 15:12:00 -07:00
Daniel Nishi
4a150e75fd Merge "Gracefully handle null volumes after forgetting." into oc-dev am: d6d6185167
am: 8f68658aef

Change-Id: I1033e51c837c9ed51e424435e8b49cac7eca51dc
2017-04-20 18:54:28 +00:00
Daniel Nishi
d6d6185167 Merge "Gracefully handle null volumes after forgetting." into oc-dev 2017-04-20 17:05:29 +00:00
Fan Zhang
8adcd2f441 Merge "Add test to verify regulatory info launches properly" into oc-dev am: 4766183336
am: 2bb10c9e57

Change-Id: I9d58c7ee1154c640e570627477e97ffaeb68777f
2017-04-19 01:54:40 +00:00
Daniel Nishi
6b37d6341f Gracefully handle null volumes after forgetting.
If a user tells a device to forget a storage volume and then
goes back to the PrivateVolumeForget activity from their Recents, it
attempts to re-initialize itself with a volume that it forgot.

And this makes Settings crash.

By gracefully killing the activity when we try to open
PrivateVolumeForget for a forgotten volume, we avoid this crash.

Change-Id: Ib4e881c10f0c872ce6b268b16a573960230ef99b
Fixes: 34856304
Test: Settings unit test
2017-04-18 14:59:20 -07:00
Fan Zhang
06ee0e932f Add test to verify regulatory info launches properly
Test: runtest --path tests/unit/src/com/android/settings/RegulatoryInfoDisplayActivityTest.java
Change-Id: I531a05bde858790819ac11c8ffcea2f6d1942ec2
Fix: 34370866
2017-04-18 12:53:24 -07:00
Daniel Nishi
edafa44c7e Don't crash on opening ejecting USB.
This crash occurs because, even if you finish an Activity during
onCreate, the other lifecycle methods occur. In this case,
onActivityCreated assumes that onCreate ran properly.

By exiting early from onActivityCreated, we can ensure the activity
is finished properly.

Change-Id: Ia354341bf82d295c7dd042668fb11d588ddfebc0
Fixes: 37334861
Test: Instrumentation test
2017-04-18 12:19:36 -07:00
Jeff Sharkey
5d9ccedc59 Merge "Follow storage API polishing." into oc-dev am: e398a84199
am: 4ecbc32b48

Change-Id: Ie47474e46fa6ebfffdddad04ab8c99b332c4f8cc
2017-04-17 23:58:17 +00:00
Fan Zhang
b0c2ca7c07 Merge "Use standard preference layout for wallpaper picker" into oc-dev am: 8e1d588cdf
am: d96ce57713

Change-Id: I50bb90a53c74960465c73aafc8ae5ee0e8021b50
2017-04-17 22:33:08 +00:00
Christine Franks
8e1202b54e Merge "Add test for Settings#ACTION_NIGHT_DISPLAY_SETTINGS" into oc-dev am: c2d56691fe
am: f0320dd7aa

Change-Id: I7f4624486a8299c7e36b3eb97167795a2f5da380
2017-04-17 22:32:01 +00:00