Commit Graph

27 Commits

Author SHA1 Message Date
Jeff Brown
defcb0060d Update references to PowerManager constants that have moved.
Bug: 6435382
Change-Id: Ieea857644dc0cf758e0ff4fd595c6a0115457df0
2012-05-11 18:40:27 -07:00
Dianne Hackborn
7d09187e41 Use a component name that actually exists when enabling/disabling.
Change-Id: Id6422a0039060bce3dc1bdc39551f04a4e4adbe6
2012-03-05 18:37:54 -08:00
Amith Yamasani
a9125d4d59 Introduce half-brightness icon in Power Control widget.
Bug: 5358696
Change-Id: Iae484e786f4dd7a5e88078b69053f01425b79aef
2011-10-03 15:22:04 -07:00
Peter Ng
a1252ccf7b Power control widget holofied
-brightness needs to implement brightness_half_holo state
*fixed now in the patch { old assets should be removed also(any "appwidget" that doesn't have holo in it)}

Change-Id: I2c1e754f68cf321c5b3517ba92c8f235b418e696
2011-08-30 10:45:56 -07:00
Amith Yamasani
49c3ef901b Power widget - track brightness changes.
Also, don't change background data setting when changing auto-sync state.

Bug: 3030482
Change-Id: Iad19cac8375d2d38004dbe401ceaec5402e11989
2011-08-18 15:54:18 -07: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
Dianne Hackborn
4b21f7cd94 Fix issue #3062691: GPS enable bypass via com.android.settings.widget.SettingsAppWidgetProvider
Make the receiver private.  Also fix to correctly update when sync
status changes.

Change-Id: I35481bf5b473196b00427da4df49aa76f691d38b
2010-10-06 14:28:23 -07:00
Amith Yamasani
740edeaa42 Fix the indicators in the button bar. The middle ones were showing the left indicators incorrectly.
Earlier refactoring seems to have messed it up. Added a position value to the state trackers.

Bug: 2980926

Change-Id: I31df4b1ae0b835d801d67747154594299498c4cf
2010-09-27 11:20:00 -07:00
Brad Fitzpatrick
ae0ff95272 Make power control widget be more responsive. Fix StrictMode violations.
Also use new location providers changed broadcast intent, and fix a bug
introduced in Froyo where we stopped observing the SYSTEM_CLOSE_DIALOGS
intent so we fell out of sync (more often) with the sync settings.

Now even responsive during the boot I/O storm!  (except for toggling
brightness, which still does disk writes from the UI thread...)

BUG=2956025

Change-Id: I77876ff6e0be2325c15d5f08bb2970edf233f839
2010-08-27 17:11:10 -07:00
Brad Fitzpatrick
046915c4c8 Make Power Control widget a bit more responsive.
Based on a lot of timings on Sapphire.

Also, initially this CL improved the speed of Toasts, but now it just
removes the use of Toasts in the widget after eng/UX discussions with
various people.

BUG=2535155

Change-Id: I134a730f17ebee8a119b7796984f00b22e0d6120
2010-04-06 15:44:30 -07:00
Irfan Sheriff
a6a74e222a Disable tethering to enable Wifi
We need to explicitly disable wifi while enabling
tethering and disable tethering while enabling wifi

Bug: 2539071
Change-Id: I7fda6e4d9d1bb804e81561d52b5f3a982a674b0e
2010-03-25 11:39:11 -07:00
Brad Fitzpatrick
94ea6e21c3 Make the Power Control widget more responsive.
BUG=2535155

Change-Id: Id3049fa9ba850c05140d7374065717b854a5d721
2010-03-22 18:07:17 -07:00
Erik
5bc5cedc7a b/2491823 Fixed brightness toggle for phones w/o auto-brightness
Logic didn't allow a transition from max to min brightness when used on
a phone that didn't support auto-brightness.
2010-03-08 15:25:43 -08:00
Erik
5c9f9ce263 b/2278841 Added state for auto-brightness on the power widget.
Added icons and a transition step to the brightness setting on the power
widget so auto-brightness can be toggled and the widget will remain in
sync with changes made through settings.
2010-03-04 14:02:19 -08:00
Ken Shirriff
8ab15b32f4 Power Widget: don't display toast in intermediate state
If bluetooth or wifi is in an intermediate state, the widget can't modify
the state, so it shouldn't pop up a toast.
2010-02-24 12:32:38 -08:00
Mike Cleron
c151e45d8c New widgets 2009-10-27 14:05:27 -07:00
Mike Lockwood
cdf42466bf Remove PowerManager.setAutoBrightness()
We will use the System.SCREEN_BRIGHTNESS_MODE Settings value instead.

Change-Id: I1850549f513e3541b5761aae28ebc615410377de
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-10-14 21:19:04 -07:00
Ken Shirriff
d80d19996a Fix power widget brightness.
If the auto-brightness is cleared, the brightness will drop to 0, so we
need to set it again.
2009-09-29 12:40:45 -07:00
Ken Shirriff
c4a0576473 Fix power widget brightness for Sholes.
The widget must disable automatic brightness before modifying the brightness.
2009-09-28 11:17:20 -07:00
Debajit Ghosh
ae57dbd618 make power settings widget toggle sync, not background data 2009-09-16 11:29:16 -07:00
Mike Lockwood
cd03f5320d Move backlight brightness from HardwareService to PowerManager
to prevent apps from changing the hardware behind its back.
Fixes b/2041941 Lock screen flashes the screen very bright before dimming

Change-Id: Ic4faa008357fd3d74225ba90f05801c5127fd8c0
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-09-15 15:24:14 -04:00
Nick Pelly
ca564d6bda Update application for Bluetooth API change. 2009-09-08 16:24:03 -07:00
Nick Pelly
d63c011225 Bluetooth: Update Settings.apk to match BT API change.
Split BluetoothDevice into BluetoothDevice and BluetoothAdapter.

BluetoothAdapter: Represents the local BT adapter. Operations on the local
                  adapter (start a scan, etc).
BluetoothDevice: Represents a remote BT device. Operations on remote devices
                 (pair, connect, etc).
2009-08-17 17:09:44 -07:00
Ken Shirriff
e936f5b386 Add toast to settings widget.
When the settings widget updates bluetooth or wifi, display a
toast since they are slow to update.
Also fix some long lines.

bug=1918321
2009-07-07 12:28:17 -07:00
Fred Quintana
31989d7994 support for changes to the sync settings and control API 2009-06-23 15:53:24 -07:00
Ken Shirriff
17f37f788a Fix power widget bluetooth.
Starting wifi would also start bluetooth, due to a stray line.
bug=1910079
2009-06-10 16:27:19 -07:00
Ken Shirriff
03a6110b4f Implement the power-control widget.
This widget allows uses to turn on/off bluetooth, wifi, gps, and sync,
and adjust brightness without going through the settings menu.

The widget provider updates the settings when the buttons are pressed.
The widget provider is also a receiver for events indicating that the
status was updated elsewhere and the buttons need to be changed.
2009-06-08 13:57:26 -07:00