Commit Graph

203 Commits

Author SHA1 Message Date
Sky Faber
2d657e3629 Separate wifi AP added by applications.
-Add permission to allow settings to modify all wifi APs
-Add option to show AP owners.

Change-Id: I12943563ef714c4287e13488578f020d136d006d
2014-09-27 02:00:36 +00:00
PauloftheWest
f4b548c0f5 Removed all references to "Google Wi-Fi Assistant" from Settings.
+ Removed Wi-Fi Assistant message in Wi-Fi Advanced since it was
overridden by the Wi-Fi Assistant.
+ Removed Wi-Fi Assistant message in Wi-Fi Assistant Card.  Instead,
it is programatically created when the scorer is known.
+ "Google" was replaced with a placeholder.

Bug: 17457236
Change-Id: If3aab06c911ecf6ec13cbf00dea2fe9333abc1fc
2014-09-15 09:31:56 -07:00
Sky Faber
073f07f33b Remove UI for Forget AP as a secondary user.
Bug: 16898030
Bug: 17317819
Change-Id: I4ef17483bc1b35f2f70c23eb12d813f029b15bf0
2014-09-04 12:07:41 -07:00
PauloftheWest
de29d04fae Fixed an issue were "Saved Networks" would not appear correctly.
Bug: 17284538
Change-Id: Id93cd93f94a59437b04d41d4b0412d3b22575e17
2014-09-03 05:42:14 -07:00
Jeff Davidson
0a5402dcf9 Fix crash in WifiSettings.
SDK version is an int, not a long. (Also change SharedPreference key
to avoid issues for people who've already dismissed the Wifi Assistant
card).

Bug: 17304642
Change-Id: Ic959516b88e91edd53562703fa7db9c15ead20e4
2014-08-27 18:05:31 -07:00
PauloftheWest
a14e3f3373 Merge "Removed the Wi-Fi icon shown when Wi-Fi is off." into lmp-dev 2014-08-27 21:40:09 +00:00
Maurice Lam
b6c414a6d2 [WifiSetup] Progress when wifi scanning
Use a custom empty view to show the status while wifi is scanning
or off. Cannot use android.R.id.empty because in phone portrait
layout the illustration is the listview header, which will be hidden
if the list is empty and we use ListView.setEmptyView.

Bug: 17183006
Change-Id: Ie8598303f4e61f87e078008fb7a03918ba92c9ef
2014-08-25 13:19:49 -07:00
PauloftheWest
2b41c90fed Removed the Wi-Fi icon shown when Wi-Fi is off.
Bug: 16570104
Change-Id: Iacee07c225f6609b92f1df193b682fde0a720a92
2014-08-21 11:57:29 -07:00
Jeff Davidson
978d2785fb Suppress WiFi Assistant card until future platform updates.
This replaces the previous behavior of an increasing timeout. When the
user dismisses the WiFi Assistant card, either by opting out or
successfully configuring the assistant, the card is suppressed until
the next major platform upgrade (assuming the assistant is not enabled
at the time of the upgrade).

Bug: 16902858
Change-Id: I5373a7a743f21777b7b75a620b5a4e9004e57466
2014-08-18 18:13:43 -07:00
PauloftheWest
d60f85daad Added WiFi Assistant settings.
+ Added ability to setup Wifi Assistant.
- Removed 'Avoid poor connections' from WiFi Advance Settings.
- Removed 'Optimize Wi-Fi' from WiFi Advance Settings.
+ Replaced checkboxes with switches in WifFI Advance Settings.
+ Added horizontal rule to seperate MAC/IP address text.

Bug: 15698824
Change-Id: Ia319ff5fb2566854666a07d0e77c8816a49fd3d6
2014-08-12 11:27:38 -07:00
Jeff Davidson
2e7162618d Clean up Wi-Fi Assistant card.
Use a ListView header instead of a Preference to display the card at
the top of the list.

Also clean some dead code.

Bug: 16378017
Change-Id: I5a7f1d197cde071c45395b6d7f6016aa7201187a
2014-08-11 14:07:55 -07:00
vandwalle
3b5e4e2421 The Settings app is listening to wpa_supplicant state change so as to update the state of the AccessPoint objects and present Wifi state to the user.
This is not right because wpa_supplicant states are transient (for instance when the WiFi Layer, at Layer 2, is going thru some harmless spurious disconnection cycle due to WiFi signal fluctuation). This cause the state of the WiFi Network to appear to be unstable to the user.

Hence, I removed dependencies on wpa_supplicant internal state.

In addition so as to improve debugging, I added the BSSID to the Wifi Verbose Logging string which is shown in wifi picker alongside the current network. This string only appear when a user goes into Developper Options and enable WiFi Verbose Logging.

The below bug is an example of situation where a spurious disconnect (a coupld seconds) handled by wpa_supplicant can cause the WiFi Settings to indicate that the link is unstable.

Bug:16140888 Wifi best network selection not smooth


Change-Id: I0e7c6b86262b88ed993c46fcdcdbab4d9b1f5ea1
2014-07-31 22:27:57 +00:00
PauloftheWest
fd19aff782 Fixed crash when changing orientation in the Add Networks dialog.
Bug: 16479540
Change-Id: Ib42977b72039f49b5d5ae688c0b0ded1094b44e2
2014-07-30 15:16:38 -07:00
PauloftheWest
0f8e031a34 Fixed a bug where Wi-Fi would should networks out of range.
Bug: 16569017
Change-Id: Ie2d094aed2fcb1b2471ae1105b6782105e6be5ce
2014-07-28 12:23:18 -07:00
Maurice Lam
2d4d9a9067 [WifiSetup] Don't show WiFi assistant card in WifiPickerActivity
Do not create the assistant card if we are in WifiPickerActivity,
which includes setup wizard and account login.

Bug: 16382431
Change-Id: Id5eaa8040eafe5222e1a5c9276a2a10bedebfd71
2014-07-25 17:55:49 -07:00
PauloftheWest
63a1affdae Fixed an illustrious NullPointer bug on Wifi Assistant
+ The class was never instantiated...

Bug: 16543506
Change-Id: I00882df31ee986116b8fa28a54796bb3b20f2e2b
2014-07-24 11:45:22 -07:00
Julia Reynolds
1a0297c544 Use restrictionsprovider framework in Settings.
Bug: 15305103

Change-Id: Ib0147e366fe90de3512d0cc06e2a47ee16012dff
2014-07-23 21:06:21 +00:00
Jeff Davidson
878ca0edb9 Merge "Link WifiAssistant card with actual settings." into lmp-dev 2014-07-17 21:04:20 +00:00
Maurice Lam
6a627652cb [WifiSetup] Mechanism for suspending auto finish
We have been using forget() to prevent auto-reconnection when the
user hits back to Wifi setup. This has the side effect of forgetting
networks, which is undesirable especially for password protected APs.

The new mechanism keeps a flag on whether the user has selected a
connection. Only auto-advance if the user has picked a network and
there is a valid WiFi connection.

The new EXTRA_REQUIRE_USER_SELECTION can specify whether a user
selection is required initially. That is, whether to auto finish if
the system connected to a network without user input. The default is
false so WiFi can be skipped if the user started setup wizard with
a valid WiFi connection (e.g. after System Update). Note that a user
selection is always required when the user goes back from the next
screen.

Since the new AP dialog does not have a connect button, the SKIP
button in the navigation bar also changes to NEXT when there is a
valid WiFi connection, so the user can hit NEXT if they decided not
to change the network.

Bug: 15333554
Bug: 15999487
Change-Id: I98e935b8e09e470a0c49c44bc299bb2eced98634
2014-07-17 20:47:04 -07:00
Jeff Davidson
873fa4f2ba Link WifiAssistant card with actual settings.
Only show the card if we haven't already enabled an assistant, and if
there's one available on the device to enable. (For now, we enable the
first one; in the future, we can offer a selection between
assistants).

When the user opts in, we either show the standard system activity or
the custom opt-in activity if the assistant has defined one. In either
case, we only dismiss the card if the child activity indicates that
opt-in was successful.

Bug: 16376277
Change-Id: Ic92c7676c563ab8c8fb695117a053004f15f7d25
2014-07-17 13:48:50 -07:00
PauloftheWest
060e01a93e Added Wifi Assistant Card
+ Show Wi-Fi Assistant card above network list that scroll under the action bar with the rest of the list
+ Display a promo image and text
+ Clicking "Setup" should link to the selected Wi-Fi assistant app (must be open to 3rd parties)
+ Touching "No, Thanks" should snooze this card for 30 days / 2nd time 90 / 3rd time 180 days / then forever

Bug: 15703202

Change-Id: If74101bea630246c6bda2de3ed79fee72eca4c0c
2014-07-16 15:46:09 -07:00
Fabrice Di Meglio
e6b336d1a0 FR #14318673 Search - add synonyms
- add synonyms to be indexed at the same time as titles and sub-titles
- fix Wi-Fi keywords

Change-Id: I1cb026775592c29c2b813153574c6695e3e90f31
2014-07-10 15:05:51 -07:00
PauloftheWest
7837b99986 Added Saved networks UI to Wifi
+ Added Saved networks to Overflow menu
+ Moved WPS Pin Entry from Overflow menu to Advance Setting Activity
+ "Automatically manage Wi-Fi : Let a Wi-Fi assistant manage your connection"
+ "Wi-Fi assistant : <selected assistant> [cog secondary hit target]
+ MAC address & IP address list items have the static italic style
- "Avoid poor connections" from Advance Settings
- "Wi-Fi optimization" from Advance Settings

Bug: 15698824

Change-Id: Ieb25b29874752db07398dcb200ec07862779f507
2014-07-08 11:26:22 -07:00
Fabrice Di Meglio
5bdf0423f9 Fix SettingsPreferenceFragment.startFragment()
- was always passing R.string.lock_settings_picker_title as a title res

Change-Id: Iab47ef3da00e91d5ce3b6dc50c50c943bd78b08f
2014-07-01 15:36:47 -07:00
PauloftheWest
b4564c39b7 Applied some minor UI changes (see below)
+ Changed wifi icons to teal
+ Removed “Secured with …” from network status
+ Added an empty state image above text when Wi-Fi is off
+ Removed Wi-Fi Direct and WPS Push button from overflow menu
+ Added Wi-Fi Direct and WPS Push button to Advance Activity
+ Input Password Dialog: Moved Signal Strength and Security to Advance
+ Input Password Dialog: Updated Password text to Material style

BugId: #15698824 #15702808
Change-Id: I542ab9aac2c098738330c92d9183d3907c4f0b38
2014-06-27 12:52:56 -07:00
Maurice Lam
9f59de930a [WifiSetup] Restore enableNext behavior
Partial revert of ag/475394 which moved enable-next-on-connect
behavior to setup wizard specific code. But account creation was
using it outside of setup wizard context.

Change-Id: I575976207a3ba2b5dac7e5467036e6ec7f519d9d
2014-06-20 15:27:25 -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
Russell Brenner
d3446c5708 Refactor setup wizard-related code
Extracted setup-related code from WifiSettings, putting it into a new
derived class, WifiSettingsForSetupWizard.

Set taskAffinity to com.android.wizard, for alignment with other
setup wizard-related tasks.

Change-Id: If371f219dac5d3eff8f7899c16cc6f9475be47cf
2014-05-30 16:16:30 -07:00
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
vandwalle
c9a6698fd4 make verbose logging a wifimanager hidden API
Change-Id: I092b7f507ad4dfdab16658929f02584a1fc22ba4
2014-05-21 20:25:15 -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
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
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
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
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
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
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