Commit Graph

131 Commits

Author SHA1 Message Date
LuK1337
2976ea9c7b lineage-sdk: Switch to ColorDisplayManager
* ColorDisplayController is dead

Change-Id: I9b5fdc3546bea7aabd65877c1862d9eaebbd4af3
2019-09-09 07:35:36 +02:00
Sam Mortimer
e8814c5f0b lineage-sdk: Run bpfix on our Android.bp files
In particular, fixes packages/LineageSettingsProvider/tests/Android.bp
which otherwise results in errors about unknown properties tags
and instrumentation_for.

Change-Id: I1d44fce77765a77ed6f3c23763f439a216eaefda
2019-09-09 07:32:54 +02:00
Paul Keith
eb05519d5d sdk: Remove lineagehw compat
Change-Id: I329a74b5e489cc39d183697c25bb9771ae5afd82
2019-09-06 00:38:33 +02:00
Michael Bestas
9b69fd9c0c Automatic translation import
Change-Id: Iaab92105e9b37bcf015ba07362cc6fbd14047d8a
2019-08-25 20:36:37 +02:00
dianlujitao
63a590625c LiveDisplayService: Notify SystemUI after initialization finished
Change-Id: Id01eeee3bdfc599bdc20a5779db3d002fa4bc1c9
2019-08-20 17:17:28 +02:00
dianlujitao
36a87acd92 OutdoorModeController: Unconditionally enable auto mode on HWC2
* On HWC2, setting "Display mode" to "Automatic" and disabling
   "Automatic outdoor mode" at the same time makes no difference with
   setting "Display mode" to "Off" alone. Obviously this is redundant
   and could confuse the user, so simply ignore the "Automatic outdoor
   mode" setting on HWC2 to reduce redundancy.

Change-Id: I6858571a6b9ded3540fd3d936499878f57a7b3d4
2019-08-20 17:17:28 +02:00
dianlujitao
73fdcd14ac OutdoorModeController: Advertise MODE_AUTO
* This capability is set by ColorTemperatureController on HWC1 which is
   not used on HWC2, but it controls whether to enable automatic outdoor
   mode, thus advertise it here.
 * Set the default mode back to MODE_AUTO.

Change-Id: I2061cdb9ca5991e60dc9c4b3d566dd811c3c8936
2019-08-20 17:17:28 +02:00
dianlujitao
0f5f0e25ca LiveDisplayService: Properly disable ColorTemperature
This reverts commit f781a9399a.

 * Twilight tracker and display mode are still used by
   ColorTemperatureController

Change-Id: Icaf2a93befd56478eb2307d6f25da49c7c3fd73f
2019-08-20 17:17:28 +02:00
Michael Bestas
10e0e87158 Automatic translation import
Change-Id: I0aeca2cb7c42a517b92b6d6cae3856572b210a63
2019-08-04 16:22:27 +03:00
Michael Bestas
6068c7d3a4 Automatic translation import
Change-Id: Ic88e1f4ea4e44cfdd74ffb9f0e0c8cb678a09b5b
2019-07-06 11:57:32 +03:00
Michael W
9a2567bf78 Trust: Onboarding: Listen for locale changes
* When SuW is not yet done, the notification is already posted
* This results in an english notification text when the SuW is finished
  because the notification doesn't update when the locale changes
-> Listen for locale changes and post the notification again (= update)

Change-Id: I920a52c5c85c91adb7333a20d410a5464e80a812
2019-06-26 23:20:52 +02:00
Michael Bestas
f3b2904187 Automatic translation import
Change-Id: Idf93ba1c852729a0f138d2ce8c41bf5027db5cfc
2019-06-19 21:19:55 +03:00
Michael Bestas
1c52f374a4 Automatic translation import
Change-Id: I2d6ab8ea3d829b91c1d147f2efe9249f7a6cd04b
2019-06-08 18:56:59 +03:00
Bruno Martins
f781a9399a LiveDisplayService: Disable ColorTemperature when NightDisplay is available
* Having decided to use AOSP's night display feature in favor
   of our equivalent implementation, then we should take care of getting
   the latter completely disabled. Not only it can happen that a user was
   likely using it and enabling night display will now cause color
   transformation matrices to be applied twice, but also because there
   are resources being used for nothing.

Change-Id: I4ba7f643bf9e3d3b9bda17102b41668644e22ba1
2019-06-05 00:50:11 +02:00
Paul Keith
70f6d6b61e sdk: Change night/day mode transition behavior
* Update 2x a minute rather than 1x a minute as a result of dropping
  TWILIGHT_ADJUSTMENT_TIME from 1hr to 30min in an earlier change
* Use an AccelerateDecelerateInterpolator for transitioning from day
  to night mode and back to make the transition smoother for the user
* Update copyright while we're at it

Change-Id: I438f265c6cd9a2487b75744beccaf2bbac21b36e
2019-05-14 04:12:54 +02:00
Michael Bestas
952ef00123 Automatic translation import
Change-Id: I9a0517fe270f0b6f37b22bf2cc3ab9974e3fcdd1
2019-04-07 21:57:39 +03:00
Michael W
13e33b7116 Automatic translation import
Change-Id: If43774499b4bbea34c504b1a86ee4c2a1d09fc75
2019-03-11 17:21:03 +01:00
Michael Bestas
7c58c4c5fa Automatic translation import
Change-Id: Ia4b2bbf6b93883e87ed88d2d0acde820dfea3698
2019-02-26 19:00:28 +02:00
Paul Keith
c9f1d6744f sdk: Cleanup usage of List.toArray(T[] a)
* The parameter here only has to have the type you want it to return,
  so creating an array of size > 0 is unnecessary and wasteful

Change-Id: I28e490fb6fa3703d7edca21b29d640105072947b
2019-02-17 23:31:00 +01:00
Paul Keith
d6a273df74 sdk: LineageHardwareService: Add fallback to HWC2
* We can't talk to DisplayTransformManager in C++, so
  we must have a fallback in the SDK itself for HWC2
* While we're at it, fix the size of the int array created
  in getDisplayColorCalibration() to be 5 rather than 6

Change-Id: Ic524f7d60ae1585efed3fba676cf3301dcaecd7f
2019-02-08 07:16:42 -06:00
Joey
0cf297348d sdk: add Trust usb restrictor
Change-Id: I8ba443606e83fcfc6f23e62f434f10f25eb69e1b
Signed-off-by: Joey <joey@lineageos.org>
2019-02-04 20:48:15 +01:00
dianlujitao
d853f892aa PerformanceManager: Allow wait for MPCTL to start on boot
* For devices using Qualcomm MPCTL interface as power profile backend,
   setting the user's profile preference fails on boot, because we call
   perf_lock_acq before MPCTL is ready.
 * To fix the issue, add an option to wait for MPCTL service to start
   before setting stored power profile.
 * We should not only wait for the service to start but also post boot
   parsed property to be set, because MPCTL service won't actually
   initialize if the property is not set to 1.

Change-Id: Ib749c3eb548dad0ab24868ee0048247a0b80dd6a
2019-02-04 19:32:01 +01:00
Bruno Martins
a7d159461d LiveDisplayService: Catch NPE before LiveDisplayConfig is initialized
* During boot up phase the system is trying to update
   LiveDisplay tile status based on the applied mode.
   However, with LiveDisplayConfig not yet initialized this results
   in a NullPointerException. Address it and fallback to MODE_OFF.

Change-Id: I736da21455e74801aae69e16b9e80c8985b83a5a
2019-02-04 19:31:43 +01:00
Luca Stefani
dc5d872a2f LineageAudioService: Make audio session broadcast explicit
Change-Id: Ia6a2a2a9840912e1a4317e11229ca5dc69bd376a
2019-02-04 18:50:51 +01:00
Paul Keith
b49ed55600 sdk: Add HIDL compat in LineageHardwareManager
* While we're at it, hide the use of getSupportedFeatures(),
  since it only works for lineagehw java features, not hidl
* Cleanup some minor styling/organization issues

Change-Id: I905010bc7c6d7d8578eeca501be23f665127aa27
2019-02-04 14:43:29 +01:00
Paul Keith
7368c8e988 sdk: Deprecate some unused lineagehw features
* DISPLAY_GAMMA_CALIBRATION
* LONG_TERM_ORBITS
* SERIAL_NUMBER
* While we're at it, cleanup tests for removal of other features too

Change-Id: I1a572cf3bcc5298d208a3dc234f9d82da1105bf0
2019-02-04 14:43:29 +01:00
Han Wang
7dfc51aee4 sdk: Trust: Return TRUST_FEATURE_LEVEL_BAD on encryption inactive
* Prepare to change the logic in Trust frontend.

Change-Id: I8fafdc891bdc17eb92fbfe4be33ed2cd074bad74
2019-01-21 15:55:27 +01:00
Paul Keith
a7d4dff902 sdk: Split TWILIGHT_ADJUSTMENT_TIME in half
* The difference between civil and actual sun{rise,set}
  is 6 degrees of movement of the Sun in its path in
  the sky, astronomically speaking
* Since the Sun "travels" at 15 degrees/hr in the sky,
  that means the difference between civil and actual sun{rise,set}
  is about 24 minutes, temporally speaking
* In order to more closely match that temporal difference,
  the TWILIGHT_ADJUSTMENT_TIME should be about 30 minutes

Change-Id: I30a600c71ce5dd01fcb96fb4f5108f45fa493b0c
2019-01-19 05:24:14 +01:00
Paul Keith
bd9f127ef8 sdk: Stop using lerp for night/day mode transitions
* This makes it clear what the desired behavior is
* In order to make the logic more clear, also start
  scaling into night mode before civil sunset so that
  we finish by civil sunset -- this makes sure that
  by the time there's no light out for practical
  purposes, we are in night mode
* While we're at it, add a few comments about what
  each return is supposed to do, for the future

Change-Id: I4ec0f8eec6b0129a37e99f9e3a2b3f124aeeb4f2
2019-01-18 23:33:21 +01:00
Wang Han
0b12914dbf Revert "[3/3] cmsdk: add burnIn protection setting"
* Our overlay name now confuses people as Google introduced a screen
  burnin protection feature for ambient mode in Oreo. Just re-use AOSP
  one and kill this.

This reverts commit 088ddf5aaf.

Change-Id: Ia76b28444cd7b117559062fbd8230602962616b2
2019-01-18 16:47:09 +01:00
Michael Bestas
bbc2643632 Automatic translation import
Change-Id: I0256f07ce9acdc90e9cd4b25c6c28608cd6cade8
2019-01-12 20:02:23 +02:00
Steve Kondik
eaf833a4e4 lineage-sdk: Start Weather service in onUnlockUser.
After reboot the active WeatherProvider is started (onBootPhase)
  too early, resulting in WeatherProvider not syncing anymore.

  Start the active Provider when userland apps are ready to fix this,
  like on 14.1:
  0cee14b03c

  Found by meiser@xda

  lineage-15.1 ready Weatherproviders for testing:
  https://github.com/nvertigo/android_vendor_nlos/tree/nlos-15.1/weatherproviders

Change-Id: I8d3eb7aacaf265c55d5d0b5157731e04068a7c7d
2019-01-06 05:09:41 +01:00
dianlujitao
0c66c31d1f ProfileManager: Don't start before decrypted
* WiFi service is not considered as a core service so it won't start in
   min framework, but ProfileManager accesses to WiFi service's API.
   This would lead to a fatal exception and trigger RescueParty.
 * We don't really need ProfileManager during such early stage, so
   simply disable it to avoid invoking WifiManager.

Change-Id: I2c66217599e0062eaff2e5f4e86ebc092d4a41d5
2018-12-08 11:47:58 -06:00
Sam Mortimer
11c1619fed lineage-sdk: Use AOSP permission CHANGE_OVERLAY_PACKAGES for styles
*) Replace lineageos.permission.CHANGE_STYLE with
   AOSP android.permission.CHANGE_OVERLAY_PACKAGES.

Change-Id: I2dfb339688795ad5a7ae70d8d60a7dc51bbdb4cb
2018-11-10 11:01:03 -08:00
LuK1337
7702fb29a8 sdk: Don't clear calling identify when calling IOverlayManager.setEnabled()
* Since changing overlays is now guarded with enforceCallingPermission()
  instead of enforceCallingOrSelfPermission() we can no longer call
  setEnabled() after resetting our identify.

Change-Id: I25df30d0ba83f15ca1124d6fc6f79d3465d052f2
2018-11-09 17:04:10 -08:00
Sam Mortimer
9f0adb656e lineage-sdk: Make styles init at system services ready
*) On pie, lineage system server is starting before
   overlay manager service so mOverlay was being
   initialized with null (and crashing).

*) Change to only attempt to get service handles after
   boot phase system services ready.

Change-Id: I4965ce6015275a421e2e3864e66e77b8c15477f0
2018-10-24 11:11:51 -07:00
Nvertigo
3106747fdc sdk: resources: Fix lights related comments
Change-Id: I181621e4f9388ec398a79758eb96fd8c4ac08273
2018-10-22 02:03:41 +02:00
Giuseppe Barillari
055065c16f lineage-sdk: Default config_deviceHardware{Wake}Keys to 64
* New devices don't have hardware navigation buttons

Change-Id: I989ec6f7f07fd746c24b3eecb527412e3c5ec0e0
Signed-off-by: Giuseppe Barillari <joe2k01dev@gmail.com>
2018-09-28 00:44:19 +02:00
Luca Stefani
95285d122f Make livedisplay off drawable look-alike day
* The magic is in the background now!

Change-Id: I7046643c8a1a36b29cf9718e36515a0b45891c6b
2018-09-05 10:37:46 +02:00
Luca Stefani
432de0df67 Fix LiveDisplay drawable off color
Change-Id: Id5800609a6264e214e6419fea2eecb6e8e4902d1
2018-09-05 10:37:32 +02:00
Rashed Abdel-Tawab
703249ae8d lineage-sdk: Android.mk -> Android.bp
Change-Id: Iac2bd318e7ceb6b96e30d26832d98b7b2726cd5b
2018-08-30 02:31:18 +02:00
LuK1337
25c4fbbe52 lineage-sdk: Don't rely on EXTRA_WIFI_INFO when getting current SSID
* Nothing sets it anymore therefore it's always null.

Change-Id: I852e03acfd6fce9f51437cf5ad22b687ef1f083f
2018-08-29 09:19:30 +02:00
Bruno Martins
1349d295fc StyleInterfaceService: Adapt to new PackageInfo API
Required after e7334975bb (diff-4264e02219a4057f56cc84a0d169539dL401)

Change-Id: Ic2e65602308201566a47a4169317b6a9ea0b523d
2018-08-21 22:07:16 +02:00
Sam Mortimer
5859513f89 lineage-sdk: Use java.utils.Objects instead of libcore.util.Objects
Most methods in libcore.util.Objects have been deprecated:
44b7f98da7

Change-Id: I91bdd0c9756da153f167c80fe6d85fea7717a5da
2018-08-21 22:06:42 +02:00
Sam Mortimer
1b011d4a52 lineage-sdk: ServiceType moved from BatterySaverPolicy to PowerManager
Change-Id: I173dc43df20286d82b7e8dccb33bc8cb58d66fb6
2018-08-21 22:06:09 +02:00
Sam Mortimer
6cf6ab3c9b lineage-sdk: Add libnativehelper includes
Change-Id: I349d0d5b589bba0d690e2818ce053b4974de375f
2018-08-21 13:30:25 +01:00
Sam Mortimer
283ab86554 lineage-sdk: Set LOCAL_PRIVATE_PLATFORM_APIS := true
Change-Id: I06b9374ccee78550fcc26d876a9e4ea50198bbfe
2018-08-21 13:36:14 +02:00
Michael Bestas
97ea255ee0 Automatic translation import
Change-Id: I9f372825afbc8586bed6725631946c84b3d893b1
2018-08-19 19:22:09 +02:00
Paul Keith
505580e2dd sdk: Rework reading mode API
* The current API makes no sense, and doesn't really
  fit with how the other boolean features work
* While we're at it, place AutoContrast properly

Change-Id: I81d7805411c281e435c7451c0b62689711dbb323
2018-08-08 19:38:32 +02:00
Michael Bestas
39986a0a65 Automatic translation import
Change-Id: I6f79248cd97a10a576469b03d2752578efead469
2018-08-05 17:33:51 +03:00