Commit Graph

179 Commits

Author SHA1 Message Date
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
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
Russell Brenner
ac57f3e1eb Add resources for light theme
Bug: 10407819
Change-Id: Ie232b2d48a8d67355d7c31a878ebaa79aae7c44d
2013-08-30 10:10:02 -07:00
Geoffrey Borggaard
e38ea38002 Adds a base class for restricted settings
Creates an easy way to ask for the restriction pin before
allowing access to a settings page.  Does this to the WiFiSettings.

Change-Id: I49734f66e09b6449596412ecf6fc1113bf57ce7f
2013-08-02 17:07:21 -04:00
Birdson_Chen
2dcf6083f7 Fix "Add Network" show last selected WiFi AP Dialog
When user taps Wi-Fi add network button, the pop-up dialog is not empty (it shows last selected WiFi AP Dialog).
The above is observed after the following steps:
- Launch Settings application
- Turn on Wi-Fi
- Select any Wi-Fi Access Point which is not connected previously and change to portrait mode
- Press Cancel from the pop-up and select Add Network icon in menu

Because the "Rotation" operation will cause WifiDialog re-creating and the current settings
of selected Wi-Fi Access Point is saved before WifiDialog destroyed.
Then, the saved Wi-Fi Access Point is displayed when user tap on "Add Network".

It need to clear the saved Wi-Fi Access Point when WifiDialog re-creating.

Change-Id: I3e93943e5bee405329e309c3ec88a35ee9cafc43
2013-07-29 10:37:36 +08:00
Robert Greenwalt
5ac904321d Don't show scan-always text if it is off.
bug:9206410
Change-Id: If7e06f50d3d8db6ea198f437d4d268e65ec96c16
2013-05-30 11:33:36 -07:00
Russell Brenner
765f55f52a Improved logic for Skip warning message
Use ConnectivityManager instead of TelephonyManager to determine
how device is connected.

Bug: 9118704
Change-Id: I5c1db90500591ca67e927976066a46e1f66e2e60
2013-05-24 16:09:39 -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
Maggie Benthall
91c016de41 UI compliance for WifiSettings
Rename and reword string that appears in WifiSettings when user is 
restricted from modifying the networks.

Bug: 8696370
Change-Id: I1945550c05163ebff9602e4ba8ba890fece61265
2013-04-24 19:21:10 +00:00
Maggie Benthall
7e61c23306 Implement Settings app UX for when a user has wifi config locked down.
When the user is restricted from configuring wifi:
- Leave the on/off button enabled
- Hide all menu options
- Hide all networks, and display a message saying:
 "This user is not allowed to configure wireless networks."

Change-Id: I20193b552ea071740686bd9091637459e9b668b5
2013-04-11 15:45:58 -04:00
Fabrice Di Meglio
f2a9717b93 More fix for bug #8505156 WiFi properties dialog is having some issues in RTL mode
- use setPaddingRelative() instead of setPadding()
- add missing android:textAlignment="viewStart"

Change-Id: I8b981fb64686067de5998e4e218b04126bf2b2f8
2013-04-02 18:36:43 -07:00
Irfan Sheriff
ca8e9cd383 Fix monkey crash
Bug: 8011964
Change-Id: Idafdb7b3bc22d3280e0aa93877b7e09a23270149
2013-03-26 14:11:36 -07:00
Russell Brenner
eca454ebc2 Enable Back during setup wizard
Aside from enabling the system back button, updated the result codes
to distinguish back (RESULT_CANCEL) from skip (RESULT_SKIP).

This CL should have been uploaded along with http://ag/284254,
which has already been merged.

Bug: 6477759
Bug: 8409375
Change-Id: I031acda1d675ee79a3166a51073113093211709d
2013-03-19 14:03:11 -07:00
Irfan Sheriff
13b3882049 Clean up scan handling
use regular scan API instead of obsolete active scan API

Bug: 8158647
Change-Id: I8f70e19219ad789b7501a40529bcd6b6524739e8
2013-02-21 15:44:10 -08:00
Irfan Sheriff
4cd0f1191b am 6639dee4: am 203631b2: Merge "wifiSettings: Updating the networkinfo on supplicant event"
# By sunil duttu
# Via Android Git Automerger (1) and others
* commit '6639dee497304c359141caf9b0452699a6d64aa9':
  wifiSettings: Updating the networkinfo on supplicant event
2013-02-06 09:02:26 -08:00
sunil duttu
f99d52cf71 wifiSettings: Updating the networkinfo on supplicant event
In framework we update the networkId on supplicant state change
these changes in the network info should be reflected in settings.
there by updating the networkinfo.
The problem we are facing without this fix is when we have single
saved AP profile Switching off the AP when we are in connecting
tate resulting in a behavior Where UI keep showing connecting
to that AP instead of showing it as out of range.

Change-Id: I04073b9a4068f4b75216ebfd431adc126583f15c
2013-02-06 12:04:37 +05:30
Fabrice Di Meglio
fd50438e8e Merge "Fix Switches padding for Settings app" 2013-01-17 16:33:25 +00: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
Irfan Sheriff
de11bcec8d Update enterprise API usage
Also, remove the unnecessary keystore lock/unlock checks since these
are now controlled at lockscreen

Change-Id: If65c4029d4cf2b8377fbc3512c9f691572125995
2013-01-14 14:45:16 -08:00
Russell Brenner
56a166e9e3 Added info about why Wi-Fi is required
Added a new optional textview to wifi settings, informing that wifi
is required during setup. For use on Nakasi 3G.

Bug: 7383934
Change-Id: I231472438e61ccddedc1e680a362f90738d64a2d
2012-10-19 18:55:14 -07:00
Russell Brenner
3067fbce2e Return RESULT_OK when wifi connection established
Two new exit points were not setting a return result. Since the
default result for an activity is RESULT_CANCEL, Setup Wizard was
continuing as if no connection was made.

Bug: 7298234
Change-Id: I44085f38ed021b7d417f9794b3341747f00300e9
2012-10-09 16:17:12 -07:00
Russell Brenner
88c9f2889f Show warnings when skipping Wi-Fi connection
If user skips over Wi-Fi, warn about possible carrier data charges or
inability to receive updates, depending on whether or not phone
service is available.

Note to translators: Some strings are being moved here from setup
wizard. They're tagged with their msgid's so as not to trigger
retranslation.

Bug: 7211786
Change-Id: Idec7863377bd453d1808b26ee3da75f8310b32e0
2012-09-28 10:51:31 -07:00
Wink Saville
b08739003a Merge "Fix an NPE in WifiSettings." into jb-mr1-dev 2012-09-27 18:14:45 -07:00
Wink Saville
001e14a118 Fix an NPE in WifiSettings.
Under stressful conditions, like the Monkey tests, getActivity() can
return null. We assume this occurs when the fragment has shut down but
asynchronous commands are returning results. This change adds appropriate
null checks but assumes during normal operation the checks are not needed.

Bug: 7152711
Change-Id: I7a3736ccead33738dab1a36e78ae1d8042db6e94
2012-09-27 16:16:15 -07:00
Russell Brenner
852cfa9335 Move super call to top of onActivityCreated
The historical reasons for not calling super.onActivityCreated early
on appear to be no longer relevant.

Bug: 6935999
Change-Id: I63aad8a4c70ce938ecb07541267cad44e3e18e13
2012-09-20 14:07:41 -07:00