Commit Graph

42 Commits

Author SHA1 Message Date
Doris Ling
c4c9f4d50e Update Network & internet->Wi-Fi to use MasterSwitchPreference.
- Add a preference controller for Network & internet->Wi-Fi to control
  the preference toggling and summary update.
- Refactor WifiSettings and WifiEnabler to share code between the new
  wifi preference controller and the wifi setting.
- Refactor BluetoothSummaryHelper to have a common base class with the
  WifiSummaryHelper.
- Rename the summary helper to summary updater.

Bug: 34280769
Test: make RunSettingsRoboTests
Change-Id: I00ebfc161bcef89331bb41ba405ed8cb8232d248
2017-01-25 10:43:01 -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
Stephen Chen
d9e2c946af Add subtypes to tron logging for Wifi toggles.
For ACTION_WIFI_CONNECT, added subtype to specify whether user is
connecting to saved network.
For ACTION_WIFI_OFF, added subtype to specify whether user was connected
to a network at the time.

Bug: 32371451
Change-Id: I1d4445bda2fbeb062831e6f858ccc711bff65105
Fixes: 32371451
Test: Verify logs by running:
adb logcat -b events | egrep '(sysui_|notification_)'
2016-11-01 13:18:55 -07:00
Fan Zhang
aa71afe597 Use MetricsFeatureProvider for logging in Settings.
Bug: 31664539
Test: make RunSettingsRoboTests for regression
Test: adb logcat -b events | egrep "(sysui_|notification_)" for
      verifying log

Change-Id: Id944be7c4ff9911aebee481c2df485542f1318f0
2016-09-23 08:37:37 -07:00
Zoltan Szatmary-Ban
3f6208170d Apply policy transparency to HotspotCondition and WiFi settings...
...when there is an active hotspot and user restriction for disallowing
tether config is in effect. This is to avoid getting security exceptions
from WifiManager when engaging with HotspotCondition or Wifi enable switch.

Bug:27936528
Change-Id: Ib3324e853277c177966b55668758d349ffe6ecf5
2016-04-15 16:13:27 +01:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Chris Wren
f22e8c4c2e log wifi actions from settings
To start:
  enable
  disable
  forget
  connect
  add

Depends-On: I60163e44602b8e23b643b9103c324fa0e0d2c4c4
Change-Id: I52f40298db63f410ced2dbf5ba05d3ad098a85a2
2015-03-30 14:33:27 -04:00
Jason Monk
fc1b00cfe4 Move some wifi tracking code to SettingsLib
Move tracking of which networks are available/saved and their state
over to SettingsLib to share it with Quick Settings.

Bug: 19180466
Change-Id: Iaeef06b26da8cb38e1ba09a7d105d04d499dc181
2015-02-04 20:40:32 +00:00
PauloftheWest
4da0e819ee Fixed a Settings crash when exiting Wi-Fi Settings.
Bug: 17600287
Change-Id: Id2d35e450798785db8e485972036483946f67ef3
2014-09-22 15:12:13 -07:00
Vinit Deshpande
e2c1d504fc Fix automatic Wi-fi toggle
It is happening because there previous view doesn't disconnect
itself from setting change; and then two views alternatively
enable/disable wifi.

Bug: 17157005

Change-Id: I42916a7bbd735960a26efbae670c9b927ec8574d
2014-09-15 20:18:35 -07:00
Fabrice Di Meglio
92239ed799 Fix bug #15890188 wifi toggle on-off switch missing after skipping setup wizard
- remove any reference to the Switch and use the SwitchBar API instead
- set the initial state of the SwitchBar depending on the WifiManager

Change-Id: I556bf8a007892c057edf7c6c144f71b2dcfe4f99
2014-09-05 14:08:58 -07:00
Fabrice Di Meglio
204521626f resolved conflicts for merge of f9360dbc to master
Change-Id: I2e468d83a7ce5200c59f63b4362e7bee10d0a2eb
2014-06-12 15:46:41 -07:00
Fabrice Di Meglio
138ff8c045 Make the SwitchBar appear immediately
- change the way the SwitchBar is shown and hidden
- save its state
- remove the delay transition code

Change-Id: I07260430e6709b42517ca011f6d3c3446a626731
2014-06-12 11:13:23 -07:00
Fabrice Di Meglio
c75417a758 Fix bug #15170508 When I initially load settings, all on/off toggles
...start in off position then move to on after pane loads

Another look at this issue.

- start the Switch as View.GONE and make it View.VISIBLE when
the Wi-Fi state is defined.

Change-Id: I2f3077f779fc4030b2ba9ff3b21be8148add33c3
2014-05-28 11:43:13 -07:00
Fabrice Di Meglio
00b5e6b247 This CL is not working (even after careful testing) but when I tried I was not completely ToT.
Revert "Fix bug #15170508 When I initially load settings, all on/off toggles start in off position then move to on after pane loads"

This reverts commit 1e52db8063.

Change-Id: I73bdfeba4a4b3e993e37cdae1e3733ffe272b9eb
2014-05-28 17:36:37 +00:00
Fabrice Di Meglio
1e52db8063 Fix bug #15170508 When I initially load settings, all on/off toggles start in off position then move to on after pane loads
- refactor all the code that was using the Switch to control it thru the SwitchBar
- start the Switch as View.GONE and make it View.VISIBLE when it is set
as "enabled" or "checked" so that you dont see the Switch transition (it shows
only with it final state)

Change-Id: I382076bf3c819c530b5b2c06ca2429dfb2cdc6bf
2014-05-27 17:01:10 -07:00
Fabrice Di Meglio
4193776698 Introduce SwitchBar widget
- SwitchBar is a LinearLayout that containts a TextView and a Switch and
is intended to replace all Switches that are put in the ActionBar as a
custom view
- use the new SwitchBar for WifiSetting only for now (a later CL will
take care of all the other Setting that are using a Switch in the
ActionBar)

Related to bug #14898161 On/Off switches must move down from Action Bar

Change-Id: I5e98dbe995bba8f440d08459e09ca3ac09d3464b
2014-05-14 16:42:06 -07:00
Fabrice Di Meglio
da0e6ff8c2 Force Search Index rebuilding for Wifi remembered networks
... when the WiFi swich will be toggled on/off

Change-Id: Iea93819e4c473aafc6aaedf6abb723969dbc9e52
2014-04-21 11:24:33 -07:00
Fabrice Di Meglio
784f266cbd Better decoupling of Index updates in WiFi Settings
- use a Handler

Change-Id: I1e35f2e437021001900468d0df2b75e53b8c62f6
2014-04-21 10:57:07 -07:00
Fabrice Di Meglio
490099b135 Allow partial Index rebuilding thru updateFromClassNameResource(...)
- add a new boolean parameter to ask for Index rebuilding:
passing "true" will delete first all the data corresponding to the
"className" and then apply the update.

Change-Id: Ifc42fc560a14f5470b466cf6982915d9207fa3c7
2014-04-14 13:31:14 -07:00
Fabrice Di Meglio
d25314d330 Settings - update for new UI (no more Drawer)
- follow the UX spec by no more using a Drawer
- the Dashboard is now a Fragment that contains the list of Headers
- the search results are also put into a Fragment that is replacing
the initial one (Dashboard or other) when expanding the SearchView
- use a SearchView for query input
- when tapping on a Header or a Search Result, re-launch Settings as
an Activity so that we are benefiting from the Activity stack for
UP affordance and BACK button
- manage UP affordance to show it only when needed
- move some Actions to the Menu in the ActionBar for allowing space
to the Search action and removing some clutter
- fix an issue with the Index and WiFiEnabler and their cached Context
that was not updated when there was a Configuration change
- simplify the SettingsActivity code by extracting some inner classes

Change-Id: I50b5f77bb44a7fade1886114dbbc820609a5e63d
2014-03-28 15:51:29 -07:00
Fabrice Di Meglio
5f3442af6f Use SearchIndexableData enable state for WiFi Settings
- same as for Bluetooth
- now the remembered WiFi networks names can be indexed when
WiFi is turned on

Change-Id: I904ce6a425c21ee07ce3ee8fdc0cd71ab5a18d12
2014-03-21 13:50:25 -07:00
Robert Greenwalt
7a2466b511 am 50702355: am 5d3ef571: am a1454529: Merge "Dont enable Wi-Fi if it\'s not toggleable in flight mode"
* commit '50702355f23d5e270727018c2af7cc76a1bd91eb':
  Dont enable Wi-Fi if it's not toggleable in flight mode
2013-06-28 10:48:40 -07:00
Robert Greenwalt
5d3ef5715c am a1454529: Merge "Dont enable Wi-Fi if it\'s not toggleable in flight mode"
* commit 'a1454529c3eb6d0e87b254888abfea3bb714f7fe':
  Dont enable Wi-Fi if it's not toggleable in flight mode
2013-06-28 08:06:25 -07:00
Johan Redestig
2acaf22ad1 Dont enable Wi-Fi if it's not toggleable in flight mode
Dont enable Wi-Fi if it's not toggleable in flight mode
by restoring the return which was removed by
e78c187905

Change-Id: I8ca5a3e9b3f36f148f08ce97b8a2b854bf7de21c
2013-06-28 10:37:07 +02:00
Dmitry Shmidt
70c35ef071 Disable On/OFF switch before action
Bug: 8715336

Change-Id: I3d4b05ae9dfe109af0b9b06340d52004b73ad0f4
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-05-20 17:39:24 -07:00
Robert Greenwalt
7e59f73e9c Remove wifi scan-always dialog.
When wifi is switched off we no longer want a notification dialog
about scan-always, instead using in-panel text.

bug:8907190
Change-Id: I707f306a056068d92f69070873f1e6330b598b1e
2013-05-13 11:39:08 -07:00
Irfan Sheriff
c591a8b95d Add reminder about scan settings on wifi off
Notify the user that scans will be available when
wifi is turned off

Bug: 8732391
Change-Id: If232bfb9f6c3976059bde11280318901c35161e7
2013-04-29 09:42:22 -07:00
Jeff Sharkey
860eceba2c More migration to Global settings.
Bug: 7375796
Change-Id: I43079368c32e91e8bb75b00377cd57d1766f15d4
2012-10-18 15:38:42 -07:00
Irfan Sheriff
b1c0e0b1c9 Fix settings handling of wifi events
When wifi events come out, settings has to change the switch state.
Changing switch state causes settings to also enable/disable wifi which
gets into a loop when there is a driver hung event.

Fix to only send framework calls when a user has changed the switch
settings

Bug: 5271322
Change-Id: I0a7d03a3fe0f28622de05981e5f72a9a8814b2d2
2011-09-15 19:11:29 -07:00
Gilles Debunne
e78c187905 Settings refactoring
Wifi and bluetooth pane refactored, main toggles moved to left pane.

Change-Id: I42ea4cf3bdf24158f3c67e0dea311258206cd78a
2011-06-21 11:05:29 -07:00
Irfan Sheriff
cb52d4b4ab fix wifi checkbox status update
Bug: 3277268
Change-Id: Idfabf1be41c5e54cd93695de1bb06164760d7fad
2010-12-16 15:10:26 -08:00
Irfan Sheriff
a6a74e222a Disable tethering to enable Wifi
We need to explicitly disable wifi while enabling
tethering and disable tethering while enabling wifi

Bug: 2539071
Change-Id: I7fda6e4d9d1bb804e81561d52b5f3a982a674b0e
2010-03-25 11:39:11 -07:00
Chia-chi Yeh
9dee8a96c5 WifiSettings: tweak the order of calls to registerReceiver() to make the UI better. 2010-02-04 16:16:25 +08:00
Chia-chi Yeh
feeb756132 WifiEnabler: add support to show supplicant state. 2010-01-16 07:09:20 +08:00
Chia-chi Yeh
b90452f3d2 Settings: revise WifiEnabler and BluetoothEnabler.
This mainly changes the way both enablers react to the airplane mode. Now
enablers show a toast message instead of disabling the check box directly. This
avoids the inconsistent state introduced by WirelessSettings which controls the
check box using layout dependency.

Related bug: 2053751
2010-01-15 06:12:29 +08:00
Chia-chi Yeh
4e14211d21 Settings: revise WifiSettings. 2009-12-25 14:48:46 +08:00
Jeff Sharkey
1c4e96864f Allow bluetooth in airplane mode when in "toggleable" list.
Settings.System.AIRPLANE_MODE_TOGGLEABLE_RADIOS is a list of
radios that can be toggled while in airplane mode.  This CL
changes BluetoothEnabler to respect this.

It parallels the logic in WifiEnabler, which enables OEMs
to allow Wifi changes when in airplane mode.

Most existing devices don't include "bluetooth" in the
toggleable list, which means bluetooth will continue to be
disabled when in airplane mode for those devices.

Fixes http://b/2297314
2009-12-22 14:35:44 -08:00
Mike Lockwood
83bcc98af1 Allow enabling Wifi when in airplane mode.
If the new system settings value for AIRPLANE_MODE_TOGGLEABLE_RADIOS
contains RADIO_WIFI, then the user will be allowed to enable Wifi
while in airplane mode.
Turning on airplane mode will still disable Wifi, but the user will
be free to reenable it in the Settings app.

We also allow access to the VPN settings under the same circumstances.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-29 23:53:44 -07:00
The Android Open Source Project
afc4ab2ffb auto import from //depot/cupcake/@135843 2009-03-03 19:32:34 -08:00
The Android Open Source Project
4e14e5ccbf auto import from //depot/cupcake/@135843 2009-03-03 18:28:52 -08:00
The Android Open Source Project
de2d9f5f10 Initial Contribution 2008-10-21 07:00:00 -07:00