-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
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
Earlier refactoring seems to have messed it up. Added a position value to the state trackers.
Bug: 2980926
Change-Id: I31df4b1ae0b835d801d67747154594299498c4cf
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
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
We need to explicitly disable wifi while enabling
tethering and disable tethering while enabling wifi
Bug: 2539071
Change-Id: I7fda6e4d9d1bb804e81561d52b5f3a982a674b0e
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.
We will use the System.SCREEN_BRIGHTNESS_MODE Settings value instead.
Change-Id: I1850549f513e3541b5761aae28ebc615410377de
Signed-off-by: Mike Lockwood <lockwood@android.com>
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>
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).
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.