This allows to start protected application from the "Protected apps"
activity without re-inserting the secret code.
Change-Id: Iaf727d741ef8e302b76a566ae9cd6a5031c85079
Use the extras of the intent to determine if we are connected to a
WiFi network and, in case we are, to get the SSID. This allows to
trigger profile changes only when the status is either DISCONNECTED
or CONNECTED and it also ensures that we process each event according
to the network status that caused it rather than the current one.
Change-Id: If7598bc9502f94bb2f6f7f274538df346fbb4869
The broadcast receiver filter was missing the action to trigger the
twilight state update for the next day. Therefore the time+date when
to go day and night mode were stuck on a previous day.
BUGBASH-226
Change-Id: I2c87b738b20d5c08dffe4c20e13a990167b5a22b
The current code can override the user preference in different ways.
For instance, entering and exiting the powersaving mode will set
the balanced profile, no matter what was the user preference.
mUserProfile is now updated only when the user changes the profile
and not when the profile is changed automatically (e.g. when
enetering the powersaving mode). When mUserProfile is updated,
the value in the database is also updated, except when initialized.
This also includes the case in which the powersave mode is enabled.
Change-Id: Id88e64389ccb877ebee665d90bf081aa94537542
Allow to use the powersave profile without enabling the powersave
mode, but force the powersave profile when enabling the powersave
mode. This makes the profile a bit more useful since unlike the
the powersave mode it has no direct UX impact (e.g. animations),
yet it allows to reduce the power consumption.
Change-Id: Ie9312a51d58950b15cf54fb1cd0c2e1d7bcd36b6
Use the same base theme used for Settings so that our preference
tiles look like the default ones (e.g. add ripple effect).
Change-Id: I27a5569535d8d614a0c0d26dd5b9fcd12f2af1e4
We don't need it because we don't support using the returned cursor
directly, and it can cause deadlocks when being called from platform
code.
Change-Id: I2f85be1152569ba27e4622d310d867e20965faa3
AOSP recently introduced a new power hint, POWER_HINT_LAUNCH,
to indicate the start-up of an activity.
We now use that instead of using our own.
Change-Id: I3ed1ae52a67da37e87a46ca5cc5411de95f00926
Issue-Id: LINN-6
- We might get see attach() calls from multiple prefs, so stop assuming
there's only one per key. Namely, a new activity might be created and
attached before the previous one is destroyed
- The passed-in context is likely to be an activity one. As the manager
instance is static, this can cause leaks and the receiver might be
attached to a destroyed activity. Just hold onto the application
context instead, which is a singleton anyway.
Change-Id: Ica17c19ab6e1cdfd402968ce2594d3ed362e23ee
JIRA:LINN-3
This is used to decide whether a user wants
to long-press the power button while the display
is off to activate the torchlight.
Change-Id: I3bfaa4bf5a5452b9af2c412596c6713a151e0ec8
As per change Iaaab737f1501a97d7016d8d519ccf127ca059218 in fw/b,
we're now allowing devices to specify an array of DeviceKeyHandlers.
Add the appropriate array overlay for this.
Also, specify CMParts as a DeviceKeyHandler, since almost all devices
with touchscreen gestures will have to use it. The only exceptions
are the devices which register touchscreen gestures through the SensorManager.
Change-Id: Ie8e4901712d03ce4b2d799cf0ee5fc2e1bad6aae