Rework profile handling to address the following issues:
- When app specific profiles are enabled, the perf service silently
changes the profile to BALANCED when the user revisits settings.
The service and Settings UI still show whatever pref the user had
selected. The user is now unable to change the setting to BALANCED.
The perf service ignores the change because the current profile
(selected by app profiles) did not change.
- When low power mode (battery saver) activates or deactivates, the
user selected profile is overwritten.
All runtime decisions regarding active profiles have been consolidated
in to a single applyProfile() function that handles low power mode,
user and app-specific profile rules.
App specific profiles are applied only if the power profile is
BALANCED.
setPowerProfileInternal has been changed to save the user pref even if
the active pref is unchanged.
Fixes SAMBAR-1088
Change-Id: Iac658959130f08452f5e41ce3339fe4603ac474e
Added in custom Resolver to handle providing suggestions.
Added in Service to handle providing suggestions to custom resolver.
Added in ability to provider suggestions through a Proxy to another
application which must be installed during compile time if one is
to be used. This is a similar implementation to how the Location
Services work.
Change-Id: Id960260596b7bb6485caa1e1d07744e387a4c6e9
* Add support for reading and writing values from/to persistent
storage. Requires the MANAGE_PERSISTENT_STORAGE permission, which
should not be available for general use by applications.
Change-Id: I8a793396d207f23fcda851c172372f2073778eec
- Add ACTION_HOTWORD_INPUT_CHANGED broadcast action and related extras.
- Add getCurrentHotwordPackageName() API to SettingsManager to query the
current package name of the application that controls the HOTWORD
input.
- Rename SettingsManager to PartnerInterface.
Change-Id: I5987499cd32908c47a7e8e95d644c483dc32914c
We cannot create a new WindowManagerPolicy every time since the method
isn't called from the main thread every time, which could lead to
exceptions being thrown when trying to create PhoneWindowManager.
Instead of creating a new policy, bind to the keyguard service on bind,
and then pass it to the profile to operate on.
Ref: NIGHTLIES-1640
Change-Id: I3ac58bfa534755eaa73890cc5ddf05987a7d0d8c
Signed-off-by: Roman Birg <roman@cyngn.com>
- Add a new permission cyanogenmod.permission.MODIFY_SOUND_SETTINGS.
- Only allowed when the caller holds
cyanogenmod.permission.MODIFY_SOUND_SETTINGS.
- Allows the user to set zen mode to the off, priority interruptions
only, or no interruptions modes.
- For each mode change, the end condition will be set to null so that
the mode remains active indefinitely.
Change-Id: Id465509a8cc8d98953bf8cbe06cacff02b9f75a0
Add new APIs for changing a subset of system settings.
Protected by cyanogenmod.permission.MODIFY_NETWORK_SETTINGS:
- Add ability to toggle airplane mode on/off.
- Add ability to toggle mobile data on/off.
Protected by android.permission.REBOOT:
- Add ability to shutdown or reboot the device.
Change-Id: I5e943be11260c58afa664f1702c0ecb4413528fe
If a new listener is created, then notified all custom tiles that was previously registered
Change-Id: I9e8d9a1fa84d54b00ea7fd8ed400e172f17f06cc
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Saved the context passed to CustomTile.Builder in other to differenciate from the context
used to publish the tile. This allow to load resources (icons) from other packages
Change-Id: I8e40bc59a66f371f3a02f0182e25c6e9eca73c63
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
org.cyanogenmod.platform-res provides resources that,
if public, are globally accessible.
This allows us to declare public and internal permissions as
well as reference permissions declared by the android framework
core
Change-Id: Ia7d541f4b403585f7479ecd87895987b8471005b