Commit Graph

69 Commits

Author SHA1 Message Date
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
Irfan Sheriff
233577cc25 Restart soft Ap on a running config change
Bug: 5079339
Change-Id: I083548ef5ab3ce177e7fa3e7375a68b52bb576d7
2011-07-27 14:05:37 -07:00
Mike Lockwood
69a0957717 Fix USB tethering
The previous approach no longer works with the new USB drivers, since the usb0
interface is no longer enabled by default.
This introduced a chicken & egg problem - usb0 will not be enabled until the
user tries to start tethering, but Settings will not enable the checkbox unless
usb0 is enabled.
To fix this we add an explicit call to start USB tethering in the connectivity manager.
This will enable RNDIS if necessary and then bring up tethering once usb0 is enabled.

Change-Id: If3972c89e05377af00b7a71cc2588e44bd4cfaed
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-19 13:30:03 -07:00
Jake Hamby
c777ee29c8 Improve Bluetooth tethering UI usability.
- Updated hint text for BT tethering checkbox to
  "[Sharing|not sharing] this [tablet|phone]'s mobile data connection".
- Show correct hint text when user enters tethering screen.
- Show correct status after user enables tethering when Bluetooth is off.
  When BluetoothPan.setBluetoothTethering(true) is called with BT off,
  BluetoothPanProfileHandler will add a broadcast receiver to enable
  tethering after BT turns on. This happens too late to show the correct
  status when TetherSettings gets the adapter state changed event, so set
  a flag (mBluetoothEnableForTether) instead, and call setBluetoothTethering
  ourselves after the state changes to ON. Also, clear the flag if the
  adapter state changes to OFF or ERROR.
- Show correct status when user enables tethering, then disables Bluetooth,
  then returns to the tethering screen. Previously it would show
  Bluetooth tethering enabled, even though adapter state was OFF.
- Show the number of connected devices in tethering preference screen.
- Distinguish between PANU and NAP in device profiles screen, and show
  appropriate text to clarify the direction of tethering.
- Remove profiles from device profiles list when the device removes the UUID
  (e.g. Mac OS X turning NAP on/off) and after a NAP disconnection when the
  remote device only supports PANU.

Bug: 3414575
Change-Id: I2c0830876d5b9bddb293e57c4d3ca74f105911b8
2011-03-09 14:56:56 -08:00
Amith Yamasani
84a042c6e9 Move up wifi tethering settings one level.
Bug: 3249998

Remove an extra level of menu by moving the Configure Wi-Fi hotspot preference to the Tethering settings page.

Change-Id: I20b67ae1ddd7e9967c99ff6a8039799be792382f
2011-03-02 16:31:38 -08:00
Jake Hamby
436b29e68e Refactor Bluetooth settings for readability and performance.
Major refactoring of Bluetooth settings classes.
- Moved all functionality from LocalBluetoothManager into new
  LocalBluetoothAdapter and LocalBluetoothPreferences, and into
  existing classes.
- Refactored functionality from BluetoothEventRedirector into new
  BluetoothEventManager class, deleting the original version. New
  version uses a HashMap from action Strings to implementers of the
  BluetoothEventManager.Handler interface.
- Created new BluetoothDiscoveryReceiver to update shared preferences
  timestamp for Bluetooth discovery start/finish. This is the only event
  handling we need to do when the settings app is not visible, so it has
  its own receiver entry in AndroidManifest.xml. Edits are written using
  QueuedWork.singleThreadExecutor(), which BroadcastReceiver knows about
  and will wait for completion, eliminating the need for PendingResult.
- Miscellaneous cleanups to code style and logic for readability.
- Pulled some large switch statement code blocks into new methods.
- Changed all Bluetooth state references to the new BluetoothProfile
  constants.
- Changed use of deprecated Notification constructor in
  BluetoothPairingRequest to use Notification.Builder.
- Moved Utf8ByteLengthFilter helper function from BluetoothNamePreference
  into its own class, and moved test cases into the same package.
- Moved all LocalBluetoothProfileManager functionality related to
  specific profiles into new top-level classes (A2dpProfile, etc.), all
  implementing the LocalBluetoothProfile interface.
- Moved all UI-related methods from CachedBluetoothDevice into the class
  that uses the method, or into the static Utils class for shared methods.

Change-Id: I6d49b7f4ae0c7d7dcf62551ee40b51ecb5fe4f47
2011-03-01 18:44:36 -08:00
Jaikumar Ganesh
9ad703cdb9 Make BluetoothPan implement BluetoothProfile.
This makes it consistent across all other profiles.

Change-Id: I4c0694d042d7ed1b78c92ca3be38c8d543886769
2011-02-23 13:30:08 -08:00
Amith Yamasani
e419bc1bed Fix for crash in TetherSettings when monkey is running.
Bug: 3407666

onCreateView can get called on returning from another fragment. Moved the
relevant code to onCreate().

Change-Id: Icf08c18a3981051cce4eca2d07334d0a9f3c0116
2011-02-14 14:19:08 -08:00
Amith Yamasani
476d795667 NPE check in VpnSettings.
Bug: 3368545

Also fix a couple of bugs in TetherSettings:

Bug: 3090156 - view was being reused without removing from old dialog
Bug: 3368493 - preference being removed a second time

Change-Id: I8fe513d41e1f3af6994783be5ead69b6bd205711
2011-01-21 11:27:29 -08:00
Jake Hamby
3f0f998aa7 Remove Bluetooth tethering settings screen.
Remove obsolete Bluetooth tethering settings screen. BT tethering can
be turned on and off, but the connection must be initiated by the
remote device. For reverse tethering, there will be a checkbox for
that profile in the regular Bluetooth device settings screen.

Bug: 3283928
Change-Id: Ic25139f8862b305feb0381e61c24b7783fad2366
2010-12-14 13:40:10 -08:00
Amith Yamasani
72aa19d1a5 Keep the settings title as "Settings" even if launching a shortcut.
Handle clicks on Settings icon in top-left.
Also fix a bug where Tethering settings was changing the title.
2010-12-09 06:07:50 -08:00
Amith Yamasani
02cf71a591 Use PreferenceActivity and FragmentBreadCrumbs as they offer the same capabilities now.
Also fix: 2997438 and a similar bug in Tether Settings
Show + menu item for User Dictionary
2010-09-21 15:48:52 -07:00
Daisuke Miyakawa
6ebf8619d7 Fragmentize BluetoothSettings.
Add UserLeaveHintListener.java, so that the settings won't use
its implementation around Activity#onUserLeaveHint().

Also fragmentize bluetooth tethering screen.

Change-Id: Id06ae3161fbdb5854ddb7a257f464fb16ea9b089
2010-09-13 16:18:05 -07:00
Daisuke Miyakawa
9c602c4789 Fragmentize TetherSettings and WifiApSettings.
PreferenceScreen for BT tethering isn't fragmentized yet.
We'll need to do so in the near future.

Change-Id: I5a84fecaf84d55b59b6efa8151f2549ad37ca5db
2010-09-10 12:07:58 -07:00
Jaikumar Ganesh
d2bed6935f Decouple enabling of tethering with SDP record.
Change-Id: I50781bab52b28d7b3fe750fb055ffaeac5baf360
2010-09-02 12:11:06 -07:00
Danica Chang
32711b6752 bluetooth tethering
Change-Id: I8dfb1c85bb8b963d2937b8bc4a4c9f0cf641785d
2010-08-17 19:07:07 -07:00
Ben Clark
f2687380dc am 8d62eb4a: am 0008d219: Refactor to remove multiple in-loop Object[]->String[] castings
Merge commit '8d62eb4a51141f4464ba0b4c510cf0ec4198a56a'

* commit '8d62eb4a51141f4464ba0b4c510cf0ec4198a56a':
  Refactor to remove multiple in-loop Object[]->String[] castings
2010-08-17 07:51:35 -07:00
Ben Clark
0008d219a2 Refactor to remove multiple in-loop Object[]->String[] castings
(This replaces Iaa0f3b25eaadb094a4c3fb4cecbd09e0322aae33)

This change removes the need to convert Object[]->String[] for each iteration
of each of available,tethered,errored states in updateStatus()
by converting these as soon as possible.

This fix (and the code before) is strange because each of available,tethered,
errored are defined as type ArrayList<String> but
intent.getStringArrayListExtra() returns type Object[] dispite its name.
Because other calls to updateState() use String[] it seems best to do the
conversion outside this method in the Object[] case and thus avoid the
per-iteration casting in the Object[] case and the downright wasteful
per-iteration String[]->Object[]->String[] casting in the String[] input cases.

I've also removed some unused imports and an unused variable.

Change-Id: I805ef19aa9ceff7e4fc491623cdcb413ce170798
2010-07-29 20:51:31 +01:00