Commit Graph

245 Commits

Author SHA1 Message Date
Tetsuo55
32921b7361 cmsdk: Fix lint warning in string conversion
Implicitly using the default locale is a common source of bugs: Use String.format(Locale, ...) instead
http://developer.android.com/reference/java/util/Locale.html#default_locale

Change-Id: I18abb9aa545961bebcb40e3a57152617a22e284f
2016-10-16 22:56:54 -07:00
Steve Kondik
f4cd277473 cmsdk: Update performance profile descriptions
Change-Id: Ib7daffb32a74ec63d5845401b191dd30f76fa932
2016-10-13 04:13:53 -07:00
Steve Kondik
cd98e0b30b cmsdk: Rework the PerformanceManager
* Added a proper API for this thing
 * Pass objects around with necessary metadata, pre-filtered and sorted
 * Added event log and service dump
 * Simplified locking and adjusted for performance / correctness
 * Clarified/beautified code where possible
 * TODO:
   - Write profile descriptions
   - Finish the UI
   - Clean up javadocs
   - Do something with per-app profiles, maybe

Change-Id: Ie2ef84031e81a18e95dcd62392c7e6939860d933
2016-10-12 04:06:33 -07:00
Steve Kondik
c27e31ffd7 cmsdk: Add support for PartsRefresher to CMPartsPreference
* Allow CMParts to update the summary (or any detail) of a preference
   so it can be shown correctly in the UI.
 * Also some cleanup and refactoring around the parts list.

Change-Id: Idc16a7eb1a1e4170671fd068bd240b88fadfb577
2016-10-11 02:36:10 -07:00
Steve Kondik
152ef22084 Merge branch 'cm-13.0' of git://github.com/CyanogenMod/cm_platform_sdk into cm-14.0
Change-Id: I28fdf53785f1ec81f5d811c099e81acdb91e0009
2016-10-09 05:20:44 -07:00
Steve Kondik
0cee14b03c cmsdk: Start Weather service in onUnlockUser
* Otherwise we get a bunch of noise at startup

Change-Id: I40ebd0767a090171cfcb46340f132bf36c9494b5
2016-10-09 02:23:34 -07:00
Steve Kondik
009662e24e cmsdk: Re-enable use of custom AIDL generation
Change-Id: I23e18d56626032bd828484954bae5251cc3b8158
2016-10-08 13:26:42 -07:00
Steve Kondik
0452ebac72 cmsdk: Add search resources plumbing for CMParts
Change-Id: I541bbbabd81eb249b7696f23d5122b6a5f4f8f50
2016-10-08 04:22:31 -07:00
pinky@build01
2f32195b3a Automatic translation import
Change-Id: I01b303114376f6f8fe72d873d8cf3ce46ee05fd0
Ticket: -
2016-09-25 00:16:01 -07:00
Steve Kondik
2d61e0ceba cmsdk: Add constraints and behaviors for our preferences
* Add a new set of attributes which can be declared in the
   preference XML which will cause the preference to be
   removed from the hierarchy if the constraint is not met.
   Currently we can check for installed packages, system
   properties, config references, and system features.
 * CMPartsPreference is also updated to use similar logic
   based on the external XML.

Change-Id: If8fb39cd3312623e38bb3498bfb3f29ed8b444d6
2016-09-19 03:22:36 -07:00
d34d
06aec1f6f2 themes: Relabel theme dir after creation
After creating the theme directory it will be labeled as a
system_data_file.  By calling SELinux.restorecon() the directory
will be correctly labeled as a themeservice_app_data_file

Change-Id: I73a28da883a467bf8859d879dbe22962424e4a23
TICKET: NIGHTLIES-3349
2016-09-15 10:43:20 -07:00
Steve Kondik
3b6cfcc7d5 cmsdk: Move unnecessary strings out of here
* These can live in CMParts now

Change-Id: I766e902887be976b984a4db38310a1a7756c4ef3
2016-09-13 10:33:17 -07:00
Steve Kondik
683c67fdd4 cmsdk: Fix LiveDisplay
* Google changed the way TwilightService works in N, which was never
   a public API to begin with. Create a local version to avoid this
   problem in the future, which also contains the logic we expect
   and have tested extensively.

Change-Id: I11098b14fa75664ce8efbc34888c6f97e3af5ca1
2016-09-13 10:26:34 -07:00
Steve Kondik
ad90c58703 cmsdk: Mark HOTWORD_INPUT_CHANGED as a protected broadcast
Change-Id: I2511fe7e8c9c29022cc232e95747a71c5120ce57
2016-09-13 09:48:27 -07:00
Danny Baumann
fceb077b6f Don't unboundedly enqueue transition messages.
As long as the light sensor is providing values, each value change will
enqueue a transition message, which may queue up. Stop doing that and
ensure only one transition message is queued at any given time.

Change-Id: I6e9c5b265066089ff9e0cea7237c2023ed1af30c
2016-09-12 07:31:07 -07:00
Danny Baumann
a110c75eb9 Don't unboundedly enqueue transition messages.
As long as the light sensor is providing values, each value change will
enqueue a transition message, which may queue up. Stop doing that and
ensure only one transition message is queued at any given time.

Change-Id: I6e9c5b265066089ff9e0cea7237c2023ed1af30c
2016-09-12 16:18:22 +02:00
Steve Kondik
3da45e19ad cmsdk: Untangle internal vs. external dependencies
* The public SDK build is currently including AIDLs which are
   meant to be used for internal purposes only. My assumption
   is that this particular implementation was done before we
   split off an "internal" SDK, which is used by the platform itself.
 * The issue came up when adding an AIDL which has a backing
   Java data object which was not included.
 * It should be safe to simply hide this interface. All references
   to it are hidden already. It is only used for internal purposes
   and does not change the API.
 * With the internal dependencies removed from the public SDK, we
   can completely remove the reference in the makefile.

Change-Id: I0515815543feb077ee5e289b9f900e28758c6e98
2016-09-11 13:54:30 -07:00
clyde@build01
f15f366c62 Automatic translation import
Change-Id: Ia86641b028e5799beed97b40fe3f0c9326ceeacd
Ticket: -
2016-09-06 20:06:59 -07:00
Steve Kondik
fe3b9f0842 cmsdk: Reenable permissions
Change-Id: I59057f5661cd2db6c4555f4d4b855ad4a903abc9
2016-09-04 04:19:45 -07:00
Steve Kondik
197a49b2ce cmsdk: Add shared strings for lights and PG
Change-Id: I113de48c628cf702bcd23cf0df69900957483635
2016-09-03 16:33:28 -07:00
Steve Kondik
fef2bd7b49 cmsdk: Invoke aapt with custom identifier
* Now that it works on N

Change-Id: Ia0f78966745b974cd98debe633fb91330b6247c3
2016-08-31 22:27:00 -07:00
Steve Kondik
6f2edde8a7 cmsdk: Temp fixes for bringup
Change-Id: I11e7425c523081f9cc52c7d3daf56cfabfe6424f
2016-08-29 05:43:29 -07:00
Steve Kondik
d2cce2b154 cmsdk: Add reason string to PowerManager.shutdown call
Change-Id: I5f8c782514e44bbb44c1409db88de94591466fd2
2016-08-29 03:20:25 -07:00
Steve Kondik
9046c4ca64 cmsdk: Use getDataSystemDirectory
* Environment.getSystemSecureDirectory is not a thing on N

Change-Id: I00725f53a6d8f6c412cb064868b463e8dab53327
2016-08-29 02:19:51 -07:00
Steve Kondik
613ec77559 cmsdk: Move UserContentObserver from framework
* This is used by LiveDisplay, but may be useful for other purposes.
   Move it into the internal/common package instead of keeping an
   external dependency.

Change-Id: I87c0af11e19ecaea4a1a5b736fc286cd9a8ac55c
2016-08-29 02:19:50 -07:00
Steve Kondik
98a1f6101f cmsdk: Build resources with --private-symbols flag
* Manifest attribute is deprecated on N

Change-Id: I6f5bf49c99c985b6cf2a2492420ac012dbe6cd22
2016-08-29 00:50:06 -07:00
Steve Kondik
d22315e883 cmsdk: Revert custom dexopt changes
* Dexopt is no longer a thing on N.

Revert "You are now a developer!"

This reverts commit 2059ea6908.

Revert "[1/2] cmsdk: cm custom boot dexopt UI"

This reverts commit 6e5ab27fbb.

Change-Id: Ie50e8e6a77172d2b5b0659be831e7dd7a19fee04
2016-08-29 00:50:06 -07:00
pinky@build01
86879d1fa5 Automatic translation import
Change-Id: I7c1f2ebb5c41b171d3a5defff0884d08ffee2514
Ticket: -
2016-08-27 14:23:12 -07:00
Michael Bestas
2059ea6908 You are now a developer!
* Show alternative brand logo in dexopt screen
  when developer options are enabled
* Drawable by Asher

Change-Id: Ie100d7c3e9c96a7ad64c4cd65195d6f531090140
2016-08-20 18:07:38 +03:00
blinky@build01
4ceac56022 Automatic translation import
Change-Id: I6265acef6112def3cd99b9e1b24fdd7ded26c515
Ticket: -
2016-08-13 18:07:36 -07:00
Luis Vidal
c487191476 CMSDK: Broker out WeatherManagerService
Change-Id: I1a2007f626c2943ff2cf5da2ab029250efef56f8
2016-08-12 12:39:15 -07:00
Roman Birg
da1776a8a8 cmsdk: allow MANAGE_AUDIO_SESSIONS to be whitelisted
So the implementing service doesn't have to be signed with platform
keys.

Change-Id: I635d79173bf1771b58e1cb2dd333cee091610a48
Signed-off-by: Roman Birg <roman@cyngn.com>
2016-08-11 16:20:16 -07:00
Alexander Martinz
6e5ab27fbb [1/2] cmsdk: cm custom boot dexopt UI
* Pass app info and number of installed packages to boot message UI
 * Ui by Asher and Joey, based on Alexander's previous work

Change-Id: I9298d7e2b85a703921abf62f8b91157e6f88803b
Signed-off-by: Joey Rizzoli <joey@cyanogenmoditalia.it>
2016-08-10 16:52:21 -07:00
Danny Baumann
c0dd46d30f Introduce a hysteresis for outdoor condition determination.
Avoids flicker when brightness is around the threshold.

Change-Id: I8658725450496b89123abb26b6ef8ce333c709e5
2016-08-09 15:14:01 -07:00
blinky@build01
d62a53f690 Automatic translation import
Change-Id: Ic90add544c2df37224eee1b7a62946d15c328f49
Ticket: -
2016-08-08 13:42:24 -07:00
Steve Kondik
87590f0b1e cmsdk/livedisplay: Add support for picture adjustment
* Allows adjustment of hue, saturation, intensity, and contrast.

Change-Id: Icf8ff6200a07b68e09dcd7f140a82e57b53944f7
2016-08-08 12:41:27 -07:00
Steve Kondik
3e7dac120a cmhw: Add support for display mode remapping
* Simple mechanism for mapping vendor names to the
   various modes used in CM (with translations).

Change-Id: I791e6302e48f1b886dfc3228a96176d7318679d5
2016-08-04 23:56:59 -07:00
Steve Kondik
19345cb1ca livedisplay: Enable by default
* LiveDisplay is a popular feature that is widely enabled,
   so let's enable it by default.

Change-Id: I6bc0240b0a79aa6a278ac83469d5cd9d63c682d1
2016-08-04 23:51:46 -07:00
d34d
c4ed8c84cd Themes: Broker the theme service
Change-Id: I429936f63d52eddcb1653515bc94e82f758b57d6
2016-08-02 14:40:34 -07:00
Steve Kondik
4cf18a3e36 livedisplay: Tweak defaults
* Raise the outdoor threshold to 12K lux to more accurately
   represent bright sunlight.
 * Raise the night color temperature to 4800K to provide a
   soft display look at night with less red.

Change-Id: I26bdea7fc97acb2a17944a1f25e5e11866a08e29
2016-08-01 15:28:20 -07:00
Steve Kondik
7bf7c4b72e cmsdk: Allow services to conditionally start before decryption
* Essentially everything in CMSDK should remain silent when we
   are being prompted to enter a passcode for decrypting the
   device. Unfortunately, simply shutting off CMSDK entirely
   will cause crashes everywhere. We need to be somewhat
   selective about it.
 * Motivation for this was LiveDisplay kicking into night mode before
   decrypted due to location services failing.

Change-Id: I4d745debb2894776258343e8696ce5144f094404
2016-08-01 12:19:11 -07:00
inky@build01
fa227b12ed Automatic translation import
Change-Id: I00c456aff360d6e644953fb3eae8b16cc12147ad
Ticket: -
2016-07-31 19:00:52 -07:00
blinky@build01
92fdd2beb0 Automatic translation import
Change-Id: Ic16cd0e674aa927413f735ee10f07b231d8b641f
Ticket: -
2016-07-29 13:04:50 -07:00
inky@build01
544d324c82 Automatic translation import
Change-Id: Icb1bbff6a51a59f4309a40ecc7e06b4fce1b4ccf
Ticket: -
2016-07-28 12:34:47 -07:00
clyde@build01
8a3e6d3a8f Automatic translation import
Change-Id: Ibcf3f9e87a5b335ac709f7061f88144e6c16aba0
Ticket: -
2016-07-27 12:19:28 -07:00
inky@build01
7001c63425 Automatic translation import
Change-Id: Ib2786d6696fcc2ced57b50b65f9c746db342d8f5
Ticket: -
2016-07-26 11:28:05 -07:00
blinky@build01
f42db22083 Automatic translation import
Change-Id: I179df3f0aaad384a8c3ef780f7bdd26aa61a20f3
Ticket: -
2016-07-25 11:49:13 -07:00
Bharadwaj Narasimha
16f02268e8 ThemeService:Component id is being changed for multiple entries in mixnmatch.
When a theme with more that one wallpaper is installed(Hexo), when
we set the wallpaper in other themes to the second and third wallpapers
of Hexo while using mixnmatch, some other components like icons,ringtones
overlays would also change its Component_id to the corresponding Component_id
of the wallpaper changed.

Change-Id: I16a0b9a69a329308927cecbe2385f51184c8f0ee
TICKET: CYNGNOS-3220
2016-07-25 10:44:44 -07:00
Roman Birg
705716fc60 cmsdk: Broker out CMAudioService
Change-Id: Ia1205ad67d524ebf379085a6287993b8b82bc76f
Signed-off-by: Roman Birg <roman@cyngn.com>
2016-07-25 08:44:46 -07:00
Steve Kondik
86cae92291 livedisplay: Add support for direct color balance control
* We currently use the DisplayColorCalibration API for setting display
   temperature which makes a lot of guesses about what temperature
   the display really is. Some devices will support the new ColorBalance
   API (via QDCM or other mechanism), which offers a calibrated
   alternative. Add support for this, which will supercede DCC if
   available.
 * Additionally, define the available color temperature range as a
   set of overlayable values so this can be specified per-device.
   This range will be mapped to balance values using the power curve
   calculations in the new MathUtils class.

Change-Id: I99608c09807b747d962680293c7b0cee8d669003
2016-07-20 10:07:31 -07:00