Commit Graph

258 Commits

Author SHA1 Message Date
Jeff Sharkey
df828405b1 Follow PackageManager refactoring.
Change-Id: Iae8b40acf6317366f0de780e367e0c21a9966477
2016-01-06 14:51:32 -07:00
Jason Monk
0b4fdc49fb Create configure Wi-Fi screen
Add a gear on Settings menu, and move a bunch of stuff from
overflow and advanced screen to there.  Also move add network
to be the last item in the list rather than in overflow.

Also fix WifiP2p breakage.

Change-Id: I5c84c25e5ba9224f77dcd988b0b2850ae6e71168
2015-12-04 12:57:39 -05:00
Jason Monk
73df1a9894 Guard against monkey crash.
Bug: 25813437
Change-Id: Id86c775b235ee303dc05c1cf70a407bf5472b17c
2015-11-30 14:50:40 -05:00
Makoto Onuki
4cfe39f539 Use explicit APIs to get device owner information
Bug 24676413

Change-Id: Id346c2f01658173c9671edcfd34bc33f1b25faa4
2015-11-24 14:55:26 -08:00
Jason Monk
3069581512 Summary support for Settings Home
Also add summaries to a few of the major items.

Change-Id: I17924f14941fe095d819e142cdd21cf4b4e9ffd1
2015-11-17 13:51:45 -05:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Maurice Lam
771fac591f [WifiSettings] Add Wi-Fi dialog activity
Add a Wi-Fi dialog activity that can be started by setup wizard to
connect to a Wi-Fi access point.

Also refactored mEdit and mModify in WifiConfigController into an
int-enum mMode, with modes view, connect and modify. This is how the
new modes maps to the old flags:

MODE_VIEW     --  mEdit = false, mModify = *
MODE_CONNECT  --  mEdit = true, mModify = false
MODE_MODIFY   --  mEdit = true, mModify = true

Bug: 23426311
Change-Id: I8e2221fd3c42577068e07686dab245dd5888e0ae
2015-09-17 16:03:49 -07:00
Maurice Lam
2662df8433 [WifiSettings] Submit Wi-Fi dialog with enter key
Add a OnKeyListener for hardware keyboards and an
OnEditorActionListener for on-screen IMEs to submit the Wi-Fi dialog
with the currently entered information.

Before committing the action, check for whether the dialog is
submittable -- that is checking whether all necessary information has
been entered. If not the enter key behaves the same as it is before
the change.

Bug: 22211604
Change-Id: Idede4233a7385d3bcd8fd6614948270280536bf1
2015-09-14 12:07:06 -07:00
Xiaohui Chen
6f03829e74 Cleanup remaining USER_OWNER in Settings
Bug: 19913735
Change-Id: I6894a7c81ed7504b02d533d9e9f65f800dbca895
2015-09-03 10:31:34 -07:00
Sanket Padawe
e0ece963c6 Avoid new network to connect by using "Add Network" instead only Save it.
Bug: 23422433
Change-Id: I49aabff91ba127bf2a3b0aa25c8163ee4097bf4d
2015-08-21 16:45:30 -07:00
Sanket Padawe
3bf0db8d10 Fix issues in AP dialog arising after clicking on AP preferences.
+Added a new flag to keep track if user wanted to modify AP by hard
pressing on AP.

Bug: 22485686
Change-Id: Ia60a564a5344393f5e5340a3493ae7c660ead3d7
2015-07-24 13:52:03 -07:00
Jason Monk
088537a315 Fix wifi not re-ordering
Bug: 22361247
Change-Id: I5c25061735628682741060c8a699c0a977c4351b
2015-07-10 14:08:31 -04:00
Jason Monk
55dd8869db Reduce jank in wifi settings
- Fix view recycling for AccessPointPreferences by adding a dummy
   during initial inflation
 - Cut down on what is done during onBindView and refresh()
 - Try to re-use AccessPointPreferences when possible

Some jank still occurs when scan results come in, but it is less
than before.

Bug: 16518752
Change-Id: I2619303281dd50aa3864783c49738ae9f221834a
2015-06-29 13:47:14 -04:00
Lifu Tang
55601622d5 Language Update for Wi-Fi/Bluetooth Scanning
Bug: 22046234
Change-Id: Iea8fa2368d1e568a8e1fdd3edefa8f4fc6053e48
2015-06-23 18:54:27 -07:00
Zoltan Szatmary-Ban
9dd754e1f4 Merge "Reflect effect of all Wifi editability factors in Settings" into mnc-dev 2015-06-23 08:44:45 +00:00
Zoltan Szatmary-Ban
5de33f402a Reflect effect of all Wifi editability factors in Settings
Bug: 21427528
Bug: 21150087
Bug: 21612565
Change-Id: I62962a9b3fc1bb9c90be79e133873006da102054
2015-06-19 11:06:37 +01:00
Jason Monk
4dd013efc1 Fix opening secured networks from QS
Bug: 21908788
Change-Id: I09b1d22ae8b1815e720bd8c05fa1e38d66d1dcfd
2015-06-18 12:36:34 -04:00
Jason Monk
c68b46c1f2 Handle switch of ssid to CharSequence (for spans)
Change to reference the string directly for places like search,
etc.

Bug: 20059794
Change-Id: I3305c9833e8aeea52b968c094d0a1881a3e6699e
2015-06-15 10:09:55 -04:00
Sanket Padawe
3d32af2642 Fix Wifi Settings crash on continuous wifi toggling.
Bug: 21591640
Change-Id: I17aa385a1e5fb3edfdb054234ab20b3dbc6fea60
2015-06-03 14:16:13 -07:00
Jason Monk
7a0b412ed2 Make use of WifiTracker's WorkerThread support
Let the AccessPoint callbacks come in on a BG thread and do more
of the handling there.

Bug: 21486080
Change-Id: I529152d9f5c429b790a669b75b6d955ce4336caf
2015-05-28 12:26:09 -04:00
Zoltan Szatmary-Ban
cb5444ad2c Merge "Reflect Wifi config lockdown restriction in Settings" into mnc-dev 2015-05-15 20:22:34 +00:00
Zoltan Szatmary-Ban
1a2aa9942f Reflect Wifi config lockdown restriction in Settings
DO created WiFi configurations are now only locked down
for editing/removing if DISALLOW_CONFIG_WIFI is not set.
This needed to be reflected on Settings UI.

Bug: 20719934
Change-Id: Ibd218821ab46cca8396084e2d73ae5ee00b584b3
2015-05-14 01:40:48 +01:00
Jason Monk
02f0a4aff3 Fix connecting to secure wifi from QS
Sometimes the preference isn't created yet, so we need to hold on
to the ssid until the preference for that access point gets created.

Bug: 20975085
Change-Id: Ib5804611793550106f6059b1afe016de4e89bc64
2015-05-13 10:17:33 -04:00
Maurice Lam
e0bf739ddf Merge "[WifiSettings] Add progress bar when scanning" into mnc-dev 2015-04-30 17:53:20 +00:00
Maurice Lam
28c3f6bb71 [WifiSettings] Add progress bar when scanning
Add a progress bar when the Wi-Fi screen is in a transient state,
like enabling, disabling Wi-Fi and scanning for network. This change
sets the progress bar as a pinned header at the top of the activity.

The pinned header container needs to be match parent so that the
progress bar can occupy the full width of the screen. If the header
view doesn't want to fill the width, then the header view *inside*
the container should be wrap_content.

Added an overloaded setPinnedHeader method that takes a layout
resource ID, and returns the view to the caller. This way the
inflater can set the parent property so that layout params will not
be ignored.

Bug: 17389577
Change-Id: I18d0eb7c72ad31d1c4b35a54789016c32c81fb93
2015-04-29 22:38:22 -07:00
Vinit Deshpande
a2fd307651 Implement 'Available via Passpoint' feature [DO NOT MERGE]
This also fixes the issues related to explicit connection
to passpoint AP, and fixes occassional mention of
'connected via Wi-Fi Assistent'

Change-Id: I152cebafa6259194f1d09a6972a3508156335cb6
(cherry picked from commit 08b5b5d439)
2015-04-29 19:32:50 +00:00
Maurice Lam
46a8e6c143 [WifiSetup] Show progress bar when scanning
Added setProgressBarVisible method to show the progress bar when the
UI is in a transient state (e.g. enabling / disabling Wi-Fi, scanning
for access points).

Bug: 19674909
Change-Id: I82180b7949a03f6ac468f069febf0ffd1f42f1b7
2015-04-27 10:22:28 -07:00
Andres Morales
93564706e1 Merge "Fix crash when rotating NFC dialog" 2015-04-24 23:19:36 +00:00
Zoltan Szatmary-Ban
6221467fae Fix NPE when tapping on Add Network in Settings > WiFi
Bug:20542955
Change-Id: I06cfc21f906f94b2b61f2121c22c3d3318c9e65b
2015-04-24 17:27:25 +01:00
Zoltan Szatmary-Ban
008c9238d9 Merge "Show dialog when user tries to edit a locked down WiFi config" 2015-04-22 10:10:36 +00:00
Andres Morales
aef794a289 Fix crash when rotating NFC dialog
Bug: 18710540
Change-Id: I0f50a8aed555439e8beeff70276d646fc11afe0a
2015-04-21 12:43:03 -07:00
Zoltan Szatmary-Ban
89403529ad Show dialog when user tries to edit a locked down WiFi config
Also, 'FORGET' button is not shown on WifiDialogs of locked down configs.
Context menu only shows 'Connect' for them.

Bug: 20117316
Change-Id: I3fa986c10b6ff47d1a897794213c225c8c6f579b
2015-04-20 16:04:15 +01:00
Sanket Padawe
dce1c724f1 Remove "Show apps" and add summary to saved networks from Wifi Settings.
Bug: 20148271
Change-Id: Ie042ac83a7253ff86f3eda77fb1e8a4c0e1a13d5
2015-04-13 17:57:38 -07:00
Lifu Tang
be794c30ca Added links to scanning settings
Bug: 19918721
Change-Id: Ifb1508807d34b675e9ea1522f86a9310ed6b663f
2015-04-06 11:00:04 -07: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
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04:00
Sanket Padawe
b5f4a2c86e Fix crash while trying to connect to network in WiFi Settings.
Bug: 19535465
Change-Id: Ibfc40a08e6c648681df5fd16e2334d9ec45b10f4
2015-03-18 16:20:40 -07: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
Andres Morales
c91676e6d9 am 2e75203a: Use getDefaultAdapter instead of getNfcAdapter automerge: 98d8a49
automerge: 4bd31b9

* commit '4bd31b9ac676a5d3c6943bc9f86f524eedad5bef':
  Use getDefaultAdapter instead of getNfcAdapter
2015-02-03 16:04:37 +00:00
Andres Morales
2e75203a6e Use getDefaultAdapter instead of getNfcAdapter
getNfcAdapter can throw an exception if NFC is not
available

Bug: 19227597
Change-Id: Ib95849057938066dc5760a34f16333f5423ce61f
2015-02-02 13:39:57 -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
Andres Morales
c2fb78627f am dfb448d2: am f58a646b: am f11feccf: Merge "Don\'t display Write NFC option if no NFC" into lmp-mr1-dev
* commit 'dfb448d23ec666f9fdbb1ee44ccaef12ea98a80c':
  Don't display Write NFC option if no NFC
2015-01-07 16:37:55 +00:00
Andres Morales
f11feccf99 Merge "Don't display Write NFC option if no NFC" into lmp-mr1-dev 2015-01-07 16:21:48 +00:00
Andres Morales
64c7429ac8 Don't display Write NFC option if no NFC
Bug: 18830151
Change-Id: Id5a06e6d98380f509307a6819494255524755ab1
2015-01-06 09:38:53 -08:00
Jeff Davidson
06b65d1c7d resolve merge conflicts of 0c7e4ed to master.
Change-Id: I6c5625564f69769eb6f61d3df7531f032080d0d9
2014-12-09 15:11:44 -08:00
Jeff Davidson
5ead6b92fd Final platform settings UX for ephemeral networks.
Show "Connected via Wi-Fi assistant" instead of just "Connected" when
a Wi-Fi connection is ephemeral. Otherwise, treat ephemeral
connections just like saved ones - show (read-only) connection stats
when you click the network, and offer the ability to "forget" the
network, which prevents further ephemeral connections.

Bug: 18525241
Change-Id: I0d2146ab47b82d32c50b2ef883f176a6b6066713
2014-12-05 10:14:41 -08:00
Jeff Davidson
568d156089 am 0fc9271b: am c4a68608: am 99f191f5: Remove the Wi-Fi Assistant card.
* commit '0fc9271b21b46b6972dcf0e976d20605042b0b38':
  Remove the Wi-Fi Assistant card.
2014-11-07 04:12:59 +00:00
Jeff Davidson
99f191f585 Remove the Wi-Fi Assistant card.
Per the latest mocks, advanced wireless settings will be the only
location in platform settings where Wi-Fi Assistants are configured.
The card is no longer being used.

Bug: 13780935
Change-Id: Idddf971404532256165045665bd0a6b19966d2bd
2014-11-06 13:30:34 -08:00
Jeff Davidson
3959e9b933 am 7b17e24d: am a9086ee9: Show accurate connection status for ephemeral networks. automerge: b46a919
* commit '7b17e24d36e5fd3263204a4ee666e85a4a006b90':
  Show accurate connection status for ephemeral networks.
2014-11-06 02:27:33 +00:00
Jeff Davidson
b46a9194fe Show accurate connection status for ephemeral networks.
Configurations for these networks are not returned in
getConfiguredNetworks() and likely shouldn't be as clients of this API
would not expect them. (Note also that the ephemeral bit is marked
@hide). But the framework may connect to them regardless.

In these cases, as long as the connection status is something other
than the coarse-level DISCONNECTED, we show the status to be an
accurate representation of Wi-Fi state. (To make this possible, we
pass around the full NetworkInfo instead of just the DetailedState,
allowing us to get the coarse state where needed).

When long pressing on a non-DISCONNECTED ephemeral network, we offer
the ability to save the configuration. (Note that this flow is
currently broken and being tracked by another bug, but the behavior is
consistent with what happens when you simply click on the SSID).

Bug: 18205278
Change-Id: I30592c89546068c796f458a86bb26eb3b28c64df
2014-11-05 15:04:14 -08:00