Commit Graph

17 Commits

Author SHA1 Message Date
Maurice Lam
83301b5256 [Setup] Use SetupWizardLayout
Use SetupWizardLayout for the screens that show in Settings to get
better visual consistency and new features like showing a progress
bar in list view.

Bug: 19594252
Change-Id: I53ab17a4c2d922a362e3762f1cdccb512f7d8f6e
2015-04-21 10:19:35 -07:00
Maurice Lam
e0a4c2bfe7 [WifiSetup] Remove required info
Required info is not used anymore and can be removed.

Bug: 10929897
Change-Id: I9f5648426058a5fb1c5e52f1983fee1a5448edb0
2015-04-16 21:43:49 -07:00
Maurice Lam
3f7c09bd5a [WifiSetup] Make dialogs immersive
Added a dialog specific applyImmersiveFlags method that adds
immersive flags without the LAYOUT_ flags. The LAYOUT_ flags causes
the dialog to not resize when IME is visible, and the dialog doesn't
need to be drawn under the navigation / status bars anyway.

Bug: 17759269
Change-Id: I0186e85d9f398af73c511b1a5ec6e83febe97f83
2015-04-09 16:27:13 -07:00
Maurice Lam
b484340e3d [WifiSettings] Refactor Wi-Fi required info
Instead of using an invisible TextView in the layout itself, make the
required info a list header. This paves way for using the Setup
Wizard library by including all the required contents in the ListView
itself.

The required info is not shown since Lollipop, but can be tested with
    adb shell am start -a "com.android.net.wifi.SETUP_WIFI_NETWORK" \
            --es theme material_light \
            --ez useImmersiveMode true \
            --ez wifi_show_wifi_required_info true

Bug: 19698532
Change-Id: I5a7da726b2f49af7dd755b41c73e1a1b4349699c
2015-03-11 23:03:07 +00: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
Maurice Lam
d9165c06a4 [WifiSetup] Don't show menu during setup
Hides the menu during Wi-Fi setup -- we removed the menu button from
the UI but the menu can still be started with a hardware menu button.
This change removes that ability as well (during setup).

If you want to test on a device without a hardware menu button, you
can use the command
    adb shell input keyevent 82

Change-Id: Ibe3cc679353a83c995e24680c3e7dc1575d32fe0
2015-01-21 09:48:42 -08:00
Maurice Lam
859dcab128 Remove grey Wi-Fi icon from Setup Wizard
This removes the grey Wi-Fi icon from the empty-view in the Wi-Fi
list of Setup Wizard. Also updated the style so it looks like the
description text in other setup screens.
Also fixed the view recycling by not calling getRootAdapter in
onActivityCreated, since that will cause the Preference framework
to not cache the AccessPoint preference.

Bug: 17575719
Bug: 16518752
Change-Id: I06cbc88db1c04b29a9ce8221596265effc39b90b
2015-01-15 14:33:31 -08: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
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
Maurice Lam
5aee7d5c68 [WifiSetup] Make illustration header not clickable
No more "pop" sound when the illustration is tapped on.

Bug: 16331851
Change-Id: Ib528e1d6f669f71e0c2f24164726cee47b06700b
2014-07-15 18:24:18 -07:00
Maurice Lam
588e61aa05 [WifiSetup] L layout update
Changed the layout based on the new design mocks. Copied over
StickyHeaderListView and SetupWizardHeader. Currently using the
generic illustration but will update to Wifi setup specific version
once we get them.

Change-Id: I22bdef8c9860d419be55938e1e4a6a682db5b7e8
2014-07-09 19:33:28 -07:00
Maurice Lam
f13c783f6b Merge "[WifiSetup] Removed button bar" 2014-06-23 21:50:10 +00: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
Maurice Lam
432bd3aab1 [WifiSetup] Removed button bar
Removed button bar from setup_preference because the same feature
is provided in SettingsActivity already.
Also removed setup custom button because that functionality is
superceded by the navigation bar.

Change-Id: I7f853d57bb63ad3c410e2731d1485d152f806d9f
2014-06-17 16:59:28 -07:00
Maurice Lam
6776c67ac1 [WifiSetup] Use setup navigation bar
Use the setup navigation bar in wifi setup activity.

1. Include frameworks/opt/setupwizard/navigationbar/common.mk in the
make file.
2. Make WifiSetupActivity implement NavigationBarListener
3. Added the fragment in setup_preference.xml, wrapping the whole
screen in a LinearLayout
4. Moved skip and next screen logic to WifiSetupActivity, refactored
the skip dialogs into a fragment

Change-Id: Ia973c0a61faa3ead201bd10d5aa8de4bc6e091c1
2014-06-16 17:19:14 -07:00
Russell Brenner
c56c8c99e9 Don't advance when recreating from bundle
The fragment is recreated from a bundle when returning from finished
activities, like the OTA and walled garden checks. Telling
WizardManager to advance to the next screen causes a duplicate
activity because WizardManager has already responded to the other
finished activity.

Bug: 15393012
Change-Id: I9817e106a0b243b3943bff6edafc228e9e002232
2014-06-04 17:32:22 -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