Commit Graph

62 Commits

Author SHA1 Message Date
Christine Franks
be2370db13 Remove demo restrictions
These are now available as user restrictions.

Bug: 113298946
Test: make RunSettingsRoboTests -j100
Change-Id: I637083c8edcf43b99cebbf5a7dfd60afee441ade
2018-08-27 18:45:24 -07:00
tmfang
27c84de325 Settings Fragment Migration (Build pass app)
This patch focused on fixing compile errors and some runtime errors.

Test: We can't test it now. But we will have an integration test later.
Bug: 110259478
Change-Id: I16c471ddcd0fa1460c665b7f74d86fcace5ee67b
2018-07-11 18:24:51 -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
Joachim Sauer
95beae0089 Implement auto 12/24h setting toggle.
This implements an explicit toggle to enable/disable automatic 12h/24h
time formatting detection based on the current locale.

Previously automatic detection was the norm on a freshly wiped device,
but could never be re-enabled once either 12h or 24h format was
configured.

Bug: 32761619
Test: m RunSettingsRoboTests
Change-Id: Idbbb8f79fccec95e33bf2f12767d5736e1118fa7
2017-08-10 13:32:17 +01:00
Tony Mantler
1d583e125f Make PreferenceController a mixin
Bug: 62912136
Test: Existing tests in BaseSearchIndexProviderTest
Change-Id: Ieda359806c09a019840b2005446c7ec8b61fdb00
2017-06-26 10:58:36 -07:00
Fan Zhang
7e6df837ee Remove getCategoryKey() from DashboardFragment children.
Use the centralized registry to look up category key instead.

Bug: 32936784
Test: make RunSettingsRoboTests -j40
Change-Id: I0b8c72d70f93e4b5c58871ac90de41f69ad15653
2017-01-24 14:51:15 -08:00
Fan Zhang
beddff82b0 Move date/time prefs to PreferenceController and add tests.
Bug: 32996243
Test: RunSettingsRoboTests
Change-Id: Ie537bbcc35a96a63251e46f84b57c0a861b9d013
2016-11-21 16:42:14 -08:00
Fan Zhang
3d2efae43b Refactor time format preference to be more modular/testable
Change-Id: Ib6c06de9f942c3bb06384947f6b1923b33e511bc
Fixes: 32972964
Test: make RunSettingsRoboTests
2016-11-17 13:22:53 -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
jackqdyulei
fbab059e1c Adjustments based on the changes in ZoneGetter(settingslib)
In settingslib, now the two public functions in ZoneGetter have
the same logic(display the same name based on locale). This cl
is to deal with changes in Settingslib.

Bug: 19764807
Test: ag/1490275
Change-Id: I3e1c0bface752dc2ef4653ff58c4639c262964c1
2016-09-30 12:23:42 -07:00
Fan Zhang
20374fd211 Add metrics for remaining dialogs in settings.
Fix: 31707295
Test: make RunSettingRoboTests
Test: verify logs
Change-Id: Icf70900ac4472195624d14e9172207a5c85dccca
2016-09-23 13:03:31 -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
Fyodor Kupolov
ca060e3e98 Lockdown settings in retail demo mode
When running in demo mode, additionally disable
the following settings screens:
- Date & Time
- More (network settings)

Bug: 27280140

Change-Id: I3132d0c46b24e1e9ca3842af058073eee3df0c90
2016-06-24 13:17:47 -07:00
Jason Monk
78f7b416c0 Add minimum date
Change-Id: I928c99b7b2eb3dc35b2e25034dfe32a784355239
Fixes: 26346842
2016-04-20 15:44:21 -04:00
Jason Monk
d2e75e0528 Fix date and time and apn editing
Bug: 27219773
Bug: 25822074
Change-Id: Iec5d56846bf5d3a875180e8907529518949a0d7e
2016-02-17 17:28:46 -05:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Sudheer Shanka
9c32468cd5 Add padlocks to more preferences that can be disabled by policy.
Change-Id: I7cc999dd1d46c20c888e0ba67053564e4d50946b
2016-01-19 16:56:58 +00:00
Jason Monk
9d80eeabe7 Add some more summaries for Settings Home
Change-Id: Iaca8db6bdce87e667832b5b670e4eb027580b668
2015-11-30 10:57:33 -05:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Neil Fuller
b986442747 Modifications for changes to SettingsLib
See associated changes in frameworks/base for details.

Bug: 19058953
Bug: https://code.google.com/p/android-developer-preview/issues/detail?id=2132
Change-Id: Ic3393df28dd63ca75b203d1d0430d69cab7c40de
2015-06-09 10:10:56 +01:00
Tony Mantler
550015e476 Move ZoneGetter into SettingsLib
Change-Id: Ia998ae0bd7fc4c974e03df7c8fc380d98a3e71de
2015-05-28 14:49:19 -07:00
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04:00
John Spurlock
9a23adf69d Settings: Remove all unused imports.
Change-Id: Iebfa52cb849d69974c94902b0b020893cf5618a3
2015-03-18 15:51:15 -04:00
Elliott Hughes
ba5863929a am 3dd51556: Merge "Remove vestigial "Choose date format" option."
* commit '3dd51556bcbf7addcc17d29dd360165ee7ede1ee':
  Remove vestigial "Choose date format" option.
2014-11-17 17:37:35 +00:00
Elliott Hughes
30cc30864b Remove vestigial "Choose date format" option.
Almost all of our date formatting goes via icu these days, so this is
a no-op almost everywhere. (And should be a no-op everywhere soon.)
There's no obvious way to fix it, so remove it. UI guidelines say we
should use spelled out month names anyway.

Bug: 18322220
Change-Id: Ic9e903eceab3c096426f313bf4ef3a38644774e1
2014-11-14 11:16:16 -08:00
Fabrice Di Meglio
b98c40649e Fix bug #15730311 Checkboxes on R side should update to Quantum/Material on/off switch
Per UX request, use a Switch for:

- Automatic date & time
- Automatic time zone
- Use 24-hour format

Change-Id: Ie35816febe2469705446fdd2c703b52ff8b0929a
2014-10-13 16:02:25 -07:00
Sander Alewijnse
fe4eff6a65 Disable auto time checkbox if date/time locked down by DO.
Bug:16948504
Change-Id: I2a2b21684e17639233cd8c0dad7d3b44c4a2bd26
2014-08-27 15:01:11 +01:00
Narayan Kamath
0a2bc1cc76 Revert "Revert "Set 24 hour pref. with ACTION_TIME_CHANGED.""
This reverts commit 9ebc27c73e.

Change-Id: Id440bd004fee696472aeec9eefa5732755b19627
2014-03-11 13:05:37 +00:00
Narayan Kamath
9ebc27c73e Revert "Set 24 hour pref. with ACTION_TIME_CHANGED."
This reverts commit d5d9d37361.

Change-Id: I76eeb6f95a4cbbd241db1fb90528b4d91ddf7707
2014-02-27 12:00:08 +00:00
Narayan Kamath
d5d9d37361 Set 24 hour pref. with ACTION_TIME_CHANGED.
Sent as a boolean extra EXTRA_TIME_PREF_24_HOUR_FORMAT.

Change-Id: I7fbd59eacdeb298d046da950d7045f0bab53b462
2014-02-26 13:43:32 +00:00
Elliott Hughes
04487594d7 Fix time zone formatting in RTL locales.
This fixes ar, fa, and he/iw.

Bug: 10231161
Change-Id: I31acc044443c026ba8b8e1967810f7aa476bcae7
2013-09-18 15:07:43 -07:00
Elliott Hughes
81faf895d7 Use SimpleDateFormat for time zone formatting.
There's no need to do time zone formatting manually.

Change-Id: Ibef222d11d04a327e9ef64ddc48322558028555d
2013-06-25 10:16:27 -07:00
Elliott Hughes
b85d48fa43 Clamp date setting for the SetupWizard as well as Settings.
We fixed this for Settings in 7ccfa0614c,
but @sonymobile.com point out that it's still broken for SetupWizard.

Change-Id: I59348200105246f3ed7c0892e5f19b901d3e95ac
2013-06-24 17:24:01 -07:00
Sungmin Choi
7ccfa0614c use date from 1970-01-01 to 2037-12-31 in DatePickerDialog
In case of using DatePickerDialog, user could select any date
before 1970-01-01. However, the system clock cannot be set to
a date before 1970-01-01.
As a result, user couldn't select date before 1970-01-01.
So, use date from 1970-01-01 to 2037-12-31 of DatePickerDialog.

Steps to reproduce:
1. Settings -> Date & time
2. uncheck Automatic date & time
3. Set Date
4. choose any date before 1970 and Done

Change-Id: I075b3fcaa86df1c314c85dd3dd85474a28b8c637
2013-03-13 17:11:28 -07:00
Amith Yamasani
21b5aacf34 am 0aa79c73: am 60977265: Merge "Use AlarmManager calls to set date/time, instead of SystemClock.setTime" into jb-mr1.1-dev
* commit '0aa79c73948af7600f289928b18b3231d9679f81':
  Use AlarmManager calls to set date/time, instead of SystemClock.setTime
2012-11-16 10:48:59 -08:00
Amith Yamasani
5f05010438 Use AlarmManager calls to set date/time, instead of SystemClock.setTime
This way secondary users' settings app can request the system server to
set the time. Alarm driver cannot be opened as a secondary user.

Bug: 7459635
Change-Id: I1ae1630dc448021d35280a297c5d9960f8e8fc2e
2012-11-15 14:44:41 -08:00
Amith Yamasani
797d620084 am f9a2f324: Merge "Changed the way that date format selector is shown."
* commit 'f9a2f324d70cdbb4b0786f868ae01f99fe2734fb':
  Changed the way that date format selector is shown.
2012-11-01 08:44:46 -07:00
Fábio Silva
b6676bb6a3 Changed the way that date format selector is shown.
Changed the way that date format selector is shown excluding ambiguity when day and month have same value.
- i.e. 01/01/2012 (mm-DD-YYYY) and 01/01/2012 (DD-mm-YYYY)
Now it displays 31/12/2012 for DD-mm-YYYY and 12/31/2012 for mm-DD-YYYY.

Change-Id: I27434c9d5713491950d4f345dccf65d647d399cf
2012-10-26 20:05:27 -03:00
Christopher Tate
f1c085899d Correct settings namespace for auto time/tz
Bug 7148283

Change-Id: If585b16f5b6ea3046e64eb9c8355fa3c9fbeeada
2012-09-12 14:25:46 -07:00
Elliott Hughes
6c7f55ee4b Stop using getDSTSavings.
The original code was actually correct, but code calling inDaylightTime
and getDSTSavings directly is inherently suspect, so I want to clean up
this false positive along with the real abusers.

Bug: 6901488
Change-Id: I6c89e7aa29d88b81ed2c7fd6c915e0346b90a442
2012-09-06 15:42:09 -07:00
Elliott Hughes
82723df002 Stop hard-coding sample 12- and 24-hour times.
Bug: 6881640
Change-Id: I6b0d6404b0299f9efa8fd12779799f703f1c764f
2012-09-06 14:49:35 -07:00
Robert Greenwalt
8af88fb838 Use the new isNetworkSupported api for wifi-only
Didn't have an API for this before so people used a hacked system property (ro.carrier)
to determine if the device supported mobile data.  Added new API and switching callsites.

bug:5087537
Change-Id: Ibd799559be102a9e2fd552d1a23d1afbcf8f4614
2011-08-31 16:45:39 -07:00
Gilles Debunne
33ff115995 Bug AOSP 12476: Manual time setting resets seconds to 0.
Change-Id: If24d25050b3537832c3229cd84205f3b6cef1989
2011-07-28 14:16:51 -07:00
Kenny Root
151b0e1174 Change dummy calendar setting during locale change
If the timezone changed too far, the example date would be "1/1/yyyy+1"
instead of "12/31/yyyy"

Move the setting of the Calendar time to where the string is calculated
to make sure we have the most up-to-date Locale.

Bug: 4596841
Change-Id: I67a253a65b1ea03ee717945c5df819beb8515662
2011-06-12 20:54:53 -07:00
Freeman Ng
7f6f6e18c9 use prefs-style layout for setup wizard date/time settings on non-xlarge screens
Adjusted the screen size test to fall back to phone version of
DateTimeSettingsSetupWizard on large screens.

I made the following changes from how the phone version works:

1. Some layout changes. (Tablet look, bigger margins.)
2. Use zone picker to select time zone.
3. Added isFirstRun boolean extra to hide the pref fields
we don't need to see from setup wizard

Furthermore, I made the following fixes to the existing phone flow
(which had probably never yet been tried on a phone):

1. Added conditionals around access to some variables that only
exist in the xlarge layout.
2. Implemented PreferenceFragment.OnPreferenceStartFragmentCallback
in DateTimeSettingsSetupWizard in order to catch the user tapping
on the timezone preference and show the time zone picker popup.
(Note: for phones in ICS, we might want to launch the zone picker
preferences style, like it would have been had this been a
PreferenceActivity. Or maybe we should just create a separate
DateTimeSettingsSetupWizardPhone activity that subclasses
PreferencesActivity and doesn't need to play this trick.)

Change-Id: Ib5774a005c9f44d730d86c13746d91eb712141cc
2011-06-06 12:40:28 -07:00
Amith Yamasani
c06d4c48a9 Remove more entries not relevant to wifi-only devices.
Bug: 3488384
Bug: 3487976
Bug: 3488381

Removed Cell standby entry from Battery use screen.
Removed Mobile signal strength from BatteryHistory screen.
Added wifi IP address to About->Status
Remove auto-timezone checkbox in Settings->Date & time

Change-Id: I228721a3613b1aeb600026e42274337886552698
2011-03-01 12:03:24 -08:00
Svetoslav Ganov
126f5ecf4f removing explicit setting of time/date pciker dialogs
Change-Id: Ic92a3de895735fc019ca506f904d63f23c82ec8f
2010-12-07 13:33:20 -08:00
Amith Yamasani
ea07165ef2 Bug fixes, UI flow improvements.
Bug: 3173067 - Auto timezone checkbox out of sync with dependency
Bug: 3175116 - Crash when launching Manage Accounts screen
Move "Add Account" to a menu item from a button at the bottom.
2010-11-08 15:24:17 -08:00
Amith Yamasani
1bb6db5267 Add an Automatic Time Zone setting to Date & Time settings.
User can now enable auto-time but disable auto-timezone, especially
if we don't have NITZ time from the cell network (or wifi only)
and only have NTP time that gives us date and time.
2010-09-22 11:33:04 -07:00