Commit Graph

396 Commits

Author SHA1 Message Date
tmfang
d97fba5f0f Fork SettingsDrawerActivity in Settings.
Settings app uses fragment classes from android framework,
which is deprecated as of P.
We need to switch to use fragment and associated classes to androidx.

Because Settings didn't support drawer feature since Android O,
we rename SettingsDrawerActivity to SettingsBaseActivity.

Before we migrate to fragment of androix,
we need to let SettingsBaseActivity extend FragmentActivity.

Test: make RunSettingsRoboTests
Bug: 110259478
Change-Id: Ifbf53f75f042da1618da16cf7837b70d298a9a14
2018-06-28 13:38:16 +08:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Fan Zhang
cd21cb8def Remove DataSummaryUsageLegacy.
Change-Id: I8da039530cafe547008b434b6016add5f9383e94
Fixes: 109943959
Test: robotest/atest
2018-06-11 11:05:54 -07:00
Gilbert Lee
0b4722f088 delete DeviceInfoSettings and activity, pref xml
Fixes: 78653510
Test: Manual

Change-Id: I13379f3f7812ceedffc0e9647db15e6358a3dc17
2018-05-20 16:17:43 +08: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
Christine Franks
986d02f03c Remove demo-specific Developer Options logic
Bug: 78654980
Test: make RunSettingsRoboTests

Change-Id: Ia0f3c10a6c73b3067a9f476af6e982e3ca60a46b
2018-05-08 19:50:49 +00:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Fan Zhang
2223050dc8 Add some debug logging
- Increase logging in SettingsActivity's onCreate and launch fragment
  flow.
- Log class name when enable/disable tiles

Bug: 75030092
Test: logcat
Change-Id: Ieb00228562a79c12aba2198021ece505bc371b58
2018-03-28 15:39:07 -07:00
Lei Yu
68ffee1a7d Remove the old battery page
This CL removes PowerUsageSummaryLegacy and PowerUsageAdvancedLegacy
and their related layouts and strigns.

Also remove the isBatteryV2Enabled method in feature provider.

Change-Id: I1ec30f713d733ed24335a3e698fb515751232948
Fixes: 76027338
Test: robo test still pass
2018-03-26 17:40:10 -07:00
Jason Monk
f6edc7c80a Add option for settings to push to a device index
The index implementation is optional and left up to the OEM.

Test: Open settings, see content in index
Test: robo tests
Bug: 68378569
Bug: 76102600
Change-Id: Idb8bb1e0cabbbe92e7a852e2eadbdcd8c2ab7d56
2018-03-23 09:36:57 -04:00
Christine Franks
4c3c7fbfa6 Allow developer options in retail mode
Also, add new tests and fix existing tests.

Bug: 70985064
Test: make -j100 && make RunSettingsRoboTests -j100
Change-Id: Ied84cf0de02e18c10949eed4f3642782c1246e7b
2018-03-20 16:32:50 -07:00
Fan Zhang
e8666c6664 Correctly propagate bundle extra from intent to fragment
When someone launches settings intent and include args for fragment, we
should propagate the args to fragment.

Change-Id: I231a675123f056043e96ffad7498da6b9bc16687
Fixes: 74017572
Test: manual
2018-03-05 21:35:31 +00:00
Tony Mak
e226b38409 Only enable up button if device is provisioned
Test: Carry out QR provisioning, observe that no more back button
      in the nav bar of wifi picker page
Test: After SuW flow,
      Run adb shell am start -a android.net.wifi.PICK_WIFI_NETWORK
      Observe there is a back button in the nav bar.

Change-Id: I50ec5b2c465eee87f5a7906e3353a0070c65e2ee
FIX: 74059636
2018-03-02 18:23:46 +00:00
Fan Zhang
cfd79a9a7a Fix crash when launching about phone v2 through intent
Change-Id: Ife6c24a7127fc9821760f9f5b58a33437711bc25
Fixes: 73971752
Test: atest
2018-02-28 10:21:32 -08:00
Jerry Zhang
40bd570352 Remove unused classes and tests.
Old usb pages have been replaced by UsbDetailsFragment
and UsbDefaultFragment. Old connected devices has
been replaced by new connected devices.

Bug: 70848054
Test: Passes
Change-Id: I538cbb88d4f878449a83da9a4a0381e74e840c6a
2018-02-27 13:50:10 -08:00
Fan Zhang
47854c2945 Migrate more places to subsetting launcher
Bug: 73250851
Test: robotests
Change-Id: Iaf29df45ddb42fd58f181cb01e10998a97cb7c34
2018-02-19 14:21:05 -08:00
Fan Zhang
be45f9c865 Migrate more settings to SubSettingsLauncher
Bug: 73250851
Test: robotests
Change-Id: I4100bef20e2ed477e4e31c9b7816f1b03f3f2809
2018-02-19 13:36:57 -08:00
Fan Zhang
7cf99f5f12 Migrate more settings to use SubSettingsLauncher
Bug: 73250851
Test: robotests
Change-Id: I08f6f380489646231d6d8ceb1488e2efb036bf69
2018-02-18 21:10:03 -08:00
Fan Zhang
615563db0c Migrate more subsetting launching to SubSettingLauncher
Bug: 73250851
Test: robotests
Change-Id: Ic0bf23f6ac6f717bdd3d477fdb84af68badae8e6
2018-02-15 15:39:56 -08:00
Fan Zhang
2edbaa7062 Change print setting from a dynamic tile to static pref
...because dynamic tile is a lot harder to index correctly.

- Removed metadata that makes PrintSettings a dynamic tile.
- Added PrintSettings into connected_device xml.
- Added a new PreferenceController - all summary updating logic is
  copied from PrintSettingsFragment

Change-Id: I41e7c9d23e97ecd5a043ac7c33f2d404260c92e7
Fixes: 73128944
Test: robotests
2018-02-12 15:19:43 -08:00
Fan Zhang
39a5eb5f20 Merge "Move restriction check for dev settings into controller" 2018-02-08 21:51:50 +00:00
Fan Zhang
155d6829e9 Move restriction check for dev settings into controller
Change-Id: I99dae6e82aca40b92e1965ba7db2c54f3c59d33f
Fixes: 72815875
Test: robotests
2018-02-07 22:33:10 -08:00
TreeHugger Robot
c9f1d89dd3 Merge "Remove dead code for DataPlanUsageSummary" 2018-02-08 06:21:11 +00:00
TreeHugger Robot
682bb3e8e5 Merge "Add feature flag for new DataUsageSummary fragment." 2018-02-08 04:55:56 +00:00
Fan Zhang
3ed55b1450 Remove dead code for DataPlanUsageSummary
This is an unfinished feature, no longer needed.

Change-Id: I358dcc8865184117d49e35b3e8dfcd84403261d0
Fixes: 73073608
Test: rebuild
2018-02-07 20:35:56 -08:00
Eric Schwarzenbach
98998a2fcc Add feature flag for new DataUsageSummary fragment.
Creates a new fragment DataUsageSummaryLegacy, which is used
instead of DataUsageSummary when the feature flag is off (default
behavior).

Copies the current DataUsageSummary.java, data_usage.xml, and
DataUsageSummaryActivity to create the legacy versions. This
change allows for uninterupted development of new features in the
DataUsageSummary fragment.

Test: manual
Test: make RunSettingsRoboTests
Bug: 70950124
Change-Id: I9d79e108bbfc1c8ec620f86c0183f4ed3f41c9d7
2018-02-07 14:29:41 -08:00
Fan Zhang
f11c885766 Pre-fixup for nav up button
- Remove SettingsDrawerActivity.EXTRA_SHOW_MENU and force up nav button
  to always show. The button doesn't do anything yet. It just finishes
  current activity.
- Remove dead code about suggestions

Change-Id: I61fa9fefbaa9bced841a05969544b1c824c564ce
Bug: 72337421
Test: rebuild
2018-02-07 10:27:18 -08:00
Fan Zhang
6013a95b9e Misc fixes on settings search
- Remove some unused resources
- Disable contentDescription on search icon in homepage

Change-Id: I214b2be3db4fe4c12932763acfb40b6272b43600
Fixes: 72958338
Test: talkback
2018-02-06 12:25:14 -08:00
Fan Zhang
73dc479ab5 Remove security settings v1 code
Change-Id: I958ed1588009b91f64cd8ecb98208e72a891903e
Fixes: 32953042
Test: robotests
2018-01-29 13:17:05 -08:00
Fan Zhang
881d579620 Misc fixes for User page and my device info page
- Rename UserAndAccountDashboard* to AccountDashboard*
- Move emergency info from account to device info page

- Move auto sync data toggles (4 of them) from Account page to user page
   - Move the controllers too. UserSettings is a not a DashboardFragment
     so I had to manually call each controller method.
     TODO: refactor UserSettings to a DashboardFragment

- Move legal information/regulatory info above advance button within device info page.

Fixes: 72523158
Bug: 71871075
Test: robotests
Change-Id: I1b8af8af61e49d17926f984978a09a974b6c62e1
2018-01-26 12:39:34 -08:00
Leif Hendrik Wilden
28dee1f086 Migrate to use instrumentation classes from settingslib.
Test: Compiles. Manually tested.
Change-Id: I70a6e76cc8440547746ecc008c32bd06a7de8161
2018-01-24 12:30:39 -08:00
TreeHugger Robot
06af7c8d4b Merge "Add a new About Phone page." 2018-01-23 07:04:29 +00:00
Daniel Nishi
1e620957b8 Add a new About Phone page.
This adds the "Me Card" page. The current functionality is to show
information based upon the first account added to the system. The page
shows the user's avatar, name, primary account, and phone number.

Bug: 63819909
Test: Robotest

Change-Id: I64bfae922e828994b2b87009d0647e67dab0da42
2018-01-22 17:21:10 -08:00
Leif Wilden
cab0ee611d Revert "Migrate to use instrumentation classes from settingslib."
This reverts commit 1546cca529.

Reason for revert: Broke fingerprint setup flow. b/72267201

Change-Id: I8321265ae64732c526325882ddea51080decddf5
2018-01-22 20:57:36 +00:00
Leif Hendrik Wilden
1546cca529 Migrate to use instrumentation classes from settingslib.
Test: Compiles. Manually tested.
Change-Id: Ie5515bb0fe3e621fc7723a9b04ba23e4bfa9c401
2018-01-18 11:13:24 -08:00
Fan Zhang
f314494f32 Fork SecuritySettings page and hide behind a feature flag.
Bug: 32953042
Test: robotests
Change-Id: Ibbb4221eef87f09ccd024146517707680180a100
2018-01-02 13:42:53 -08:00
jackqdyulei
166102c3c0 Add feature flag for battery settings page.
Create PowerUsageSummaryLegacy and power_usage_summary_legacy, which
contains the old implementaion.

Bug: 69797586
Test: RunSettingsRoboTests
Change-Id: Icb9c25f06889462a6eedea48ae166043a6636848
2017-12-05 13:15:13 -08:00
Fan Zhang
e096ae7acb Change style of search bar text to allow OEM costomization.
Change-Id: I78dbe6780e3a4adefe82a36400d9fff8c1de92e3
Fixes: 68814716
Test: visual
2017-11-30 14:51:27 -08:00
TreeHugger Robot
03b2d4c44c Merge "Disable DevelopmentSettingsActivity by default" 2017-11-23 01:47:53 +00:00
Fan Zhang
831f6302ee Disable DevelopmentSettingsActivity by default
And if for any reason monkey user is able to enter develop option page,
we show nothing.

And update some test to sdk 26.

Change-Id: I3f985e7fe14bd290db73b8c46dd817591df02015
Fixes: 68707778
Test: robotests
2017-11-22 14:44:23 -08:00
jackqdyulei
76ba0f72e4 Add feature flag for connected device
Add feature flag to toggle connected device between new and old
feature.

ConnectedDeviceDashboardFragment will contain new feature will
ConnectedDeviceDashboardFragment2 will hold old feature.

Bug: 69333961
Test: Build
Change-Id: I0ea932c69dea5242129aab994d5142b1f87fbea0
2017-11-20 15:29:28 -08:00
jeffreyhuang
cb823d5983 Delete DevelopmentSettings.java
- Remove the old DevelopmentSettings
 - Remove references to the feature flag

Fixes: 65522949
Test: make RunSettingsRoboTests -j40
Change-Id: Ie2eb3465127d79a027de6bb58a47bb15e3094f89
2017-11-17 13:52:33 -08:00
Doris Ling
4a01283309 Remove the feature flag for using new title.
- remove all code that check for the feature flag, and use the new logic
by default.

Change-Id: I7fbe60da84c1c0f35e7241402a71d2bc4cd300e6
Fixes: 64564191
Test: make RunSettingsRoboTests
2017-11-13 17:58:13 -08:00
Fan Zhang
ff4da23a65 Create a feature flag for Search v2.
Also moved all other flags in a common file so we can track them more
easily.

Bug: 68825426
Bug: 64938328
Test: rerun robotests
Change-Id: I3fc805054cb960bedd965b1b907be759df50b95d
2017-11-09 14:57:08 -08:00
Doris Ling
1a6887bbd3 Set activity title from preference screen title.
- When we initialize the preference screen, if the screen title is
available, use that to set the activity title, so that it will be up to
date with dynamic language changes.
- for preference fragment that don't have preference screen xml, added a
getTitle() method for the fragment to provide the title explicitly.
- use feature flag to switch between the old and new mechanism for
handling activity title.

Bug: 64564191
Test: blaze-bin/screenshots/android/i18nscreenshots/i18nscreenshots
Change-Id: I96318a5aa81e7b8ca94118adac3245ed27a03d93
2017-10-20 22:46:12 +00:00
jeffreyhuang
142682c19c Hide dev options v1 under feature flag
- Cutover to DevelopmentSettingsDashboardFragment
 - Add dev_option_v1 feature flag

Bug: 34203528
Test: make RunSettingsRoboTests -j40
Change-Id: I2ff7b5c55f1f27cd24b4e276d3d81a73f67dcf88
2017-10-17 13:49:19 -07:00
Fan Zhang
a8cac7a409 Move ManageApplications to sub package and remove dead code
Bug: 64804294
Test: rerun test
Change-Id: I23cbd8da9b65f52470030ba3b9b676ece2bada11
2017-10-12 13:48:54 -07:00
Fan Zhang
4c26da9e13 Fork a new developer options page.
- Create a new activity/fragment and add it to manifest
- Mark old activity/fragment deprecated
- Enable/disable the new activity based on FeatureFlag
- Initial skeleton code for new fragment

Bug: 65522852
Test: make RunSettingsRoboTests -j40 ROBOTEST_FILTER=DevelopmentSettingsDashboardFragmentTest
Change-Id: Ib1395693f8b6f61d4726573a9ea841ea53cf207b
2017-09-10 15:02:51 -07:00
Fan Zhang
3f6c90eb34 Merge "Delete DynamicindexableContentMonitor & all refs to it" into oc-mr1-dev am: 5b820431d3
am: a8f7f745e1

Change-Id: Ifd5618ddad3fcc9a535fe719470e67946bcd9d2d
2017-08-10 02:30:57 +00:00
Fan Zhang
e3535d9998 Delete DynamicindexableContentMonitor & all refs to it
Convert input device search into a search query loader

And remove old logic from DynamicIndexableContentMonitor

Change-Id: If652b1ea7c8add9185bbd025055e14925d3a8eec
Bug: 64310452
Bug: 63831980
Test: robotests
2017-08-09 17:27:02 -07:00