Commit Graph

98 Commits

Author SHA1 Message Date
Jeff Sharkey
b654846300 Data Usage, materialized!
Asset drop so Data Usage matches new Material spec.  Removes time
dimension sweeps, so we now summarize the entire visible axis.  Fix
time axis labels to not draw outside clip bounds.  Remove pie chart.

No more checkboxes in menus.  Telephony items like roaming are moved
back to cellular settings.  Start wiring up multi-SIM support.

Bug: 15760500, 16019700, 16289924, 16303795
Change-Id: Ie8f4821962319bb82ff4bc2f13f1f66ba1bdfe65
2014-07-22 16:24:37 -07:00
Alexandra Gherghina
6d839875b7 Revert "Revert "Move global sync settings to AccountSettings.""
This reverts commit 4869faf465.

Change-Id: I58df9b8161d711a9c0187af1f1a1dc279fb9d9ab
2014-07-22 20:25:24 +00:00
Alexandra Gherghina
4869faf465 Revert "Move global sync settings to AccountSettings."
This reverts commit 64fde6f4e9.

Change-Id: I61940b6e2936c7c7f048af222602226e5588c268
2014-07-22 12:01:54 +00:00
Alexandra Gherghina
64fde6f4e9 Move global sync settings to AccountSettings.
It also makes AccountSettings respond to the SYNC_SETTINGS intent, which
it is currently triggered by Calendar and could be triggered by Gmail.

Bug: 16076571
Change-Id: I2c55262a87e46ba88f36a90a2f8f27d08f88e851
2014-07-22 12:00:10 +00:00
Fabrice Di Meglio
c70b7f6f35 Improve Search results highlighting
- remove unnecessary code
- use keyed Tag with a well known App key for preventing collisions
- fix missing Brightness Level preference key (used for highlight)

Change-Id: I070e3b8c3cb43da7addd34be192aade21951f57c
2014-06-19 13:58:22 -07:00
Fabrice Di Meglio
6ebcc36514 Update more colors in Data Usage Summary
- use colors from the Settings Theme
- code cleaning for use the Theme accent color constant
instead of raw color value

Change-Id: I04ec913f0b8048b6e50069213e9d92992168fe18
2014-06-18 12:56:04 -07:00
Robert Greenwalt
0d4c500e98 Move mobile data dis/enable to Telephony
ConnectivityService doesn't do this anymore.

bug:15077247
Change-Id: I3208c91b2c0369b594987f39ca29da7478435513
2014-05-21 23:18:02 -07:00
Fabrice Di Meglio
2169c88a14 Code cleaning
- use constants where needed for the tag/key
- remove wrong tag

Change-Id: I32578ce6a3a604dc0ea7168206a5d84391e2cce7
2014-04-18 15:18:40 -07:00
Fabrice Di Meglio
f2a5226c1e Improve Preference highlighting
- use PreferenceFragment.onBindPreferences() to launch  highlighting
- improve SettingsPreferenceFragment code for highlighting: now we can
find the View to highlight thru its Tag if there is no ListAdapter available
- add HighlightingFragment for highlighting a View from its tag/key. This
is dealing with cases when the content is custom and not relying on
SettingsPreferenceFragment (like DataUsageSummary)

Also:

- improve DataUsageSummary so that onResume() is not recreating the
Tabs all the time
- add missing "android:keys" on some Security Settings preference files

Change-Id: Ib1dd8238fe2fb57c151d584c0810a0e0a5ad97c4
2014-04-18 13:42:46 -07:00
Fabrice Di Meglio
45f754e506 Add Indexable.SearchIndexProvider.getNonIndexableKeys(Context)
- getNonIndexableKeys(Context) allow a SearchIndexProvider to tell which data
he does not want to index by providing a list of the data keys
- use this new API for SoundSettings and removing KEY_EMERGENCY_TONE related
settings if the device is not CDMA
- add a BaseSearchIndexProvider for code simplification

Change-Id: I23633ace1d7e390ee05fac0a5458a33e04e72d8d
2014-04-11 11:16:33 -07:00
Fabrice Di Meglio
758c3ff8e9 Fix bug #13962001 Search - need to finish indexing "Data usage" Settings
- index missing strings

Change-Id: I015452b58bf7dc576bce8fee03b55b38c0094097
2014-04-10 14:45:18 -07:00
Fabrice Di Meglio
063e7cfd78 Code cleaning for DataUsageSummary
- remove unused import
- remove dead code

Change-Id: I4e8f24e57fc4ca6d731e68da93ac7f748e709c26
2014-04-09 19:02:54 -07:00
Fabrice Di Meglio
90f7a6e06e Fix bug #13167668 stability-sys: Java crash in com.android.settings:
...java.lang.RuntimeException: Unable to destroy activity {com.android.settings/
com.android.settings.Settings}: java.lang.IllegalStateException:
Can not perform this action after onSaveInstanceState

- revert the change that was done by

https://googleplex-android-review.git.corp.google.com/#/c/148273/2

Also the OnItemClickListener has been changed since that time to cope
with the initial issue.

Change-Id: I0e3a44e6340f5576bb0f46d5a6c6a5824a44b406
2014-02-24 18:37:06 -08:00
Fabrice Di Meglio
263bcc8b73 Use Drawer in Settings app
- get rid of PreferenceActivity as much as we can and use fragments instead
- add Drawer widget
- add Dashboard high level entry into the Drawer (but this is work in progress and would be done in another CL)
- add bypass of fragment's Header  validation when launched from the Drawer but *force* validation if external
call thru an Intent

Be aware that WifiPickerActivity should remain for now a PreferenceActivity. It is used by SetupWizard and should
not trigger running the SettingsActivity's header building code. SetupWizard is a Home during the provisionnig process
and then deactivate itself as a Home but would make the Home header to appear in the Drawer (because momentarily we
would have two Home).

Also, verified that:

- the WiFi settings still work when called from SetupWizard
- when you have multiple Launchers, the Home header will appear in the list of Headers in the Drawer

Change-Id: I407a5e0fdd843ad7615d3d511c416a44e3d97c90
2014-02-03 16:36:46 -08:00
Amith Yamasani
32aa0bfdd5 am ad541608: am ad0f0edb: Merge "Call to equals() comparing different types"
* commit 'ad54160844177515dfe9024521669e4b47311d0f':
  Call to equals() comparing different types
2013-09-12 09:49:54 -07:00
Amith Yamasani
ad0f0edb54 Merge "Call to equals() comparing different types" 2013-09-12 16:08:20 +00:00
Jeff Sharkey
78ff1b8f10 Remove sdcard developer option, avoid data crash.
Remove READ_EXTERNAL_STORAGE enforcement UI, since the permission is
now always enforced.  Check to see if bandwidth module is enabled
when launching data usage, and finish gracefully if disabled.

Bug: 10116515, 10392597
Change-Id: Id0295c405b780a53867934b3bcd0a5f56db7d87a
2013-09-09 18:42:33 -07:00
Amith Yamasani
56f51a8927 Single pane for 10" Settings
Change-Id: I960e4be3cfb19ffec4100f8766742d6fb17dda4a
2013-08-06 16:23:37 -07:00
Jeff Sharkey
c64fad3917 Merge "Fix Data Usage restrict logic, scrolling." into jb-mr2-dev 2013-03-25 23:13:22 +00:00
Jeff Sharkey
92b518c9aa Fix Data Usage restrict logic, scrolling.
Bug: 8141491
Change-Id: I4e94666c59d91fb112477781ab340fd25d03de27
2013-03-25 16:13:00 -07:00
Jeff Sharkey
d277de911d Read NumberPicker value after finishing edit.
Bug: 6881204
Change-Id: I736c9205b69914353f88028a3794db6cd43c4c74
2013-03-25 15:11:25 -07:00
Jeff Sharkey
58e18de759 am f8db32d8: am 74fd506b: Merge "Enable Ethernet tab in data usage"
* commit 'f8db32d8af46d1cb1a10cf9d49dde7ecd4ce507d':
  Enable Ethernet tab in data usage
2013-03-20 10:23:33 -07:00
Jaewan Kim
ffce9c1e9a Enable Ethernet tab in data usage
mStateSession is not initialized at the time hasEthernet is called to
set mShowEthernet, so Ethernet tab is not shown at the startup.
In this case, if the device doesn't support mobile network, user cannot
even select it from the context menu.

Bug: 8365419
Change-Id: I441971f18346c34a3adf3f18d9355075d9dce3f0
2013-03-20 11:22:30 +09:00
Fabrice Di Meglio
b27223f139 Fix Switches padding for Settings app
- use setPaddingRelative() instead of setPadding()

Change-Id: Ifd14193a5f60d303035b394616dc65a70e1ef5f9
2013-01-15 18:54:11 -08:00
Amith Yamasani
aeb57edaef Pass the locale code in the help url for help pages.
Otherwise the help will always be shown in English.

Bug: 7564049
Change-Id: I94da36aa1ae5aabd118178866b7e570bb77add34
2012-12-06 14:40:51 -08:00
László Dávid
0b8bf4ea86 Call to equals() comparing different types
I have found this bug with the FindBugs tool

Change-Id: I7f157063b0a549cb4344c048ddb612a14a915a25
Signed-off-by: László Dávid <laszlo.david@gmail.com>
2012-10-24 23:31:47 +02:00
Guang Zhu
167ba2af93 Prevent sync state changes when user is a monkey
Bug: 7385019

Change-Id: Icf305683e57b83b3260f2587ae0a3d1a6dc3c21d
2012-10-22 11:37:31 -07:00
Amith Yamasani
9627a8ea15 Show more settings and add restrictions/dialogs for secondary users
Bug: 7213029 crash in About>Status
Bug: 7212495 hide System updates for second user
Bug: 7212230 nickname editor should select the text
Bug: 7160487 TTS settings
Bug: 7129411 Settings needs visibility changes for secondary users

Change-Id: Ia2d1229c08b392edfa6b671fce4a382410405b14
2012-09-23 18:43:31 -07:00
Jeff Sharkey
fda48e39d3 Always show auto-sync; user-specific storage.
Auto-sync is per-user, so show it to all users.  Also create user-
specific path when showing misc storage items.

Bug: 7179485, 7177335
Change-Id: I9f6029e22d519a5516a0f1a76e6aa55db3c2832c
2012-09-18 15:09:35 -07:00
Jeff Sharkey
38305fb177 Data usage multi-user support.
Switch to storing policy per-user instead of per-app, meaning each
user has control over their own set of apps.  Summarize the usage of
non-current users.  Only allow owner to make changes to overall
network policy.

Hide auto-sync menu when viewing app details.  Search for
MANAGE_NETWORK_USAGE intent across all package names sharing a UID.

Bug: 7121279, 5419594, 6978663
Change-Id: Ia70f04df70d27da27faccb947cd27021c628a41a
2012-09-14 22:43:51 -07:00
Christopher Tate
5a64c739bf Update Settings app to manipulate now-global settings properly
Change-Id: I6c269051c7d2db87f70f44df74e06456588c3b6f
2012-09-07 13:35:31 -07:00
Dianne Hackborn
bb06a427eb Rename UserId to UserHandle.
Change-Id: I04b86f3777c28fb83f03eb404dd5c2eb18d3da8f
2012-08-16 12:47:09 -07:00
Wink Saville
5543404ae0 Use telephony-common
Change-Id: Ic95136fd5934afdd53a08bfd640d40add67fdb44
2012-07-11 15:08:15 -07:00
Amith Yamasani
665235f6ef Save the auto-sync dialog state for orientation changes
Bug: 6630421
Change-Id: I11447173483da499e23c5ce41c566fa988385e6b
2012-06-07 19:58:34 -07:00
Amith Yamasani
d1ab82807a Account types at toplevel of Settings
Reorganized Account settings to show account types at the top-level
of Settings. Only account types that have accounts added are visible
here. There is an Add account button to add a new account.

Master sync toggle has moved to Data Usage screen in the overflow menu.
It shows additional detail of the function of the auto-sync toggle when
it is toggled by the user.

Account type screen (ManageAccountsSettings) shows list of accounts of
that type and any available authenticator settings. It additionally
verifies any Intents can be resolved before showing the corresponding
entry. This screen now shows last synced time for each account.

You can now sync all accounts of a type by selecting Sync now in the
Account type screen.

Account Sync screen that shows the list of syncable items has minor
tweaks:
 - "Last synced...", "Sync is OFF"
 - Doesn't show the authenticator settings here anymore.

Bug: 6579937

Change-Id: I8139a4c992b525a3e1efc24d2d223c3f5caddc76
2012-06-04 17:01:22 -07:00
Jeff Sharkey
d878909980 Surface metered networks as "Mobile hotspots."
String changes to give clearer definition of metered networks, and
remove metered control for mobile network.  Also fix NPE when testing
hasEthernet() before session is ready.

Bug: 6494976
Change-Id: Ia55ca3362a05977b9f21ab41eb10bbc738e29620
2012-05-29 11:03:55 -07:00
Jeff Sharkey
b67c4a8e73 Only show ethernet when traffic has occurred.
Bug: 6231172
Change-Id: I24dfd5f998b4e96681813c9fd7ce1ed74cf30eb5
2012-05-24 11:01:29 -07:00
Jeff Sharkey
3da415f19b Avoid NPE until we understand better.
Bug: 6450986
Change-Id: I68af8fedc419cd3142ba2bb7530b77aca7718123
2012-05-18 14:00:10 -07:00
Jeff Sharkey
02b327e7f2 Clear references after Data Usage View removed.
Bug: 6450986
Change-Id: Ia28479983fc192cbeefb16b8ce03f67241e4002c
2012-05-15 11:33:59 -07:00
Jeff Sharkey
92811829b3 Avoid animation flashing and fix padding.
Bug: 6446203
Change-Id: Icea64d5d30d894a6438af9278bc2d10b8b921d29
2012-05-04 11:54:31 -07:00
Jeff Sharkey
0bc5b93fe2 Fall back to Wi-Fi data when SIM missing.
Bug: 6427657
Change-Id: I0613b4b89ddbea1cde2fd96ce6dd4bacb0fb4eaa
2012-05-03 15:02:06 -07:00
Jeff Sharkey
a20ec538e5 Merge "Fix data usage settings button visibility." 2012-04-24 11:36:38 -07:00
Jeff Sharkey
d92e0419b1 Fix data usage settings button visibility.
Also check that fragment is attached before launching intent.

Bug: 6385040
Change-Id: If857758acbf6fe17c8ffbd75226114346ffe6c62
2012-04-24 11:35:43 -07:00
Amith Yamasani
b0b37ae21c Help menus for several screens.
Bug: 5144896
Change-Id: Ib2f5146f6f62f2a33261bb165c3bf1bf13b22f38
2012-04-23 15:35:36 -07:00
Jeff Sharkey
34e964dcff Hide tab when disabled, metered strings, fixes.
Hide "Data usage" item when kernel support isn't available and
enabled.  Change "restrict background" strings to reflect metered
status.  Hide app settings button when no package found.  Always
start limit sweep above any warning.  Imply metered state for
networks with limits.

Bug: 6303364, 5465643, 5379686, 6376276, 6368329, 6376276
Change-Id: I4faccc9a50f2f741fd937bb8c361a3ca055135e2
2012-04-21 15:41:48 -07:00
Jeff Sharkey
e557c3349e Show data restricted apps, unify strings.
Always show apps with background data restricted, even when not
used in selected time period.  Combine measurement disclaimer into
single string, and only show for mobile networks.  Unify limit
dialog string.

Bug: 6007276, 5505010, 5495020, 5456087
Change-Id: I0ec307b330838dc9528d7e63e0ac1edd14ba122c
2012-04-13 19:45:02 -07:00
Jeff Sharkey
ad17de32bc Hide body immediately when no tabs.
Also check for valid SIM card when checking 4G radio status.

Bug: 6311752
Change-Id: Ic148f052429cc66bb51237bdc93c09f7c8ba3df1
2012-04-11 11:03:25 -07:00
Jeff Sharkey
76c5ed4f35 Migrate to @Override to remove warnings.
Bug: 6303344

Change-Id: I8f17edc3b12d50cedab2c5f555c63bc07d85bca2
2012-04-09 10:57:29 -07:00
Jeff Sharkey
08ce99e224 Move to INetworkStatsSession with lifecycle.
Explicitly communicate lifecycle, enabling system_server to cache
stats when actively being used.

Bug: 6236498
Change-Id: Ieecc4b1d4fd46aeb5207c4ba9b450e04e9438d00
2012-04-06 11:47:25 -07:00
Jeff Sharkey
313f7d8c57 Controls to set expensive (metered) networks.
Add UI to change metered flag on NetworkPolicy, and support Wi-Fi
policies per-SSID.  Create Wi-Fi policies as needed, but leave cycle
undefined.

Only show and mutate mobile policies when SIM state is ready.

Bug: 3001465, 3291052
Change-Id: I481a202fe0e68fc2f5adfd3b3a6f40347d2b168c
2012-04-05 14:31:43 -07:00