Commit Graph

136 Commits

Author SHA1 Message Date
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
Jeff Sharkey
ef6e1ff728 Cluster apps by user in Data Usage.
When displaying apps that have used data, cluster all app usage
together regardless of profile/user.  Always persist policy rules
using primary UID (the UID under the default user).

Bug: 6140462
Change-Id: Ia00bb42b26987553926f4027583dbe03b3bafba1
2012-03-22 11:10:45 -07:00
Jeff Sharkey
3235ddb7aa Avoid Data Usage AppDetailsFragment ISE.
Bug: 6022913
Change-Id: I4672b327096add4beeeb52f0bb467622b3467fcf
2012-03-15 16:40:31 -07:00
Jeff Sharkey
e5223a0577 Save timezone when setting data cycle reset date.
Bug: 5938567
Change-Id: I9df8da9d030169952098efc04cfde79e3e42e1f8
2012-03-09 18:24:01 -08:00
Jeff Sharkey
f3871fb2b2 Linear bytes scale, time ticks on first week day.
Move bytes to linear instead of logarithmic scale.  Also render time
ticks on first week day based on locale.  Also enable testing of
specific IMSI through setprop.

Bug: 5452612, 5829693
Change-Id: I13200cf58a39bfe0ac343e1f83165e899867641b
2012-02-03 19:29:15 -08:00
Jeff Sharkey
77dae91726 Unify shorthand for byte-based units.
Change-Id: I32f998b5ee1f5416c9cceafd124fd34b7433be42
2012-02-03 14:50:33 -08:00
Jean-Baptiste Queru
05eb9852a9 am 43cbe3ff: am b6e57c1f: Merge "Do not set minimum value for mobile data limit dialog higher than the actual set value"
* commit '43cbe3ffb4f0777d8aa833355c523f4a1ff93818':
  Do not set minimum value for mobile data limit dialog higher than the actual set value
2012-01-27 21:09:22 -08:00
Shuhrat Dehkanov
f9237f6e3c Do not set minimum value for mobile data limit dialog higher than the actual set value
When mobile data limit and warning limit are set to 0, pressing mobile data limit text
(0.0 GB) pops up mobile data limit dialog with minimum value 1. But the value set is 0,
which is causing the dialog to show its maximum value 2^31-1.

Change-Id: I79ed4df5fbf095a7e60bda640ff2ca26bcbd3cc4
Signed-off-by: Shuhrat Dehkanov <uzbmaster@gmail.com>
2012-01-26 23:04:02 +09:00
Jeff Sharkey
3038c52de4 Restrict app data on metered networks.
Paired with framework change that no longer requires NetworkPolicy
to have limit when restricting apps.

Bug: 5571454
Change-Id: I2a5d8446a9278afb183e13d0f41f436ccb3bc9e8
2011-12-15 14:03:37 -08:00
Jeff Sharkey
bdf98e84ab Data usage label width, locking, Wi-Fi fixes.
Avoid wrapping sweep labels when underlying string is long, and avoid
showing blank "^1" sweep labels.  Only offer "restrict data" when
mobile networks are present.  Add locking around UidDetailProvider.

Move to isNetworkSupported() for consistency.

Bug: 5492495, 5471602, 5439402, 5373465
Change-Id: I79f5938d45ffbb4c2c242106424a466042a26c1c
2011-11-10 17:17:24 -08:00
Amith Yamasani
5ba0a0295f Prevent orphaned fragment on the settings stack.
Remove the AppDetailsFragment from the stack if DataUsage is being destroyed.

Bug: 5572241
Change-Id: Ifb2c9233bf75c8cc7b43eec5ea3f0c0b0ba65ffe
2011-11-07 15:20:39 -08:00
Jeff Sharkey
461842a8c0 Data usage strings, sweep touches, fixes.
Change strings around limiting background data.  Move limit/warning
sweeps above inspection sweeps, and teach about additional neighbors
on different axis.

Guard against DialogFragment.show(), fix pie chart to draw edges, and
remove data usage from battery UI.

Bug: 5341374, 5337650, 5337385, 5319465, 5236335
Change-Id: Iea8c2a2ab405b645d85abe34a0178d4b8874cdd5
2011-09-25 18:41:13 -07:00
Jeff Sharkey
a83a24f48a Surface tethering stats in data usage.
Bug: 5244846
Change-Id: Ib4ac03ab634278714576a66ef8d6fdbc6d15c82a
2011-09-16 18:28:39 -07:00