-From 5a6ebcc56f3a8058eaba8db9f50da231a72f6e0d Mon Sep 17 00:00:00 2001
+From 8ec642197731c5f396ffdac5f523ba7a1ea876f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?M=C3=A5rten=20Kongstad?= <marten.kongstad@sonymobile.com>
Date: Tue, 15 Dec 2015 16:08:31 +0100
-Subject: [PATCH 01/39] OMS7-N: Support tagging resources as OK to overlay
+Subject: [PATCH 01/40] OMS7-N: Support tagging resources as OK to overlay
[1/11]
This will allow applications to have a resource xml defining what
-From 57ad0e2134adbb7ea094ca5b6d9398670fcacabf Mon Sep 17 00:00:00 2001
+From 9f48ca24be13dcffc0499cbfc4cf081fffa9ae21 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?M=C3=A5rten=20Kongstad?= <marten.kongstad@sonymobile.com>
Date: Tue, 15 Dec 2015 16:40:23 +0100
-Subject: [PATCH 02/39] OMS7-N: Introduce the OverlayManagerService [2/11]
+Subject: [PATCH 02/40] OMS7-N: Introduce the OverlayManagerService [2/11]
Add a new system service to manage Runtime Resource Overlays. This will
offload the PackageManagerService and allow administration of overlay
-From fe60d2c99dc5f63cff87a87f43284b4f1d3d59b5 Mon Sep 17 00:00:00 2001
+From c3f749bbe6d5f55ea88683f90e44ae91fd3bde3e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?M=C3=A5rten=20Kongstad?= <marten.kongstad@sonymobile.com>
Date: Thu, 2 Jun 2016 09:35:31 +0200
-Subject: [PATCH 03/39] OMS7-N: Integrate OverlayManagerService into framework
+Subject: [PATCH 03/40] OMS7-N: Integrate OverlayManagerService into framework
[3/11]
Hand over ownership of overlays to OverlayManagerService.
-From 2172f81b4862bb3f1af16e10ee2820225e58d853 Mon Sep 17 00:00:00 2001
+From eda195a2af67f25eb16d3c664633493442222219 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?M=C3=A5rten=20Kongstad?= <marten.kongstad@sonymobile.com>
Date: Mon, 25 Apr 2016 16:29:22 +0200
-Subject: [PATCH 04/39] OMS7-N: Set EXTRA_REPLACING correctly in
+Subject: [PATCH 04/40] OMS7-N: Set EXTRA_REPLACING correctly in
ACTION_PACKAGE_ADDED [4/11]
When broadcasting ACTION_PACKAGE_ADDED the recipients of the Intent are
-From 83d2b712ec875220cd540b606006923c317074d8 Mon Sep 17 00:00:00 2001
+From 290b23e104c7b734a14681014a49e1c9e3ad7778 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?M=C3=A5rten=20Kongstad?= <marten.kongstad@sonymobile.com>
Date: Mon, 29 Feb 2016 14:12:35 +0100
-Subject: [PATCH 05/39] OMS7-N: idmap: suppress print for padded resources
+Subject: [PATCH 05/40] OMS7-N: idmap: suppress print for padded resources
[5/11]
Change-Id: I565ccf515068b96927e4317cc9c06543415bb324
-From a279b95644ca149e43a27e5ddce3442f21ab3cd8 Mon Sep 17 00:00:00 2001
+From 76209755d9e6c75216f3eaa6de10cabfa049e1c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?M=C3=A5rten=20Kongstad?= <marten.kongstad@sonymobile.com>
Date: Thu, 2 Jun 2016 09:34:36 +0200
-Subject: [PATCH 06/39] OMS7-N: Fix memory leak during idmap creation [6/11]
+Subject: [PATCH 06/40] OMS7-N: Fix memory leak during idmap creation [6/11]
Plug a memory leak in AssetManager::createIdmap.
-From 87dcc16198c2e09da5437a71764d2887ce54d577 Mon Sep 17 00:00:00 2001
+From b7d55a41e4678d890001446a92dfa963a2f47df7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?M=C3=A5rten=20Kongstad?= <marten.kongstad@sonymobile.com>
Date: Thu, 2 Jun 2016 09:35:09 +0200
-Subject: [PATCH 07/39] OMS7-N: installd: add command 'rmidmap' [7/11]
+Subject: [PATCH 07/40] OMS7-N: installd: add command 'rmidmap' [7/11]
Add an installd command to remove an idmap file. This is the inverse of
the 'idmap' command and is intended for clean-up once an idmap file is
-From 6e017f0b65c0d8287cb0cc04648531d0c610ba0c Mon Sep 17 00:00:00 2001
+From cde3cafcd896c58711efd66a5d91c05119ff8288 Mon Sep 17 00:00:00 2001
From: Josh Guilfoyle <Josh.Guilfoyle@T-Mobile.com>
Date: Wed, 26 Jan 2011 23:28:43 -0800
-Subject: [PATCH 08/39] OMS7-N: Disable Zygote preloaded drawables [8/11]
+Subject: [PATCH 08/40] OMS7-N: Disable Zygote preloaded drawables [8/11]
With a theme applied, most of these preloaded drawables go unused. Any
assets the theme has redirected will need to be loaded with each app
-From 3960a5b5d023fb9dbe06e468050ef34ebda41989 Mon Sep 17 00:00:00 2001
+From 679100e3ccf934ccf50994f8c833a43934056790 Mon Sep 17 00:00:00 2001
From: Nicholas Chum <nicholaschum@gmail.com>
Date: Sun, 19 Jun 2016 10:37:13 -0400
-Subject: [PATCH 09/39] OMS7-N: Persistence on boot through
+Subject: [PATCH 09/40] OMS7-N: Persistence on boot through
OverlayManagerServiceImpl [9/11]
Overlays should not be enforced by the traditional OverlayManagerService
-From 058ff6ae94fad5dd1e61cdfd33990c543998d3c7 Mon Sep 17 00:00:00 2001
+From 595840d45464a097bb2d83844397f7f129c30814 Mon Sep 17 00:00:00 2001
From: Nicholas Chum <nicholaschum@gmail.com>
Date: Thu, 27 Oct 2016 07:08:00 +0200
-Subject: [PATCH 10/39] OMS7-N: Do not enforce code policy limiting overlay
+Subject: [PATCH 10/40] OMS7-N: Do not enforce code policy limiting overlay
installation [10/11]
Change-Id: Iea317f3771f25dbfcbf4938e88cace12fd97d7eb
-From 6f9205eb853edb1207387f70740422d1a2c77ec6 Mon Sep 17 00:00:00 2001
+From 8c94efa1ae13cac3f44dcf6d02cf8a0efc965ddd Mon Sep 17 00:00:00 2001
From: Jacob McSwain <jacob.a.mcswain@gmail.com>
Date: Sun, 26 Jun 2016 15:21:52 -0500
-Subject: [PATCH 11/39] OMS7-N: Implement multi-target enable/disable and
+Subject: [PATCH 11/40] OMS7-N: Implement multi-target enable/disable and
disable-all [11/11]
Just use the enable option like normal, but you can add more arguments
-From 98990788c5ba17c772933302bb1cf3dd0877f78a Mon Sep 17 00:00:00 2001
+From c086844eb59eabeaf5197d8216d210703b506290 Mon Sep 17 00:00:00 2001
From: Dave Kover <dkover@cyngn.com>
Date: Fri, 9 Dec 2016 10:47:17 -0700
-Subject: [PATCH 12/39] Themes: Expose resolver hardcoded colors
+Subject: [PATCH 12/40] Themes: Expose resolver hardcoded colors
commit dbbd5e70cc65002df41561474b03362022dd6716
Author: Dave Kover <dkover@cyngn.com>
-From a7aed42d9fcaefe2d9a7432b18d164727d008f9d Mon Sep 17 00:00:00 2001
+From 8b80415322b8b55009cab0568f7bcc3e2a9bb43e Mon Sep 17 00:00:00 2001
From: Nicholas Chum <nicholaschum@gmail.com>
Date: Tue, 17 Nov 2015 18:57:11 -0500
-Subject: [PATCH 13/39] Themes: Allow Immersive cling colors to be fully themed
+Subject: [PATCH 13/40] Themes: Allow Immersive cling colors to be fully themed
This allows the immersive mode help tooltip to be themed completely by
removing hardcoded framework calls. Let the themer decide what they want
-From 6b3804b029990fb331b8f229d4a09001317df451 Mon Sep 17 00:00:00 2001
+From 9bd42cd643e8b234c6da0c477476043bc2477835 Mon Sep 17 00:00:00 2001
From: Nicholas Chum <nicholaschum@gmail.com>
Date: Mon, 23 Nov 2015 23:49:15 -0500
-Subject: [PATCH 14/39] Themes: Allow Permission Icons to be fully themed
+Subject: [PATCH 14/40] Themes: Allow Permission Icons to be fully themed
This removes the forced @android:color/black tint on the permission
icons during app sideload through PackageInstaller.
-From f27876a051e7780aa031ce39b8890b83dd55c7ea Mon Sep 17 00:00:00 2001
+From cadf382538a6ab1c3a0149b2460c79115ad0748a Mon Sep 17 00:00:00 2001
From: Dave Kover <dkover@cyngn.com>
Date: Thu, 14 Apr 2016 10:19:13 +0700
-Subject: [PATCH 15/39] Themes: Allow Navbar ripple color to be themed
+Subject: [PATCH 15/40] Themes: Allow Navbar ripple color to be themed
PS1:
Layers Commit by @setiawanjimmy
-From 3258af269036de4cba47b317b02a7abc4b5c272d Mon Sep 17 00:00:00 2001
+From 29fdbe93da356125fd366bfe959e329672631306 Mon Sep 17 00:00:00 2001
From: Ivan Iskandar <iiiiskandar14@gmail.com>
Date: Sun, 18 Sep 2016 21:33:18 +0700
-Subject: [PATCH 16/39] SystemUI: Expose QS edit item decoration background
+Subject: [PATCH 16/40] SystemUI: Expose QS edit item decoration background
color
PS2:
-From 620674d634933b1b64c66977e05418ddd4aeecc0 Mon Sep 17 00:00:00 2001
+From 45d7526ebb6cec986e2896c8af6c0c45aecf6aa2 Mon Sep 17 00:00:00 2001
From: Simao Gomes Viana <xdevs23@outlook.com>
Date: Fri, 25 Nov 2016 20:50:29 +0100
-Subject: [PATCH 17/39] Allow custom alpha for notification shade bg color
+Subject: [PATCH 17/40] Allow custom alpha for notification shade bg color
Change-Id: If621df83d994feae0448a734408ba85ac8329325
---
-From 8e466672155f4f6724582f96eae445abfacdf03d Mon Sep 17 00:00:00 2001
+From 3c836ef5495743af6c24b61ebdea5b15f8273f75 Mon Sep 17 00:00:00 2001
From: "Niklas Schnettler (Sh4dowSoul)" <niklas.schnettler@gmail.com>
Date: Wed, 5 Oct 2016 18:07:43 +0200
-Subject: [PATCH 18/39] Themes: Expose various QuickSettings text colors
+Subject: [PATCH 18/40] Themes: Expose various QuickSettings text colors
Change-Id: Iaea71ca83afbc3d8cc6faea6afac16cabb46cfff
---
-From 46949d05c49d62ef006ba386cd392476470e4a21 Mon Sep 17 00:00:00 2001
+From bf2044e55915493ff96d3eb22be886cfc0884ca9 Mon Sep 17 00:00:00 2001
From: Nicholas Chum <nicholaschum@gmail.com>
Date: Sat, 27 Aug 2016 10:56:46 -0400
-Subject: [PATCH 19/39] Notifications: Expose a bool to disable dynamic colors
+Subject: [PATCH 19/40] Notifications: Expose a bool to disable dynamic colors
This commit allows a themer to overlay a boolean value in config.xml to
disable dynamic colors applied to the app title and app icon of each
-From be16740d88348db2f2842f1908cb7421d73dd625 Mon Sep 17 00:00:00 2001
+From 09b2f321170895b4e6f4e88f5a1c7c84a50fcf7a Mon Sep 17 00:00:00 2001
From: George G <kreach3r@users.noreply.github.com>
Date: Mon, 14 Nov 2016 14:49:47 +0200
-Subject: [PATCH 20/39] Notification dynamic colors bool compatible with OMS7
+Subject: [PATCH 20/40] Notification dynamic colors bool compatible with OMS7
OMS7 introduced this fine piece of code: https://github.com/SubstratumResources/platform_frameworks_base/blob/n-oms7/core/java/android/app/ResourcesManager.java#L897..#L904
-From 90b82c97a3d0796292f1af8b1160bf2380caadae Mon Sep 17 00:00:00 2001
+From 72155ae90df8ca1a97cc567aa9525081f50f0365 Mon Sep 17 00:00:00 2001
From: Daniel Koman <dankoman30@gmail.com>
Date: Fri, 17 Apr 2015 11:56:28 -0600
-Subject: [PATCH 21/39] Allow prevention of doze notification color inversion
+Subject: [PATCH 21/40] Allow prevention of doze notification color inversion
Removed empty newline at the end -- KreAch3R
Removed slims files for aosp roms -- Bgill55
-From 639ec4b53d5e45a3af2570b1358b66b2b532a404 Mon Sep 17 00:00:00 2001
+From 14ef7ee72178546fde1cff851828dafd3a0a6d1d Mon Sep 17 00:00:00 2001
From: George G <kreach3r@users.noreply.github.com>
Date: Mon, 14 Nov 2016 14:44:17 +0200
-Subject: [PATCH 22/39] OMS7 compatible 'Ambient notification inversion'
+Subject: [PATCH 22/40] OMS7 compatible 'Ambient notification inversion'
OMS7 introduced this fine piece of code: https://github.com/SubstratumResources/platform_frameworks_base/blob/n-oms7/core/java/android/app/ResourcesManager.java#L897..#L904
-From dee05736aa6eaf39d58fe45c26a22c9b27c1851a Mon Sep 17 00:00:00 2001
+From 8a9b71adc6d850ff3b0b96878f69e8e5d37af548 Mon Sep 17 00:00:00 2001
From: Ivan Iskandar <iiiiskandar14@gmail.com>
Date: Mon, 5 Dec 2016 19:00:04 +0700
-Subject: [PATCH 23/39] SystemUI: Use own drawables for QS expand icon
+Subject: [PATCH 23/40] SystemUI: Use own drawables for QS expand icon
This was using the volume panel drawables used also on volume panel.
So with this commit themers can give different icon for either QS
-From 7d856f5f2b292f031b79cab69ed2fa52e58e6579 Mon Sep 17 00:00:00 2001
+From 8c7162b979753b834a5e440cc2df5f703563b8ac Mon Sep 17 00:00:00 2001
From: 0xD34D <clark@scheffsblend.com>
Date: Mon, 9 Jan 2017 07:19:41 +0530
-Subject: [PATCH 24/39] N-Extras: Add dynamic theme BootAnimation support
+Subject: [PATCH 24/40] N-Extras: Add dynamic theme BootAnimation support
Extracted from "Themes: Port to CM13 [1/3]"
http://review.cyanogenmod.org/#/c/113273/14
-From b8b9d69b9d2bd3c73418202db1fcaad3a1cf42d6 Mon Sep 17 00:00:00 2001
+From f4c048dd43bed5b12d223c4a78cfda977ea9fce8 Mon Sep 17 00:00:00 2001
From: 0xD34D <clark@scheffsblend.com>
Date: Wed, 22 Jun 2016 23:54:23 +0300
-Subject: [PATCH 25/39] N-Extras: Add dynamic theme fonts support
+Subject: [PATCH 25/40] N-Extras: Add dynamic theme fonts support
Due to the nature of the removal of assetSeq in OMS7+, we now use the
more controllable font scale updating code to update the fonts on
-From a75f5eb1c3f793200f12fe0c38ce83019b1cd16e Mon Sep 17 00:00:00 2001
+From 9af72eb1074ba8a1fb33fc52ba864da6ae8e30e0 Mon Sep 17 00:00:00 2001
From: Nicholas Chum <nicholaschum@gmail.com>
Date: Sun, 17 Jul 2016 17:56:40 -0400
-Subject: [PATCH 26/39] N-Extras: AudioService: Allow system effect sounds to
+Subject: [PATCH 26/40] N-Extras: AudioService: Allow system effect sounds to
be themed
This commit checks whether there is a preexisting file in the themed
-From 8b7b718ac2fde41d72737f1d364d20657f707bf6 Mon Sep 17 00:00:00 2001
+From 3d322e1023a90e91d680048352830d0d45029b7e Mon Sep 17 00:00:00 2001
From: George G <kreach3r@users.noreply.github.com>
Date: Mon, 4 Jul 2016 06:25:15 +0300
-Subject: [PATCH 27/39] OMS7-N: ApplicationsState: add filter for Substratum
+Subject: [PATCH 27/40] OMS7-N: ApplicationsState: add filter for Substratum
overlays [1/2]
This commit allows the framework to handle the filtering of the
-From 178a421cc2a72774eaae4385e358e1787f09c778 Mon Sep 17 00:00:00 2001
+From e431a19dc79664250960c5f2999a1a167e38d9b3 Mon Sep 17 00:00:00 2001
From: Kuba Schenk <abukcz@gmail.com>
Date: Thu, 1 Dec 2016 21:48:26 +0100
-Subject: [PATCH 28/39] OMS7-N: ApplicationsState: add filter for Substratum
+Subject: [PATCH 28/40] OMS7-N: ApplicationsState: add filter for Substratum
icon overlays [1/2]
This commit allows the framework to handle the filtering of the icon overlays found for OMS.
-From be60352faad7f72bb88d0907ffe5320a3014dd3d Mon Sep 17 00:00:00 2001
+From 61890b8f9ae1a40414ea3ee6ee4dd7efdcf28f91 Mon Sep 17 00:00:00 2001
From: Abdulwahab Isam <abdoi94.iq@gmail.com>
Date: Fri, 7 Oct 2016 08:30:11 +0300
-Subject: [PATCH 29/39] Themes: Expose QS battery
+Subject: [PATCH 29/40] Themes: Expose QS battery
This is needed for white themes like Belo. Should function the same with dark themes as well.
-From 1675e81a9c5532f111fd5fb1d00d795d9b0f1b76 Mon Sep 17 00:00:00 2001
+From b865364d525e3de49006d4f3c9215f8e56be8a9a Mon Sep 17 00:00:00 2001
From: bigrushdog <randall.rushing@gmail.com>
Date: Mon, 19 Dec 2016 04:33:31 -0800
-Subject: [PATCH 30/39] OMS: Introduce MODIFY_OVERLAYS permission for user apps
+Subject: [PATCH 30/40] OMS: Introduce MODIFY_OVERLAYS permission for user apps
This permission will grant the app read and write permissions
to access OverlayManagerService. If caller does not posess
-From 92c569669b916a82eb8b7983514e49cb5d2b6281 Mon Sep 17 00:00:00 2001
+From 6fe37ff6d1b350b2d891e6832acff1f26addb380 Mon Sep 17 00:00:00 2001
From: daveyannihilation <daveyannihilation@hotmail.com>
Date: Sun, 1 Jan 2017 01:47:53 -0700
-Subject: [PATCH 31/39] SystemUI: Expose switch bar title
+Subject: [PATCH 31/40] SystemUI: Expose switch bar title
This is needed for the power notifications switchbar in SystemUI Tuner, amongst other things.
-From d80560dcf8cf991fdcf82b2bc444132569479ba4 Mon Sep 17 00:00:00 2001
+From 092ab8d4eafca7d831427a7490a8f4e48c31ce07 Mon Sep 17 00:00:00 2001
From: Bryan Owens <djbryan3540@gmail.com>
Date: Fri, 6 Jan 2017 21:12:15 +0800
-Subject: [PATCH 32/39] Themes: Expose manifest styles for themes
+Subject: [PATCH 32/40] Themes: Expose manifest styles for themes
Change-Id: Ie3a4fdead4f4fa1c121018b38de1c86a05bbcff2
---
-From 0a70fdf65bc1b133dba034705797b7ad7e454b8b Mon Sep 17 00:00:00 2001
+From efc4c8d3f3607e4ec91167dde3f0d1adfa424538 Mon Sep 17 00:00:00 2001
From: mickybart <mickybart@pygoscelis.org>
Date: Sat, 19 Nov 2016 19:05:05 -0500
-Subject: [PATCH 33/39] OMS: StrictMode and files under /data/system/theme/
+Subject: [PATCH 33/40] OMS: StrictMode and files under /data/system/theme/
Themes are using /data/system/theme/ to push some files like LowBattery.ogg (audio notification)
When the device battery trigger the low battery state, the sound is not played due
-From 48bd8aff219c57d1f578d0c7568bc91b47032323 Mon Sep 17 00:00:00 2001
+From 157bac2359998a275c24edd182d34803e54ed06b Mon Sep 17 00:00:00 2001
From: Daniel Koman <dankoman30@gmail.com>
Date: Wed, 28 Sep 2016 15:28:26 +0200
-Subject: [PATCH 34/39] doze: allow grayscale even if invert boolean is false
+Subject: [PATCH 34/40] doze: allow grayscale even if invert boolean is false
for dark themes, we are setting the config boolean for inverting
doze notifications to false. in addition to preventing
-From 5d2305c7564bb7ea1d4dda47ca09267173dfcb1f Mon Sep 17 00:00:00 2001
+From 01e9e40b810aa271107085c58f0d555cbffd57aa Mon Sep 17 00:00:00 2001
From: Alex Cruz <mazdarider23@gmail.com>
Date: Tue, 24 Jan 2017 11:14:46 +0100
-Subject: [PATCH 35/39] Expose external qs tile tint color
+Subject: [PATCH 35/40] Expose external qs tile tint color
This should allow themers to get around issues like this (see pic below)
-From 2594471d446539bc66928f7238ca89de2d585431 Mon Sep 17 00:00:00 2001
+From 1c5290f540e1758ae9d401bc62381e2f53fd64bd Mon Sep 17 00:00:00 2001
From: George G <kreach3r@users.noreply.github.com>
Date: Thu, 2 Feb 2017 01:52:27 +0200
-Subject: [PATCH 36/39] graphics: ADB "N" icon compatible with OMS7
+Subject: [PATCH 36/40] graphics: ADB "N" icon compatible with OMS7
It's the same problem as the booleans again. This time, it affected the adb "N" icon in the statusbar.
This commit should fix this.
-From 2d6fcbfe3de3fef2a22112ad440a23064f06c5e6 Mon Sep 17 00:00:00 2001
+From f03071d62a2a2b7394bcfd5f01cb66d805600a73 Mon Sep 17 00:00:00 2001
From: Alex Cruz <mazdarider23@gmail.com>
Date: Sat, 4 Feb 2017 14:13:26 +0100
-Subject: [PATCH 37/39] Set external QS tiles tint mode to SRC_ATOP
+Subject: [PATCH 37/40] Set external QS tiles tint mode to SRC_ATOP
While the external qs tile tint color was exposed, we had the same problem
we had with the external icons in Settings which is if a themer set the color
-From d1b0b4f215177c59bf20e85e58a8e0c9f4cb7af4 Mon Sep 17 00:00:00 2001
+From 3ffb6b8d661bbc5cec942d161eb5e95cb81d1188 Mon Sep 17 00:00:00 2001
From: Branden M <wasabi.dev@gmail.com>
Date: Wed, 1 Feb 2017 22:22:45 -0600
-Subject: [PATCH 38/39] Themes: Expose Keyguard affordance circle background
+Subject: [PATCH 38/40] Themes: Expose Keyguard affordance circle background
Change-Id: Id4a078cdbc944fa0c0736103045a0382d49ecb80
---
+++ /dev/null
-From 0a948ee14244742c52baa94bf32e04a7db0f3751 Mon Sep 17 00:00:00 2001
-From: bigrushdog <randall.rushing@gmail.com>
-Date: Sat, 14 Jan 2017 23:33:38 -0800
-Subject: [PATCH 39/39] Add a protected broadcast for Masquerade events
-
-Parse extras to get event details. Docs will be available
-in Masquerade source code
-
-Change-Id: I24ca3d11438bb830ce97af8b0e935c0700b394e6
----
- core/res/AndroidManifest.xml | 2 ++
- services/core/java/com/android/server/pm/PackageManagerService.java | 3 ++-
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
-index 36df6eac13e..768b04c86c5 100644
---- a/core/res/AndroidManifest.xml
-+++ b/core/res/AndroidManifest.xml
-@@ -517,6 +517,8 @@
- <protected-broadcast android:name="com.android.server.retaildemo.ACTION_RESET_DEMO" />
-
- <protected-broadcast android:name="cyanogenmod.intent.action.LID_STATE_CHANGED" />
-+ <protected-broadcast android:name="masquerade.substratum.STATUS_CHANGED" />
-+
- <!-- ====================================================================== -->
- <!-- RUNTIME PERMISSIONS -->
- <!-- ====================================================================== -->
-diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
-index faaff1f08a2..79032a915ca 100644
---- a/services/core/java/com/android/server/pm/PackageManagerService.java
-+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
-@@ -4568,7 +4568,8 @@ public class PackageManagerService extends IPackageManager.Stub {
- if (actionName.startsWith("android.net.netmon.lingerExpired")
- || actionName.startsWith("com.android.server.sip.SipWakeupTimer")
- || actionName.startsWith("com.android.internal.telephony.data-reconnect")
-- || actionName.startsWith("android.net.netmon.launchCaptivePortalApp")) {
-+ || actionName.startsWith("android.net.netmon.launchCaptivePortalApp")
-+ || actionName.startsWith("masquerade.substratum.STATUS_CHANGED")) {
- return true;
- }
- }
---
-2.11.1
-
--- /dev/null
+From 5efea188dbef1496f10188344973461bc27d3a8d Mon Sep 17 00:00:00 2001
+From: SpiritCroc <spiritcroc@gmail.com>
+Date: Sun, 5 Feb 2017 12:00:54 +0100
+Subject: [PATCH 39/40] Notification tint: add optional findContrastColor
+ algorithm for dark backgrounds
+
+Overlay config_useDarkBgNotificationIconTextTinting to enable dark bg tinting
+
+Change-Id: I80cb01caf185c8fcd012ba409eacfa91e887c511
+---
+ .../internal/util/NotificationColorUtil.java | 65 +++++++++++++++++++++-
+ core/res/res/values/projekt_config.xml | 4 ++
+ core/res/res/values/projekt_symbols.xml | 1 +
+ 3 files changed, 68 insertions(+), 2 deletions(-)
+
+diff --git a/core/java/com/android/internal/util/NotificationColorUtil.java b/core/java/com/android/internal/util/NotificationColorUtil.java
+index 4748e6fb19f..bbc9a24b1ed 100644
+--- a/core/java/com/android/internal/util/NotificationColorUtil.java
++++ b/core/java/com/android/internal/util/NotificationColorUtil.java
+@@ -37,6 +37,8 @@ import android.text.style.TextAppearanceSpan;
+ import android.util.Log;
+ import android.util.Pair;
+
++import com.android.internal.R;
++
+ import java.util.Arrays;
+ import java.util.WeakHashMap;
+
+@@ -268,6 +270,44 @@ public class NotificationColorUtil {
+ }
+
+ /**
++ * Finds a suitable color such that there's enough contrast, optimised for dark backgrounds
++ *
++ * @param color the color to start searching from.
++ * @param other the color to ensure contrast against. Assumed to be darker than {@param color}
++ * @param findFg if true, we assume {@param color} is a foreground, otherwise a background.
++ * @param minRatio the minimum contrast ratio required.
++ * @return a color with the same hue as {@param color}, potentially lightened to meet the
++ * contrast ratio.
++ */
++ private static int findDarkContrastColor(int color, int other, boolean findFg, double minRatio) {
++ int fg = findFg ? color : other;
++ int bg = findFg ? other : color;
++ if (ColorUtilsFromCompat.calculateContrast(fg, bg) >= minRatio) {
++ return color;
++ }
++
++ double[] lab = new double[3];
++ ColorUtilsFromCompat.colorToLAB(findFg ? fg : bg, lab);
++
++ double low = lab[0], high = 100d;
++ final double a = lab[1], b = lab[2];
++ for (int i = 0; i < 15 && high - low > 0.00001; i++) {
++ final double l = (low + high) / 2;
++ if (findFg) {
++ fg = ColorUtilsFromCompat.LABToColor(l, a, b);
++ } else {
++ bg = ColorUtilsFromCompat.LABToColor(l, a, b);
++ }
++ if (ColorUtilsFromCompat.calculateContrast(fg, bg) > minRatio) {
++ high = l;
++ } else {
++ low = l;
++ }
++ }
++ return ColorUtilsFromCompat.LABToColor(high, a, b);
++ }
++
++ /**
+ * Finds a text color with sufficient contrast over bg that has the same hue as the original
+ * color, assuming it is for large text.
+ */
+@@ -277,12 +317,28 @@ public class NotificationColorUtil {
+
+ /**
+ * Finds a text color with sufficient contrast over bg that has the same hue as the original
++ * color, assuming it is for large text. Optimised for dark backgrounds.
++ */
++ public static int ensureLargeDarkTextContrast(int color, int bg) {
++ return findDarkContrastColor(color, bg, true, 3);
++ }
++
++ /**
++ * Finds a text color with sufficient contrast over bg that has the same hue as the original
+ * color.
+ */
+ private static int ensureTextContrast(int color, int bg) {
+ return findContrastColor(color, bg, true, 4.5);
+ }
+
++ /**
++ * Finds a text color with sufficient contrast over bg that has the same hue as the original
++ * color. Optimised for dark backgrounds.
++ */
++ private static int ensureDarkTextContrast(int color, int bg) {
++ return findDarkContrastColor(color, bg, true, 4.5);
++ }
++
+ /** Finds a background color for a text view with given text color and hint text color, that
+ * has the same hue as the original color.
+ */
+@@ -323,8 +379,13 @@ public class NotificationColorUtil {
+ com.android.internal.R.color.notification_material_background_color);
+
+ int color = resolvedColor;
+- color = NotificationColorUtil.ensureLargeTextContrast(color, actionBg);
+- color = NotificationColorUtil.ensureTextContrast(color, notiBg);
++ if (context.getResources().getBoolean(R.bool.config_useDarkBgNotificationIconTextTinting)) {
++ color = NotificationColorUtil.ensureLargeDarkTextContrast(color, actionBg);
++ color = NotificationColorUtil.ensureDarkTextContrast(color, notiBg);
++ } else {
++ color = NotificationColorUtil.ensureLargeTextContrast(color, actionBg);
++ color = NotificationColorUtil.ensureTextContrast(color, notiBg);
++ }
+
+ if (color != resolvedColor) {
+ if (DEBUG){
+diff --git a/core/res/res/values/projekt_config.xml b/core/res/res/values/projekt_config.xml
+index 5234959fc9e..8cf5666a7e4 100644
+--- a/core/res/res/values/projekt_config.xml
++++ b/core/res/res/values/projekt_config.xml
+@@ -27,4 +27,8 @@
+ needs to be set to false, to prevent the doze notifications from being light -->
+ <bool name="config_invert_colors_on_doze">true</bool>
+
++ <!-- True if the notification's dynamic app icon/title tint should be optimised for dark
++ backgrounds (requires config_allowNotificationIconTextTinting to be true)-->
++ <bool name="config_useDarkBgNotificationIconTextTinting">false</bool>
++
+ </resources>
+diff --git a/core/res/res/values/projekt_symbols.xml b/core/res/res/values/projekt_symbols.xml
+index 16a5728e6c9..faa71e064e6 100644
+--- a/core/res/res/values/projekt_symbols.xml
++++ b/core/res/res/values/projekt_symbols.xml
+@@ -19,6 +19,7 @@
+
+ <!-- Notification icon/text dynamic tint -->
+ <java-symbol type="bool" name="config_allowNotificationIconTextTinting" />
++ <java-symbol type="bool" name="config_useDarkBgNotificationIconTextTinting" />
+ <java-symbol type="color" name="notification_text_default_color" />
+ <java-symbol type="color" name="sender_text_color" />
+
+--
+2.11.1
+
--- /dev/null
+From 027b97fdde6cb61f47ccf26aa1223c903c0b7704 Mon Sep 17 00:00:00 2001
+From: bigrushdog <randall.rushing@gmail.com>
+Date: Sat, 14 Jan 2017 23:33:38 -0800
+Subject: [PATCH 40/40] Add a protected broadcast for Masquerade events
+
+Parse extras to get event details. Docs will be available
+in Masquerade source code
+
+Change-Id: I24ca3d11438bb830ce97af8b0e935c0700b394e6
+---
+ core/res/AndroidManifest.xml | 2 ++
+ services/core/java/com/android/server/pm/PackageManagerService.java | 3 ++-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
+index 36df6eac13e..768b04c86c5 100644
+--- a/core/res/AndroidManifest.xml
++++ b/core/res/AndroidManifest.xml
+@@ -517,6 +517,8 @@
+ <protected-broadcast android:name="com.android.server.retaildemo.ACTION_RESET_DEMO" />
+
+ <protected-broadcast android:name="cyanogenmod.intent.action.LID_STATE_CHANGED" />
++ <protected-broadcast android:name="masquerade.substratum.STATUS_CHANGED" />
++
+ <!-- ====================================================================== -->
+ <!-- RUNTIME PERMISSIONS -->
+ <!-- ====================================================================== -->
+diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
+index faaff1f08a2..79032a915ca 100644
+--- a/services/core/java/com/android/server/pm/PackageManagerService.java
++++ b/services/core/java/com/android/server/pm/PackageManagerService.java
+@@ -4568,7 +4568,8 @@ public class PackageManagerService extends IPackageManager.Stub {
+ if (actionName.startsWith("android.net.netmon.lingerExpired")
+ || actionName.startsWith("com.android.server.sip.SipWakeupTimer")
+ || actionName.startsWith("com.android.internal.telephony.data-reconnect")
+- || actionName.startsWith("android.net.netmon.launchCaptivePortalApp")) {
++ || actionName.startsWith("android.net.netmon.launchCaptivePortalApp")
++ || actionName.startsWith("masquerade.substratum.STATUS_CHANGED")) {
+ return true;
+ }
+ }
+--
+2.11.1
+