Commit Graph

526 Commits

Author SHA1 Message Date
vandwalle
653cfeeb0a when vervbose logging, keep track of a list of ScanResults per AP
Change-Id: Ib8f797de360f11eb9914a6aa44d418e1d0571973
2014-05-22 15:03:48 -07:00
Jason Monk
0485b7c373 Add Editable PAC field to Proxy Configuration
Make PAC URL field not read only but now settable in advanced wifi
configuration options.

Bug: 14885470
Change-Id: I2c647f823d5c8a75b5fbf74434cbf0efcc4c50bf
2014-05-22 13:36:02 -04:00
vandwalle
c9a6698fd4 make verbose logging a wifimanager hidden API
Change-Id: I092b7f507ad4dfdab16658929f02584a1fc22ba4
2014-05-21 20:25:15 -07:00
Lorenzo Colitti
d6014e51ae Merge "Move IP config from WifiConfiguration to IpConfiguration." 2014-05-20 23:15:56 +00:00
Fabrice Di Meglio
d2b64f339a Fix bug #15001610 Java crash in settings is observed while adding Google account on wiped device
- update Settings main layout to be able to show the Buttons
- make WifiPickerActivity a SettingsActivity and remove dead code
- fix reference to Buttons for using the Settings IDs instead
of the Framework ones

Change-Id: I23bfd1b8290fc007e6e80aa9a6297e55e7f6004e
2014-05-20 14:23:56 -07:00
Lorenzo Colitti
93068f4c15 Move IP config from WifiConfiguration to IpConfiguration.
Change-Id: I5d1189682b13f1088848809604690648d8d9ecca
2014-05-20 12:35:25 -07:00
Vinit Deshpande
e9f007e8df Fix WPS dialog reset while device orientation change
Fixed WPS dialog reset to default upon device
orientation change by restoring instance state

cherry-picked from partner:klp-wireless-dev
SHA1 a85fb02ba1357cde3017e5e0705d3792332bf999

Bug: 13231785

Change-Id: Ic63b14da9d0d9856150214bfc194f6dfcb431087
2014-05-20 11:33:23 -07:00
Fabrice Di Meglio
93b77b7bf6 Revert "Fix bug #15001610 Java crash in settings is observed while adding Google account on wiped device"
This reverts commit 18d271c73b.

Change-Id: I04f89dbb13ad1db92276c91a7ee63d3a5dd33e62
2014-05-17 00:01:07 +00:00
Fabrice Di Meglio
18d271c73b Fix bug #15001610 Java crash in settings is observed while adding Google account on wiped device
- make WifiPickerActivity a SettingsActivity (as it was long overdue)
- move code from the overide of PreferenceActivity.startWithFragment() to
SettingsActivity.startPreferencePanel(...)

Change-Id: Ibc42056fdc84e01004e15c3779073e5451fd02a1
2014-05-16 11:00:13 -07:00
Andres Morales
5fe81c7cc8 Merge "Fix issues in Wi-Fi NFC tag code" 2014-05-15 23:42:40 +00:00
Andres Morales
ae04155bbe Fix issues in Wi-Fi NFC tag code
An NPE + multiple comments

Change-Id: I04ffe10874cc2e9aa9f68bc551b8da98eb6f1640
2014-05-15 16:34:51 -07:00
Fabrice Di Meglio
1303dbd52a Code cleaning
- remove obsolete imports

Change-Id: I6878498047ced7fd6405b84b76bc808ee5ff49fc
2014-05-15 14:32:32 -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
Maurice Lam
a1ebae6f71 [WifiSettings] Fix NullPointerException during setup
The wifi setup activity that setup wizard uses does not have an
action bar.

bug: 14930301
Change-Id: I14f276c1932cb725bffd765faafc0edf6f1d54f6
2014-05-14 10:18:55 -07:00
Fabrice Di Meglio
15826d4ea1 Mode code cleaning: remove obsolete references to EXTRA_NO_HEADERS
- the EXTRA_NO_HEADERS flag as no more meaning as we are showing
the Tiles (previously named "Headers") only in the Dashboard
(which is the main Settings screen)

Change-Id: I55656de0d28ca9c84adbe6647d870838b4ac230b
2014-05-13 13:10:34 -07:00
Jason Monk
e86790c838 Support renaming of ProxyProperties to ProxyInfo
Change-Id: I60621a7155ac2938a54ff466501db9a1013e621b
2014-05-05 12:36:10 -04: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
255743990c Make the WiFi switch appear again
- use the ActionBar Theme context when creating the Switch for
getting the correct Theming

Change-Id: I1c44e1b1c28bf02af4c2ac9912295106d93a60e8
2014-04-18 16:18:26 -07:00
Andres Morales
a298f077c8 Merge "Write wifi config to NFC tag" 2014-04-16 17:19:05 +00: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
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
Andres Morales
ef7a40a0d6 Write wifi config to NFC tag
Configured networks expose the option to
write config to an NFC tag. This tag can be
then tapped to another device to configure
the same network. Implemented according to
WiFi Alliance WPS spec.

Change-Id: I33a1be1610aab71cf1ab864418d494027370ebca
2014-04-10 10:25:50 -07:00
Jaewan Kim
ac6a3c3cb3 Merge "Revert "Refactor IpConfiguration from WifiConfiguration"" 2014-04-07 08:59:27 +00:00
Jaewan Kim
34dcbefe5c Revert "Refactor IpConfiguration from WifiConfiguration"
This reverts commit 16ff27d3f7.

Change-Id: Ide9c9af358f63a6e73bb2172111929c2022f862b
2014-04-07 08:55:02 +00:00
Jaewan Kim
1af4788f06 Merge "Refactor IpConfiguration from WifiConfiguration" 2014-04-07 04:40:47 +00:00
Fabrice Di Meglio
86ea97f452 Re-enable on/off switch for Wi-Fi and Bluetooth Settings
- the switch was no more there when launching from an Intent (it was a regression)

Change-Id: I1fc95cad4523a1d3812323fb26908f925a9e623e
2014-04-03 13:57:56 -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
Fabrice Di Meglio
51bfee595c Add dynamic Preferences indexing (part 2)
- change the Index SQL model. Add a new "enabled" column.
- use that column for issuing a more restrictive search query
- change the SearchIndexProvider API to pass the "enable" state
- apply it to Bluetooth settings
- refactor the list of indexable resources (SearchIndexableResources)

Change-Id: Ic900fb27cb12a285a80d953aa1aa88f0070cd986
2014-03-20 20:40:04 -07:00
Fabrice Di Meglio
ba8c188bf0 Merge "Add external Preferences indexing" 2014-03-20 01:15:08 +00:00
Fabrice Di Meglio
fa7dc240e9 Add external Preferences indexing
- define SettingsSearchIndexablesProvider as an internal
SearchIndexablesProvider
- protect access thru using android.permission.READ_SEARCH_INDEXABLES
- update WallpaperTypeSettings and WifiSettings for taking care of
the new model
- update the Dashboard for taking care about external Icons for the
search result
- update sqlite model/version for taking care about Intents
(enable launching external applications for showing the settings)

Change-Id: I2e38599327e6480f1754f52666becce0884cee9d
2014-03-19 14:56:09 -07:00
Jaewan Kim
16ff27d3f7 Refactor IpConfiguration from WifiConfiguration
Bug: 7606609, Bug: 8687763
Change-Id: Ia3de8eb92cd014f449525fe1ef9cbe86470bf347
2014-03-19 11:24:16 +09:00
Russell Brenner
7552ff38b1 Improve support for default theme of WifiSetupActivity
Default theme can be either dark or light, depending on the app theme
in the manifest. When processing extras, the default was always
assumed to be dark.

Change-Id: I4598ad25ffa69b63fa91cab8b07931ba37ba7676
2014-03-18 15:48:58 -07:00
Felipe Leme
bc64d5030e Merge "Displays frequency on connected WiFi network info. Bug: 12767819" 2014-03-14 22:42:05 +00:00
Fabrice Di Meglio
6c9e03fd6d More code cleaning
- use var for context.getResources()
- rename var

Change-Id: I8b8b7ffdd2c83bdbec7a4f162757597032aa9fb0
2014-03-12 17:19:39 -07:00
Fabrice Di Meglio
757450247d Merge "Add dynamic Preferences indexing" 2014-03-12 19:58:06 +00:00
Fabrice Di Meglio
b8dfbf1409 Add dynamic Preferences indexing
- introduce a new private interface "Indexable".
- refactor Wallpaper and Wi-Fi settings to support this new
interface.
- only index saved/remembered Wi-Fi networks
- also add the capability to remove some data from the Index.

Fragments that want to publish some dynamic indexable data should
implement the "Indexable" interface and provide a static final field
named "INDEX_DATA_PROVIDER" with is the Indexable.IndexDataProvider
interface for providing the data for indexing.

Thru this interface the Index can ask what are the data chuncks to
index.

Change-Id: I31e7212c87b8218efe1a8f3028147cb19e119be6
2014-03-12 11:34:59 -07:00
Felipe Leme
f8d798631b Displays frequency on connected WiFi network info.
Bug: 12767819

Change-Id: Ia71b28b1dd77bdabc53a3e91bd54375bdaebfe4a
2014-03-12 10:50:12 -07:00
Fabrice Di Meglio
565d8b7bcc Fix bug #13327889 Launching Wifi setting using available wifi network
...notification does not show ON/OFF button for wifi

- the notification was launching the WifiPickerActivity which is
a PreferenceActivity, so take care of this case too.

Change-Id: I64f58d4b9f75141626bb6f0266cf2f17fbb39fc7
2014-03-05 17:27:50 -08:00
Fabrice Di Meglio
768201371d Fix bug #12910315 RTE while entering *#*#INFO#*#* command from Dialer
- revert back to PreferenceActivity

Change-Id: I8724886dd9649d649f7cd4730f738fb47727c056
2014-02-10 16:27:24 -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
Yuhao Zheng
6c81d90be3 Make wifi dialog persist after orientation change
Wifi "cancel/forget/connect" pop-up window does not persist after orientation
changes. Specifically, after orientation changes, the connect button disappears.

This is because dialog information is not saved properly. When a saved wifi
config is found in the scan results, this entry is BOTH a wifi config AND a scan
result. Previous implementation has 2 issues:

1. Scan result part isn't saved. That's why the connect button after orientation
   changes, as UI didn't see a scan result section and thought it's not in range.

2. When both wifi config and scan result are saved, they are not restored
   correctly. Restoring wifi config will reset mRssi field in scan result part,
   while restoring scan result will reset netowrkId in wifi config part.

Both issuses are fixed.

bug: 9053186
Change-Id: Ic3ee7b5931c91d4b2f5c723fb8718cf752463109
2014-01-07 10:59:30 -08:00
Vinit Deshapnde
c621418d3d Move Wifi/P2p service components under services
Some methods need to be public, since frameworks/base complies before
frameworks/base/services; and services takes build dependency on base.

Similar issue exists with WifiEnterpriseConfig constants.

Bug: 9907308
Change-Id: Ied0e3dee0b25c939067dbc66867a9814b3b3b68e
2013-12-11 16:05:46 -08:00
Lorenzo Colitti
deb8f08ace Dynamically update connectivity and IP address.
The settings status page dynamically updates mobile network
status (in/out of service, signal strength, network type, etc.)
but not IP address and connectivity information. Dynamically
update that information as well, for consistency.

For consistency, also update the advanced wifi settings page.

Bug: 10232006
Change-Id: I3a292d8bd9e36ab16c37e107eefff4b37d884a4c
2013-11-15 02:38:36 +09:00
Jason Monk
492c8ef15e am 58f53f9c: am c85359ef: am 4e42c808: Merge "Add PAC UI to Wi-Fi Settings" into klp-dev
* commit '58f53f9c351329bf51bb548409c047e024d94fc4':
  Add PAC UI to Wi-Fi Settings
2013-11-05 18:59:11 -08:00
Jason Monk
070f3560d5 Add PAC UI to Wi-Fi Settings
Now when a PAC URL is set it shows it in settings rather than the proxy
spinner set to None.  This should only be visible in EDU users as only EDU
has PAC.

Bug: 11528608
Change-Id: Ie4bad8ea935f0a8f1bb7877eb2be146e06d71c2d
2013-11-05 14:39:44 -05:00
Yuhao Zheng
5d2169eb6f Refresh peer list when entering wifi p2p settings
When wifi p2p is connected, entering Wi-Fi Direct UI won't show any peer devices
until a WIFI_P2P_PEERS_CHANGED_ACTION broadcast is received (long after or never).
Users may be confused and think p2p is disconnected. It's more user friendly to
display connected devices right at the beginning.

In addition, this CL removes the useless mWifiP2pManager.requestGroupInfo call.

Bug: 11175553
Change-Id: I0f0834043a2cf6e8fc20319e6861b62484478146
2013-10-11 14:08:48 -07:00
Yuhao Zheng
acac38011b Wi-Fi Direct setting UI: handle p2p disable state
This is not a normal use case as we can't enter Wi-Fi Direct setting when p2p
is disabled. However we can make this happen by entering Wi-Fi Direct setting
screen then disabling wifi via quick settings.

Previous UI implementation didn't handle p2p enable->disable change completely,
leaving the screen out-of-date until we change the screen orientation.

Now we always attach mThisDevicePref/mPeersGroup/mPersistentGroup to the screen,
but just disable them when p2p is disabled. Another advantage of doing this is
to avoid b/11050625, which occurs when a PreferenceGroup is not attached to the
PreferenceScreen.

Bug: 11133069
Change-Id: I9be7b6e396d7677b5a33df8e6294b4a0aa6bd389
2013-10-10 10:08:45 -07:00
Yuhao Zheng
6271cd01de Fix NPE in Wi-Fi Direct Setting UI
After a PreferenceGroup is created, attach it to a PreferenceScreen right away.
Otherwise, if PreferenceGroup.addPreference is accidentally called before being
attached, it will result in an NPE and a UI crash.

Bug: 11050625
Change-Id: I68fa8b67ab807c0729c43c1b5cdabdbcd4f2c230
2013-10-08 10:26:37 -07:00