aboutsummaryrefslogtreecommitdiffstats
path: root/cm/lib
Commit message (Collapse)AuthorAgeFilesLines
* cmsdk: PerformanceManager: Update POWER_HINT_SET_PROFILE valueZhao Wei Liew2017-02-191-1/+1
| | | | | | | We removed POWER_HINT_AUDIO recently, thus moving the value of POWER_HINT_SET_PROFILE up. Change-Id: Ib1c4e1b2569064023a7951631ac1de120fcf47ef
* cmsdk: cmhw: Deprecate TAP_TO_WAKE featureZhao Wei Liew2017-01-241-7/+0
| | | | | | All devices should use the native implementation now. Change-Id: Ic29472ba28569536a8556f61229a8a8fe783354a
* themes: Relabel theme dir after creationd34d2016-09-151-2/+8
| | | | | | | | | 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
* Don't unboundedly enqueue transition messages.Danny Baumann2016-09-121-0/+1
| | | | | | | | 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
* CMSDK: Broker out WeatherManagerServiceLuis Vidal2016-08-122-515/+114
| | | | Change-Id: I1a2007f626c2943ff2cf5da2ab029250efef56f8
* Introduce a hysteresis for outdoor condition determination.Danny Baumann2016-08-092-3/+11
| | | | | | Avoids flicker when brightness is around the threshold. Change-Id: I8658725450496b89123abb26b6ef8ce333c709e5
* cmsdk/livedisplay: Add support for picture adjustmentSteve Kondik2016-08-083-1/+332
| | | | | | * Allows adjustment of hue, saturation, intensity, and contrast. Change-Id: Icf8ff6200a07b68e09dcd7f140a82e57b53944f7
* cmhw: Add support for display mode remappingSteve Kondik2016-08-041-3/+46
| | | | | | | * Simple mechanism for mapping vendor names to the various modes used in CM (with translations). Change-Id: I791e6302e48f1b886dfc3228a96176d7318679d5
* Themes: Broker the theme serviced34d2016-08-024-1417/+466
| | | | Change-Id: I429936f63d52eddcb1653515bc94e82f758b57d6
* cmsdk: Allow services to conditionally start before decryptionSteve Kondik2016-08-013-2/+32
| | | | | | | | | | | | * 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
* ThemeService:Component id is being changed for multiple entries in mixnmatch.Bharadwaj Narasimha2016-07-251-0/+5
| | | | | | | | | | | 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
* cmsdk: Broker out CMAudioServiceRoman Birg2016-07-252-161/+130
| | | | | Change-Id: Ia1205ad67d524ebf379085a6287993b8b82bc76f Signed-off-by: Roman Birg <roman@cyngn.com>
* livedisplay: Add support for direct color balance controlSteve Kondik2016-07-203-6/+178
| | | | | | | | | | | | | | | * 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
* cmsdk: Create brokerablecmsystemservice concept.Adnan Begovic2016-07-013-154/+336
| | | | | | | | | Extending the BrokerableCMSystemService allows a core system service to declare a delegate provider interface that can exist in another package, either in the same or an external process. Change-Id: Idf8d170b1504528b0d3aafb23895951e26459c98
* cmsdk: Factor CMSystemServiceHelper to common.Adnan Begovic2016-07-012-7/+3
| | | | Change-Id: I3984d64210b9a1be71d075a8eb8b8a2cfebde183
* Apply active profile if user enables system profilesLuis Vidal2016-06-302-4/+80
| | | | | | | | | | | | | | | | | Ensures the active profile is applied when user enables system profiles. The profile will be automatically applied upon activation if: - No triggers are defined (i.e the profile does not respond to events) - A ON_CONNECT WiFi/BT trigger is defined and the device is currently connected to such network/device If system profiles are already enabled and a WiFi/BT event is fired, apply the profile overrides Change-Id: I362893151e52d35636d2ac05ab35e986d1f7237e TICKET: CYNGNOS-3104
* Themes: Fix applying default themed34d2016-06-201-2/+1
| | | | | | | | | ThemeUtils has method for getting the default theme package name which will return ThemeConfig.SYSTEM_DEFAULT if no default theme package is defined in CMSettings. Use this method rather than read the setting directly. Change-Id: I924f8ee116d97a8f3fcf4703214376608b31f297
* Ensures ProfileTrustAgent properly grants/revokes trust [2/2]Luis Vidal2016-06-081-17/+50
| | | | | | | | | | | | Notifies the ProfileTrustAgent when a WiFi/BT event was triggered even if no new profile was selected so the trust agent can grant/revoke trust Filters out the multiple network state change notifications to make sure we notify the trust agent only when the event that the profile is tracking actually happened Change-Id: I047861a8b145762fff24568e341373a89ee01de9 TICKET: CYNGNOS-2719
* cmsdk: LiveDisplay: Enforce dump permissionDiogo Ferreira2016-06-071-0/+2
| | | | | | Fixes android.security.cts.ServicePermissionsTest#testDumpProtected. Change-Id: I5641b42c56d9783b1edb8fb397d51040cadb1467
* Themes: Use default audibles when pkgName is emptyd34d2016-06-021-1/+1
| | | | | | | | Fixes an issue where audibles would be "unknown" causing them to not play when phone rings, notifications arive or an alarm goes off Change-Id: If279ed7e88784c025999822da7ee3a1a51d63bbd TICKET: CYNGNOS-2728
* cmsdk: Create CMSystemServer to handle our platform init.Adnan Begovic2016-05-3116-90/+270
| | | | Change-Id: I7b62978e2a284a3a1ec1ffc1d8c72545d7b0c939
* PerformanceManagerService: drop requests if system is not yet readyScott Mertz2016-05-121-0/+16
| | | | | | | | | There is a race condition between when onBootPhase(PHASE_SYSTEM_SERVICES_READY) is handled and when clients request profiles, cpu boost, or launch boost. Drop these requests in this condition. OPO-702 Change-Id: I0860f824473767a4a4776e9febc7fb786b81f457
* LLS: Fix NPE when backing service diesd34d2016-05-111-1/+1
| | | | | | | | | | The mService member variable should not be used directly as this can cause an NPE if the backing service has died. Instead, use the getServiceGuarded() method which will take care of re-establishing a connection to the backing service. Change-Id: I290e69c07a2e56644de7a394543d1e36fac1cbcc TICKET: CYNGNOS-2779
* cmsdk: Pass the process name and pid for launch boostsSteve Kondik2016-05-063-41/+67
| | | | | | | | * We need this for vendor perf tools. * This also adds a NativeHelper class which loads the JNI library on-demand, since we don't have an entry point. Change-Id: If76ad8f952e86366978ae9cf9d1f107febccc28b
* QS: Make themes a first class citizen againd34d2016-05-051-0/+42
| | | | | Change-Id: Icd397a2ddd730ae525233b66288fde9a6798c221 TICKET: CYNGNOS-2670
* cmsdk: Fix CTS Failure due to testDumpProtectedPat Erley2016-05-051-0/+2
| | | | | | | Only dump CMAudio Service State for processes with dump permissions. OPO-679 Change-Id: I28a501851a76e6d82f5726c13ac1fac74f47a8f1
* cmsdk: Add CMAudioManagerSteve Kondik2016-04-271-0/+174
| | | | | | | | | | | | | * This is a rework of the session callback API which previously lived in the framework due to JNI usage. This has been split out and cleaned up for CMSDK. * The JNI library lives on the server side, and the app-level callback has been changed to a protected broadcast. This allows us to wake up registered services when these events occur. * Additionally, we support listing all active audio sessions. * Also brings some JNI love/hate over to CMSDK. Change-Id: I31c293943474419e3db088bb7ffab75f7440ac0f
* livedisplay: Fix another transition issueSteve Kondik2016-04-261-9/+2
| | | | | | | | | | | | | | | | * If the screen is off during the entire transition period, when we turn the display back on it is not updated with the correct color temperature. * The code here is trying to be Mr. Smarty Pants and avoid extra updates, but it's totally pointless and also broken. There's no ill effects from writing to the hardware when the screen comes on, and updateColorTemperature already has all the other conditionals we need. * Just call updateColorTemperature every time, regardless. The LiveDisplayService ensures the callbacks run on the handler thread and all this crap can be removed. Change-Id: Ib9560e13870a5c6bbe9c5a26fad40f5ec1cefa83
* cmsdk: Fix crash when getting LiveDisplay configSteve Kondik2016-04-261-1/+9
| | | | | | * If capabilities is empty, BitSet.toLongArray returns an empty array. Change-Id: I17476438995b581050feda346d0348228519ff44
* livedisplay: Connect display modes to CMHWEthan Chen2016-04-251-1/+11
| | | | | REF: CRACKLING-1069 Change-Id: I5be5cabf316d9bd02ab4ffc169d458ab8d1b46d4
* livedisplay: Fix three bugsSteve Kondik2016-04-242-32/+39
| | | | | | | | | * Fix issue with color adjustments not being applied at bootup. * Fix issue where hardware was always updated twice. * Check the display state inside the color animator- this was occasionally racing and triggering kernel bugs on some devices. Change-Id: Ieb9845e6b0f1c7ca979cbfa35c0b9b688ef1a8cf
* livedisplay: Always check for transitionSteve Kondik2016-04-211-16/+14
| | | | | | | | * If the device is started in the middle of a transition period, the transition would not occur. Always check for this condition instead of only firing it when TwilightService updates. Change-Id: Ibe6cfa69506ffc6a9bf6390ee7e13863f275ec2a
* livedisplay: Bugfixes and cleanupsSteve Kondik2016-04-216-503/+585
| | | | | | | | | | | | | | | * Simplify the code and callback mechanisms * Fix bug where settings weren't applied at startup * Make stuff immutable where possible * Corrected the sunrise calculation to start on time * Fix issue where tile state could become out of sync * Don't spam the hardware on screen on/off * Stop trying to cache values in so many places, they get out of sync too easily. * Move the animator to the general display adjustments * Clean up outdoor mode state on screen toggle Change-Id: Ic14425e5294d78698b9280dfb1237b222bb706cc
* cmsdk: Fix definition of live display tile, as its now dynamic.Adnan Begovic2016-04-181-2/+2
| | | | Change-Id: I468e42b91996aad348fa0a1c85e0bc66597cf440
* livedisplay: Fix endless loop for devices that don't support outdoorDanny Baumann2016-04-151-11/+18
| | | | | | | | | | mode. There was a logic mistake that caused _all_ modes to be skipped if outdoor mode isn't supported. In order to avoid such mistakes in the future, also simplify the logic and make it more easily understandable. Change-Id: I5fe8edbb3c4d2dd05fc4b4a7f94ca05d4ecd408b
* livedisplay: Fix bad state after bootupSteve Kondik2016-04-152-18/+23
| | | | | | * Make sure all modules are updated, and clean up a little code. Change-Id: Id02ddb1558deea4451783fbe27f495d63f63c910
* livedisplay: Don't explode if no modes are availableSteve Kondik2016-04-151-5/+7
| | | | | | | * Don't create the mode observer or try to publish tiles if none of the adaptive modes are supported. Change-Id: Iee6fe8131b0614e10f35b5a03d65fb44c71c0da9
* livedisplay: Publish our own damn tile!Steve Kondik2016-04-141-2/+146
| | | | Change-Id: If765cb1fe1cbc34c857dc6237cd25a1fb27f848e
* Weather API: Delegate the responsability of rejecting back to back requests ↵Luis Vidal2016-04-131-83/+31
| | | | | | | | | | | | | | | | | | | | | | | | [1/2] The Weather Manager Service should not impose rules regarding how a weather provide service wants to react to back to back weather update requests, nor impose the time a caller should wait before a new request can be submitted. These constraints vary between weather services, so it's up the each implementation to enforce these constraints. With this patch, the Weather manager service will pass the requests as they come from the requester and it will be up to the active service provider decide whether process or reject the request. Changes to API: - Moved the request statuses to new inner class RequestStatus in CMWeatherManager - Pass status arg to onLookupCityRequestCompleted() - Added reject(int) method to ServiceRequest Change-Id: I3512490688255e25395e955d506fe42ed52f8fe0 TICKET: CYNGNOS-2430
* cmsdk: correct naming of THIRD_PARTY_KEYGUARD permd34d2016-04-131-0/+5
| | | | | Change-Id: If2d062a90db340f8415d12897b16667fc834a848 TICKET: CYNGNOS-1705
* Weather API: Return ID rather than RequestInfo [1/2]Luis Vidal2016-04-131-4/+4
| | | | | | | | | | | | | | | | | | | Instead of exposing the RequestInfo object created by the WeatherMgr return an ID to identify the request. This ID can be later used to cancel the request if needed. The WeatherProviderService base class keeps track of the ongoing requests and can map this ID to the corresponding request This patch also include the following minor changes: - Use List instead of ArrayList in API - Update javadoc to public methods to reflect API changes - Use UUID random generator in immutable classes to generate the hashcode rather than relying solely in the hashcode of the builder object. Change-Id: Ib88dd0ecddd6fdb016b77ac29709fbae092dea29 TICKET: CYNGNOS-2425 TICKET: CYNGNOS-2423
* cmsdk: Refactoring LiveDisplaySteve Kondik2016-04-136-0/+1859
| | | | | | | | | * Moving LiveDisplay to CMSDK! * Completely redesigned the feature for future expansion. * No new features in this patch, but a proper API is being designed. Change-Id: Ic8f55678f9141bf3386b2a1cf2fd1e8b3916c278
* Themes: Clear out bootanimation if pkgName emptyd34d2016-04-121-1/+1
| | | | | | | | An empty string for the package name implies the given component should be cleared out, so make sure updateBootAnim respects that. Change-Id: I07c7fc64970546c2d73a610d9c0b71f1e757657d TICKET: CRACKLING-1043
* Fix nomenclature for RequestInfo types [1/2]Luis Vidal2016-04-081-4/+4
| | | | | | | | | | - Renamed TYPE_GEO_LOCATION_REQ to TYPE_WEATHER_BY_GEO_LOCATION_REQ and TYPE_WEATHER_LOCATION_REQ to TYPE_WEATHER_BY_WEATHER_LCATION_REQ - Prevent null argument on setter methods. Documentation updated to warn user of IllegalArgumentException if null is passed Change-Id: I6ba8fb7fb3a10d8c964414b58e00d9ce77a74e84 TICKET: CYNGNOS-2377
* Refactor WeatherInfo classLuis Vidal2016-04-081-5/+6
| | | | | | | | | | | | | | | | | | | | | - Builder constructor takes now 3 args: city name, temp and temp unit. This is the minimun data that a weather service should provide when a weather update request is processed. - Float members have been changed to double. Setter/getter methods updated. - New setter/getter methods have been added to set current day high and low temp. Forecast list should be used only to provide weather forecast for upcoming days (this has been clearly documented). WeatherContract was updated to include these 2 new columns - Added javadoc to all public methods - Timestamp is not longer required in constructor. A new method setTimestamp has been added Change-Id: Ia1edcfef0e2268f3881fed076c6ad74a81ca7334 TICKET: CYNGNOS-2365 TICKET: CYNGNOS-2382 TICKET: CYNGNOS-2356 TICKET: CYNGNOS-2360
* LLS: Fix (possible) NPEMichael W2016-04-081-6/+8
| | | | | | | | | | | | getBroadcastItem is only valid if beginBroadcast is called RemoteCallbackList.java: "Retrieve an item in the active broadcast that was previously started * with {@link #beginBroadcast}" Fix logic to do so TICKET: CYNGNOS-2397 Change-Id: Iec787a088ae3999e5024776ad50143249c434084
* Add API to cancel an active weather requestLuis Vidal2016-04-071-0/+15
| | | | | | | | | | | | | | | | Add new API cancelRequest to CMWeatherManager. This will allow clients to cancel a request that was previuosly submitted to the weather service. As part of this change, requestWeatherUpdate(weatherLocation), requestWeatherUpdate(Location) and lookupCity(cityName) will now return the RequestInfo object created if the request was successfully submitted to the weather manager service TICKET: CYNGNOS-2383 TICKET: CYNGNOS-2385 Change-Id: Ic122f91e0ea8a24d81dbed48741ef1e33567b56c
* Reset timer when a new weather service provider is selectedLuis Vidal2016-04-061-0/+1
| | | | | | | | If a new weather service provider is selected, reset the timer so the newly selected provider can process the weather update requests Change-Id: I2d16000b0eb987c6d0985b465af3259a3619d8ef TICKET: CYNGNOS-2364
* Add Weather Content Provider [4/5]Luis Vidal2016-03-311-0/+545
| | | | | | | | | | | | | Introduce CM Weather Manager and Weather Provider Services API. The CM Weather Manager can be used by apps to request weather updates. The Weather Provider Services API allows a third party developer to implement a weather service to process weather update requests and update the CM Weather Content Provider data which can be consumed by any other app holding the required permission. Change-Id: Idcc80712ba92715109d3577d120f7fea85d6c996
* LLS: Don't build LlsInfo when defComponent is emptyd34d2016-03-311-1/+2
| | | | | | | | Unflattening an empty string will result in a null ComponentName which will cause an IllegalArgumentException when building the LiveLockScreenInfo. Change-Id: I0bafddb48a47ef67d9833cd12bff7eb34369425e