Commit Graph

37 Commits

Author SHA1 Message Date
Edgar Wang
e19ee9a01f Revert "Settings search - Navigate user to exact page"
This reverts commit 08f2a58459.

Reason for revert: design changed, we decide to take the user to
the entry after clicking on a search result.
It's opposite with what we did, so we revert related CL first.

Test: robotest

Change-Id: Iadb9a94a7ef7838be34a54499e2d934d6396c336
2020-01-16 14:07:38 +08:00
Edgar Wang
08f2a58459 Settings search - Navigate user to exact page
- remove duplicate index preference
- default set searchable = false when the preference has fragment
- make some fragments indexable

Bug: 143057584
Test: robotest & manual

Change-Id: I4d64f6106d2f92f0a45e8c7e26388677f593f412
2019-12-24 21:04:11 +08:00
Raff Tsai
966fa01423 Use SettingsLib Indexable
- Use SettingsLib Indexable
- Directly use resource id in getPreferenceScreenResId

Bug: 135053028
Test: roboletric
Change-Id: I05f493b55e8b6e2091301e9231ba5615215618e6
2019-09-25 18:24:56 +08:00
Raff Tsai
ac3e0d0988 Directly use BaseIndexableProvider
- Add function getXmlResourceId, Fragments don't need to write
xml resource id twice.
- Remove getPreferenceControllers from Indexable.java. Because it will
move to SettingsLib later for other apps which don't need this function

Bug: 135053028
Test: robolectric
Change-Id: I1e74519aecdea3dde64a5aea79f08d766dbc0003
2019-09-24 00:35:52 +08:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -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
Tony Mantler
0fcd6cbaa8 Autogenerate SearchIndexableResources subclass
Bug: 77148954
Test: RunSettingsLibRoboTests RunSettingsRoboTests RunSettingsGoogleRoboTests RunArcSettingsRoboTests
Change-Id: I842c42c55014c3310070ef22bd4f0d9a70dfd804
2018-04-03 10:26:55 -07:00
Fan Zhang
f7843adabd More renaming in DashboardFragment
getPreferenceControllers() -> createPreferenceControllers() for the same
reason as in ag/3647936

Bug: 73668763
Test: robotests
Change-Id: I97670a91a2a38d1c844d1b9d37f4222c5e6f45a0
2018-02-23 16:56:30 -08:00
Fan Zhang
aed8994f6f Rename Indexable::getAllPreferenceControllers.
To getPreferenceControllers. "all" is redundant. Then internally, the
old getPreferenceControllers() is renamed to
createPreferenceControllers() to emphasize the controllers are created
from code (versus the ones created from xml).

Bug: 73668763
Test: robotest
Change-Id: Ifec46aefdc2a418031c8e152028b30bdcd396fc7
2018-02-23 16:37:28 -08:00
Daniel Nishi
da4fa80717 Centralize the automatic storage manager on check.
Bug: 70893105
Test: Existing tests pass.
Change-Id: I83fa0e1033eb530a02eca230d0dd79495cbcbc9d
2018-02-14 11:13:55 -08:00
Fan Zhang
87d120a7e1 Override switch bar string for wifi/battery saver screen
Bug: 69462439
Test: visual
Change-Id: I18d03ee1664f111222d7b9bb7ee893e4ce0e1343
2018-01-11 15:17:14 -08:00
Fan Zhang
e0b0e9f902 Refactor help menu stuff into a controller
This is a clean up to action bar menu item pattern, we will use the same
pattern to build search icon on all pages in a later change.

Bug: 68814716
Test: robotests
Change-Id: Iedd3ec263e8ccb63ed75ec7a95b28c00878b1de4
2017-11-29 15:51:04 -08:00
Daniel Nishi
59c8d77c8c Re-add the block of text explaining the feature.
When the automatic storage manager  is off (or has never been run), we
display a block of text that explains what it does. In order to make
this testable, I've implemented the feature in a PreferenceController
and upgraded the existing AutomaticStorageManagerSettings class to be
closer to the newer Settings IA.

Change-Id: I3f7d20347a6d5a7bae8bffcd2014c3fdcd315b90
Fixes: 63082545
Test: Settings Robotest
2017-09-08 09:58:05 -07:00
Daniel Nishi
9b868d95ea Use the config default days to retain.
This avoids using the static value to determine the default number of
days to retain.

Bug: 38499322
Test: SettingsLib robotests
Change-Id: Ia0f569407a5a2a85a173e90c22f6b413776564db
2017-05-23 16:05:15 -07:00
Daniel Nishi
fa3766a220 Don't show warning dialog on opening ASM settings.
On older devices, the activation warning dialog would show upon the
switchbar changing to On. This was occurring when the page opens
because the status was changing onResume. By shuffling the switchbar
changes into the ASMSwitchBarController, we can register our listener
after the initialization of the switch bar's first status.

Change-Id: I3610d07345684d1e66444981a8059d1c2965e955
Fixes: 37472724
Test: Settings robotests
2017-04-19 14:04:50 -07:00
Daniel Nishi
1ee13fd386 Update the automatic storage management preferences.
This updates this page to match the newer mocks. The changes
include:

* Changing the toggle from a switch to a switch bar.
* Removing the Deletion Helper flow from the screen.
* Unit testing the previously untested functionality.

Change-Id: I35eb1e065c9acfbf32a64d659d35e18034025472
Fixes: 36486021
Test: Robotest
2017-04-03 13:05:08 -07:00
Daniel Nishi
abd92e0519 Update the Manage Storage preference.
Now, it is a master switch preference which can toggle the
automatic management on/off. This also removes the old
UI in the storage summary at the top.

Bug: 33199077
Test: SettingsRoboTests

Change-Id: I709fd2ca0687f760a5d97ad6bebe477b427b0464
2017-03-08 10:18:43 -08:00
Daniel Nishi
99228286a4 Remove Downloads backup options.
Bug: 32338407
Test: Manual -- Downloads was added before we really started adding
tests.

Change-Id: Ifd8b3dcd42e7c5c4017bdbc7e6aedcab653f216d
2017-02-07 16:57:04 -08:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00:00
Daniel Nishi
a2e0824b26 resolve merge conflicts of a4e3842 to master
Change-Id: Ia52171f3cfa0bcb73c6a4d23122ef8ad9025e807
2016-09-28 13:20:27 -07:00
Daniel Nishi
116b95666f Add a warning message to the ASM toggle.
This trigger fires if ASM is not enabled by default for
the device and the toggle is only visible if the ASM visible
flag is enabled.

Bug: 30455784
Change-Id: Id6adf8a75dbd4290f042d743689a75f496efb0c9
2016-09-27 17:46:52 -07:00
Fan Zhang
5b9762bc09 Use MetricsFeatureProvider in storage manager fragment.
Bug: 31664539
Test: make RunSettingsRoboTests for regression
Test: adb logcat -b events | egrep "(sysui_|notification_)" for
      verifying log

Change-Id: I65743b87fdf6f010e40ca705e33e18642e0bfca3
2016-09-22 10:26:10 -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
Jorge Gil
6f44493338 Add switch to enable downloads backup.
Bug: 30503075
Change-Id: I011d88d16ab8677b63b73e059f0edf823cc82389
2016-08-08 21:11:27 -07:00
Daniel Nishi
4a184d4360 Add a dropdown for changing the days of retained downloads.
Bug: 30304998
Change-Id: I3113d58313a4badff55f79988abd7612d3bb4da5
2016-07-22 14:02:52 -07:00
Daniel Nishi
f21465e14f Add a help item for the Help & Feedback for the Storage Manager.
Bug: 29793176
Change-Id: Ic4104525961e7f173212df54f19857a06c0fac05
2016-07-19 15:47:10 -07:00
Daniel Nishi
2aa423dda6 Log when the storage manager is toggled on and off.
Bug: 30095915
Change-Id: I9fe16f842f2c2944582ec231803aa957573abead
2016-07-12 13:59:22 -07:00
Daniel Nishi
1b9afaff2b Add text to the Manage Settings page to show freed storage.
Bug: 29643106
Change-Id: Id05dc70e36a690e27cab67fecf921257ed7baf15
2016-06-29 14:48:50 -07:00
Daniel Nishi
bf8f896879 Update the deletion helper intent string.
Bug: 28675265
Change-Id: Ic56e1617d0cf66e347c3a9b31592de4737b19bb3
2016-06-21 16:06:12 -07: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
Daniel Nishi
776c9eca39 Use Settings.Secure for days to retain.
Previously, we used Shared Preferences, which worked when the
storage manager was localized to Settings. Now that it is in
its own separate APK, we need to use a separate setting to configure
it.

Bug: 28965462
Change-Id: I073859ef1a764679bbc63d3c0cd96af82306212e
2016-06-13 10:47:23 -07:00
Daniel Nishi
80c204420b Add an automatic storage management job service.
This service runs once a day when plugged in when the device has
under 15% free space remaining. If the FeatureFactory has a
storage management job, it runs the job to begin to free up space
on the device.

This is a temporary landing place and will be refactored very
quickly out of Settings.

Bug: 28600825

Change-Id: Id2ebb42a333b3b4e3daef4e50cf985fe055b85c7
2016-05-31 16:50:48 +00:00
Daniel Nishi
ed39bf639b Hook up the automatic storage manager settings with the flag.
This allows the settings menu to actually toggle the feature on
and off.

Bug: 28905328
Change-Id: I132c0930970b70a0f88b8fc21e85b6829aaef8c8
2016-05-25 10:03:17 -07:00
Daniel Nishi
ba03d2ff21 Update the storage manager settings to match the mocks.
Bug: 28560570
Change-Id: I0f218da1d23b687e38c52b5a927f7b84645958c7
2016-05-23 13:27:30 -07:00
Daniel Nishi
116a55cdab Add the automatic storage manager settings.
This provides a toggle for changing if the storage manager
is turned on or off and how many days of data to retain.

It is currently not hooked up to anything currently and only acts as
the view, pending b/28600825.

Bug: 28560570
Change-Id: Iaa2d819f26addab4dc02ced80e9ba79e0fcf0980
2016-05-17 09:32:12 -07:00