Commit Graph

86 Commits

Author SHA1 Message Date
Doris Ling
dd5693c6f4 Fix crash in TetherSettings.
In onCreate(), it checkes whether ui is restricted, and try to show an
empty screen by creating a new preference screen. However, when the
preference is not attached, it failed to get the next preference id.
Instead of replacing the current screen with a new one, remove all the
preferences on the screen.

Change-Id: I085bee025cfeabaf4aefacb717d145e668bd85e1
Fix: 36589767
Test: manual
2017-03-24 13:10:09 -07:00
Doris Ling
47ec3857a5 Update preference text for Network & internet screen.
- Add footer info to Hotspot & tethering
- Add summary text for Data usage -> Network restrictions
- Update summary for Hotspot & tethering -> Portable Wi-Fi hotspot
- Remove quotes from Wi-Fi summary

Bug: 36296257
Test: make RunSettingsRoboTests

Change-Id: Ibab61b089521a3339e660e9df0db0cd1b316712b
2017-03-21 18:00:59 -07:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00:00
Fan Zhang
d65184faef Log visibility change for DialogCreatable in Settings.
Bug: 30681529
Test: adb logcat -b events | egrep "(sysui_|notification_)"
Test: make RunSettingsRoboTests
Change-Id: I51754d258ba1ddfae24323681f21cd02de4dbb4e
2016-09-21 16:30:32 -07:00
Rebecca Silberstein
c2f6141093 TetherSettings: check provisionApp array length am: 39f0e41ec7 am: 02602b9b2c
am: 2534a478a6

Change-Id: Ibdd4041fb89cace2e3e9734a243ce4d85a922188
2016-08-31 21:22:21 +00:00
Rebecca Silberstein
2534a478a6 TetherSettings: check provisionApp array length am: 39f0e41ec7
am: 02602b9b2c

Change-Id: I51d5a3094a575254489d734c823e10608ddb369b
2016-08-31 20:51:31 +00:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
Rebecca Silberstein
39f0e41ec7 TetherSettings: check provisionApp array length
Before attempting to get values from the provisionApp array, check to
make sure there are at least two elements.

BUG: 30889755
Change-Id: I42d6f8754910c12acf7bb3fbcc12e3f7be30d5e9
TEST: manually tried to open settings and it did not crash
2016-08-16 09:06:48 -07:00
Jason Monk
e0d330f138 Merge \\"Fix tethering re-enable after edit.\\" into nyc-dev am: dbb5a0b918
am: c04ac8415a

Change-Id: I130760913149185f5cef084d9a239ad35a4fad04
2016-06-22 15:29:14 +00:00
Jason Monk
cf7c2374a9 Fix tethering re-enable after edit.
Sometimes the tether state change comes in late (or seemingly not
at all).  Also listen for wifi ap state changes as a fallback for
this case.

Change-Id: I6677c4277453be881967a3cf2234de11cd0237b8
Fixes: 28851179
2016-06-21 14:06:48 -04:00
Robert Greenwalt
89b8babe6a resolve merge conflicts of b34cf86 to nyc-dev-plus-aosp
Change-Id: Ie6a95224a62023a2a19054aa95382d24365124f5
2016-06-13 13:01:36 -07:00
宋凯伦
0fb2f2bd00 Fix the memory leak in TetherSettings
https://code.google.com/p/android/issues/detail?id=210848

We need to close the bluetooth adapter's profile proxy in OnDestroy 
method, or it will cause TetherSettings object to be held and won't
release. And finally it will cause OOM issue.
Change-Id: Id7667f751697c8ef9fccaaabfed28a91d4fa4960
Signed-off-by: 宋凯伦 <songkailun@xiaomi.com>
2016-06-01 02:13:50 +00:00
Felipe Leme
5c09184e00 Disable tethering when Data Saver mode is on.
BUG: 28313291
Change-Id: Idbedd440a1baa41f1407b32e86f5ae0080e60798
2016-04-22 14:25:35 -07:00
Jason Monk
245bbaf205 Make sure mWifiManager gets initialized
To avoid crashing.

Bug: 27561590
Change-Id: I417b8382cb3d1b6c22fa33e05e9b4bf35e048e7e
2016-03-09 10:49:33 -05:00
Rebecca Silberstein
ffb4fbb1a7 Save WifiAp config changes when hotspot is enabled
We need to properly handle asynchronous events when WifiAp for hotspot
is enabled and the user changes the config.  This CL changes the
behavior to:
1 - mark local boolean indicating a restart is needed
2 - trigger the WifiAp to stop
3 - save the new config
4 - when the stop is complete (and the boolean is set), restart the
WifiAp.

Also fix a few style issues in the file.

BUG:27460194
Change-Id: I7e49ab9c49e125017cf83866a396701e440bf383
2016-03-07 09:49:52 -08:00
Sudheer Shanka
7dbbe13168 Add disabled by policy empty views to more screens.
Bug: 27214401
Change-Id: I6cd4292a63610671070bf2134105e9e348c3ab32
2016-02-19 20:18:43 +00:00
Jeremy Klein
e3e7b95312 Make TetherSettings use the new tether api.
The new API handles all the provisioning logic so this area can
get significant code cleanup.

Change-Id: I4bcffb14b3ce26a01d17ec149599d63b0b4392f1
2016-02-04 18:58:14 -08:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Jeremy Klein
8a934767dc Allow TetherService to take a callback to receiver provision results.
See ag/850685 for corresponding framework changes. This is being done
as part of exposing a cleaner tethering API which will be used by
Quick Settings and Settings.

BUG: 26247383
Change-Id: I061b8b8b2b0c5bbe98f50deb051e2bfb8e773d61
2016-01-25 15:09:48 -08:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Xiaohui Chen
44879a387a sys user split: first pass updating Settings
Update various places in Settings to use "admin" ueser flag
instead of checking user id "0".  This should be no-op in
single user mode since the only admin user would be user 0.
In split system user mode, this will correctly ACL admin
user instead of non-interactive system user.

Bug: 19913735
Change-Id: Ida4d59c5f689ea0dc34b3b3ff0822b087fa0afd6
2015-07-27 15:39:28 -07:00
Nicolas Prevot
a5df4779a0 Don't allow secondary users apps to start restricted Settings fragment.
On a secondary user, the fragments ApnSettings, TetherSettings and VpnSettings
should not be started.

But an app can still send an intent to start these fragments.
Prevent this by checkin the userId in these fragments.

BUG:15313261
BUG:15312781
BUG:15312494

Change-Id: I2a36bb89a8e37e4440aa28372d7a1800b33dae37
2015-06-02 16:49:20 -07:00
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04:00
John Spurlock
9a23adf69d Settings: Remove all unused imports.
Change-Id: Iebfa52cb849d69974c94902b0b020893cf5618a3
2015-03-18 15:51:15 -04:00
Jason Monk
4896c01729 Move some Tethering code to SettingsLib to share
Change-Id: I43a356f2a14af4a15d1827919c39bbd1a04d3a94
2015-02-12 10:33:40 -05:00
Jason Monk
37832d661a Add a periodic check of the tethering provisioning
Add a service that handles the check through broadcasts which are
defined through configs, similar to the previous configs for the
activity.

Depends on I1f6e2d954562c5a16a0de60dac625005ec3e5c50

Bug: 18453076
Change-Id: I515d72706e9ca37877e67c44427af1b75b146390
2014-12-11 15:07:45 -05:00
Jeff Sharkey
e16e44f756 Migrate license display to HTMLViewer.
For security purposes, we're no longer allowing WebView to be loaded
when running as system UID.  Instead, we now launch HTMLViewer to
show the details.

Bug: 18376908
Change-Id: I3c6a7897ab4ad0fc2c5463e5d69c7f53fb934e31
2014-11-14 09:46:33 -08:00
PauloftheWest
29aab7a2ad Fixed a Settings crash.
+ When in Settings->More... we will no longer provide a tethering option
if tethering requires provisioning, but the provisioning app is invalid.

Bug: 17671381
Change-Id: I48a8178865a7ffddec714c1f6ee6f18d34801b60
2014-09-29 14:58:27 -07:00
Rohit Sisodia
37155e9633 ATT Entitlement changes in Settings to pass Tether Type.
ATT has different provisioning servers for BT,Wifi and USB Tethering and
Entitlement app need the type of Tethering to be passed before provisioning
request goes out.

Bug:17640036

Change-Id: I6683a747e1925716575ba683aeefc644ced7e37f
2014-09-26 15:09:03 -07:00
PauloftheWest
656c88cb71 Updated Tethering and portable hotspot to use switches.
Bug: 17020102
Change-Id: I5da1745d4ea9545f8960c015ca6858fb0a34de0d
2014-08-25 08:45:05 -07:00
Julia Reynolds
ee27b9de8f Settings user restriction changes: wireless & networks changes.
Bug: 14081992
Change-Id: I32b0f06da7e7ff9bd8303ce26be2584e6cddbedc
2014-05-29 13:21:29 -04:00
Robert Greenwalt
9e96c453fb am a1fa7cef: am 1faefa06: Merge "Fix one NPE in tethering setting"
* commit 'a1fa7cef5d88d0f515efa07d0f7274c41fa6d712':
  Fix one NPE in tethering setting
2013-08-15 07:19:36 -07:00
Jianzheng Zhou
508c7c16ab Fix one NPE in tethering setting
Once we not declare BT feature, go Setting->more->tethering
will trigger this NPE.

Change-Id: I4736e7bade261475acda74e26250a81452018ffa
Signed-off-by: Jianzheng Zhou <jianzheng.zhou@freescale.com>
2013-08-15 14:34:52 +08:00
Amith Yamasani
394eaa21e7 Don't show tether settings in shortcut picker
On devices that don't have tethering options, don't allow user
to create a shortcut to the tether settings.

Bug: 6865610
Change-Id: I2ebbd6ef98391ef3fe74130570bd9b70108a2aa9
2013-06-11 11:16:10 -07:00
Ryan Baxter
232e6fb382 Fix the message when Bluetooth is turning off while on the tethering menu.
Currently says "Turning Wifi off..."
This change will display "Turning Bluetooth off..." instead.

Change-Id: I697d19ca4d7a69cc6b3729ad09fcf38bf5ab2427
Signed-off-by: Ryan Baxter <rbryanbaxter@gmail.com>
2013-03-07 20:36:22 -05:00
Robert Greenwalt
4f1970fe3e Must initialize the new atomic..
bug:7172859
Change-Id: Ibaf390683fa36771215b463fb6b088f7430c0462
2012-09-16 17:03:08 -07:00
Robert Greenwalt
f60b92bb41 Protect self from async change of BluetoothPan
bug:6945678
Change-Id: I627a55aea9170f889823a38c8e2bb08a06faa841
2012-09-14 10:40:20 -07:00
zzy
6665ee3210 Fixed the display count of connected panu device.
Root cause: Bluez relies on the count of activated pan network
interfaces to show how many panu devices are connected. But
Bluedroid has only one shared pan network interface for any
number of connected panu devices.

Change-Id: I52e3d6d79e2f1b9f8afab1d70c9ff1eca3ef2349
2012-09-10 11:59:52 -07:00
Jean-Baptiste Queru
43231f2d6e am f4cc034e: am d61c23b3: Merge "TetheringSetting: Keep Tethering checkbox unchecked until tethering up"
* commit 'f4cc034e8c61a05b3e99ca4f698b3fe6de21bc98':
  TetheringSetting: Keep Tethering checkbox unchecked until tethering up
2012-08-17 08:57:03 -07:00
Li Wenji
83397eab96 TetheringSetting: Keep Tethering checkbox unchecked until tethering up
When click Tethering, the checkbox will be checked and then unchecked,
and finally move to checked states. This causes confusing to end user,
we need to keep Tethering checkbox unchecked before tethering is really
up.

Change-Id: If2314b7dd1369e619dead45af38fd53c7e89c34e
Author: Li Wenji <wenji.li@intel.com>
Signed-off-by: Xiaokang Qin <xiaokang.qin@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 18281
2012-08-16 14:47:43 +08:00
Matthew Xie
b5f144af8e Clean up codes, fix long lines, improve readability, etc
Update copyright date, remove unused variable, import

Change-Id: I731c48c8e5b16cbee5230f1d02109f249b8bab5d
2012-07-16 15:38:38 -07:00
zzy
7f38f47ed2 Added null pointer check 2012-07-16 15:38:37 -07:00
Amith Yamasani
d3fed687e7 Move tether settings help to menu and remove local assets.
Bug: 5270092

Using web help instead of local assets.

Change-Id: Ib93e72443b30367521febc43279422ec130efbd5
2012-04-27 17:38:40 -07:00
Amith Yamasani
201896e983 am 79ffc669: am aaff44c8: Don\'t allow wifi tethering when running monkeys.
* commit '79ffc669173325e62fdb9f5a1f96fe2a5c3c230b':
  Don't allow wifi tethering when running monkeys.
2012-01-09 16:37:34 -08:00
Amith Yamasani
aaff44c84f Don't allow wifi tethering when running monkeys.
Bug: 5607825

Remove the wifi access point settings and wifi tethering checkbox when
monkeys are running.

Change-Id: I64b930ddb791013a08c178561fe29130f1f0e4b8
2012-01-09 14:52:58 -08:00
Robert Greenwalt
505766cd60 Add system prop to work around tether provisioning
Set net.tethering.noprovisioning to something non-empty to avoid the provisioning check.

bug:5445277
Change-Id: I048bffe2c11d80d79e8065f7fbe6cfb6db87da85
2011-11-09 17:06:41 -08:00
Irfan Sheriff
01b32368ff Add provisioning checks for BT and USB
Bug: 5568752
Change-Id: Ide4f3c0eb19f8e70e301a13d81b76dd6a0516c3a
2011-11-04 15:12:13 -07:00
Irfan Sheriff
642a3c78f8 Use component details to send provisionig intent
Bug: 5544654
Change-Id: I0bd33c2a0d4c657bd10ba966d67ff54c27e42ea1
2011-11-01 14:58:31 -07:00
Irfan Sheriff
aa3d2c406e Add mobile hotspot provisioning support
Bug: 5346812
Change-Id: I3e117fb62039c1d8370440ab4109705894011928
2011-10-06 11:45:45 -07:00
Amith Yamasani
0f47465a3f Fix a bug in disabling wifi tethering on a wifi-only device.
Bug: 5116955
Change-Id: I924915efbd46f918bd94c124f10389912fddf41a
2011-08-31 10:48:36 -07:00