Rebase OMS patches on latest 7.1.2 merge
authorLuK1337 <priv.luk@gmail.com>
Fri, 14 Apr 2017 16:46:14 +0000 (18:46 +0200)
committerLuK1337 <priv.luk@gmail.com>
Fri, 14 Apr 2017 16:46:14 +0000 (18:46 +0200)
117 files changed:
patches/frameworks/base/0001-OMS7-N-Support-tagging-resources-as-OK-to-overlay-1-.patch
patches/frameworks/base/0002-OMS7-N-Introduce-the-OverlayManagerService-2-11.patch
patches/frameworks/base/0003-OMS7-N-Integrate-OverlayManagerService-into-framewor.patch
patches/frameworks/base/0004-OMS7-N-Set-EXTRA_REPLACING-correctly-in-ACTION_PACKA.patch
patches/frameworks/base/0005-OMS7-N-idmap-suppress-print-for-padded-resources-5-1.patch
patches/frameworks/base/0006-OMS7-N-Fix-memory-leak-during-idmap-creation-6-11.patch
patches/frameworks/base/0007-OMS7-N-installd-add-command-rmidmap-7-11.patch
patches/frameworks/base/0008-OMS7-N-Disable-Zygote-preloaded-drawables-8-11.patch
patches/frameworks/base/0009-OMS7-N-Persistence-on-boot-through-OverlayManagerSer.patch
patches/frameworks/base/0010-OMS7-N-Do-not-enforce-code-policy-limiting-overlay-i.patch
patches/frameworks/base/0011-OMS7-N-Implement-multi-target-enable-disable-and-dis.patch
patches/frameworks/base/0012-N-Extras-Add-dynamic-theme-BootAnimation-support.patch [new file with mode: 0644]
patches/frameworks/base/0012-Themes-Expose-resolver-hardcoded-colors.patch [deleted file]
patches/frameworks/base/0013-N-Extras-Add-dynamic-theme-fonts-support.patch [new file with mode: 0644]
patches/frameworks/base/0013-Themes-Allow-Immersive-cling-colors-to-be-fully-them.patch [deleted file]
patches/frameworks/base/0014-N-Extras-AudioService-Allow-system-effect-sounds-to-.patch [new file with mode: 0644]
patches/frameworks/base/0014-Themes-Allow-Permission-Icons-to-be-fully-themed.patch [deleted file]
patches/frameworks/base/0015-Themes-Allow-Navbar-ripple-color-to-be-themed.patch [deleted file]
patches/frameworks/base/0015-Themes-Expose-resolver-hardcoded-colors.patch [new file with mode: 0644]
patches/frameworks/base/0016-SystemUI-Expose-QS-edit-item-decoration-background-c.patch [deleted file]
patches/frameworks/base/0016-Themes-Allow-Immersive-cling-colors-to-be-fully-them.patch [new file with mode: 0644]
patches/frameworks/base/0017-Allow-custom-alpha-for-notification-shade-bg-color.patch [deleted file]
patches/frameworks/base/0017-Themes-Allow-Permission-Icons-to-be-fully-themed.patch [new file with mode: 0644]
patches/frameworks/base/0018-Themes-Allow-Navbar-ripple-color-to-be-themed.patch [new file with mode: 0644]
patches/frameworks/base/0018-Themes-Expose-various-QuickSettings-text-colors.patch [deleted file]
patches/frameworks/base/0019-Notifications-Expose-a-bool-to-disable-dynamic-color.patch [deleted file]
patches/frameworks/base/0019-SystemUI-Expose-QS-edit-item-decoration-background-c.patch [new file with mode: 0644]
patches/frameworks/base/0020-Allow-custom-alpha-for-notification-shade-bg-color.patch [new file with mode: 0644]
patches/frameworks/base/0020-Notification-dynamic-colors-bool-compatible-with-OMS.patch [deleted file]
patches/frameworks/base/0021-Allow-prevention-of-doze-notification-color-inversio.patch [deleted file]
patches/frameworks/base/0021-Themes-Expose-various-QuickSettings-text-colors.patch [new file with mode: 0644]
patches/frameworks/base/0022-Notifications-Expose-a-bool-to-disable-dynamic-color.patch [new file with mode: 0644]
patches/frameworks/base/0022-OMS7-compatible-Ambient-notification-inversion.patch [deleted file]
patches/frameworks/base/0023-Notification-dynamic-colors-bool-compatible-with-OMS.patch [new file with mode: 0644]
patches/frameworks/base/0023-SystemUI-Use-own-drawables-for-QS-expand-icon.patch [deleted file]
patches/frameworks/base/0024-Allow-prevention-of-doze-notification-color-inversio.patch [new file with mode: 0644]
patches/frameworks/base/0024-N-Extras-Add-dynamic-theme-BootAnimation-support.patch [deleted file]
patches/frameworks/base/0025-N-Extras-Add-dynamic-theme-fonts-support.patch [deleted file]
patches/frameworks/base/0025-OMS7-compatible-Ambient-notification-inversion.patch [new file with mode: 0644]
patches/frameworks/base/0026-N-Extras-AudioService-Allow-system-effect-sounds-to-.patch [deleted file]
patches/frameworks/base/0026-doze-allow-grayscale-even-if-invert-boolean-is-false.patch [new file with mode: 0644]
patches/frameworks/base/0027-OMS7-N-ApplicationsState-add-filter-for-Substratum-o.patch [deleted file]
patches/frameworks/base/0027-SystemUI-Use-own-drawables-for-QS-expand-icon.patch [new file with mode: 0644]
patches/frameworks/base/0028-OMS7-N-ApplicationsState-add-filter-for-Substratum-i.patch [deleted file]
patches/frameworks/base/0028-OMS7-N-ApplicationsState-add-filter-for-Substratum-o.patch [new file with mode: 0644]
patches/frameworks/base/0029-OMS7-N-ApplicationsState-add-filter-for-Substratum-i.patch [new file with mode: 0644]
patches/frameworks/base/0029-Themes-Expose-QS-battery.patch [deleted file]
patches/frameworks/base/0030-OMS-Introduce-MODIFY_OVERLAYS-permission-for-user-ap.patch [deleted file]
patches/frameworks/base/0030-Themes-Expose-QS-battery.patch [new file with mode: 0644]
patches/frameworks/base/0031-OMS-Introduce-MODIFY_OVERLAYS-permission-for-user-ap.patch [new file with mode: 0644]
patches/frameworks/base/0031-SystemUI-Expose-switch-bar-title.patch [deleted file]
patches/frameworks/base/0032-SystemUI-Expose-switch-bar-title.patch [new file with mode: 0644]
patches/frameworks/base/0032-doze-allow-grayscale-even-if-invert-boolean-is-false.patch [deleted file]
patches/frameworks/base/0033-Expose-external-qs-tile-tint-color.patch
patches/frameworks/base/0034-graphics-ADB-N-icon-compatible-with-OMS7.patch
patches/frameworks/base/0035-Set-external-QS-tiles-tint-mode-to-SRC_ATOP.patch
patches/frameworks/base/0036-Themes-Expose-Keyguard-affordance-circle-background.patch
patches/frameworks/base/0037-Notification-tint-add-optional-findContrastColor-alg.patch
patches/frameworks/base/0038-Add-a-protected-broadcast-for-Masquerade-events.patch [new file with mode: 0644]
patches/frameworks/base/0038-OMS7-Rootless-Security-Update-Preparation-for-March-.patch [deleted file]
patches/frameworks/base/0039-OMS-Add-hide-annotation-to-MODIFY_OVERLAYS-permissio.patch [deleted file]
patches/frameworks/base/0039-OMS7-Rootless-Security-Update-Preparation-for-March-.patch [new file with mode: 0644]
patches/frameworks/base/0040-FWB-Give-power-dialogs-own-set-of-volume-icons-for-t.patch [deleted file]
patches/frameworks/base/0040-OMS-Add-hide-annotation-to-MODIFY_OVERLAYS-permissio.patch [new file with mode: 0644]
patches/frameworks/base/0041-FWB-Give-power-dialogs-own-set-of-volume-icons-for-t.patch [new file with mode: 0644]
patches/frameworks/base/0041-base-Force-authorize-all-calling-packages-by-Masquer.patch [deleted file]
patches/frameworks/base/0042-ThemeSafety-Introduce-App-Crash-Intent.patch [deleted file]
patches/frameworks/base/0042-base-Force-authorize-all-calling-packages-by-Masquer.patch [new file with mode: 0644]
patches/frameworks/base/0043-Expose-Screenshot-flash-and-background-colors.patch [deleted file]
patches/frameworks/base/0043-Revert-Add-a-protected-broadcast-for-Masquerade-even.patch [new file with mode: 0644]
patches/frameworks/base/0044-ThemeSafety-Introduce-App-Crash-Intent.patch [new file with mode: 0644]
patches/frameworks/base/0044-Themes-Expose-Keyboard-Shortcuts-Dialog.patch [deleted file]
patches/frameworks/base/0045-Expose-Screenshot-flash-and-background-colors.patch [new file with mode: 0644]
patches/frameworks/base/0046-Themes-Expose-Keyboard-Shortcuts-Dialog.patch [new file with mode: 0644]
patches/frameworks/base/0047-Hold-volume-up-during-boot-to-disable-all-overlays.patch [new file with mode: 0644]
patches/frameworks/native/0001-OMS-N-installd-add-command-rmidmap.patch [deleted file]
patches/frameworks/native/0001-OMS7-N-installd-add-command-rmidmap.patch [new file with mode: 0644]
patches/packages/apps/Contacts/0001-Themes-Expose-hardcoded-layout-and-styles-colors.patch
patches/packages/apps/ContactsCommon/0001-Themes-Expose-hardcoded-contact-tile-text-colors.patch
patches/packages/apps/ContactsCommon/0002-Themes-Define-back-arrow-tint-color-for-themes.patch
patches/packages/apps/Dialer/0001-Themes-Separate-background-color-from-text-color.patch
patches/packages/apps/Dialer/0002-Themes-InCallUI-dialpad-digits-color.patch
patches/packages/apps/ExactCalculator/0001-Themes-Expose-hard-coded-background-in-java.patch
patches/packages/apps/ExactCalculator/0002-Themes-Expose-all-elevations.patch
patches/packages/apps/PackageInstaller/0001-PackageInstaller-Add-tint-mode-to-icons.patch
patches/packages/apps/PhoneCommon/0001-Themes-Make-dialpad-seperator-line-theme-able.patch
patches/packages/apps/Settings/0001-Settings-Expose-dashboard-category-and-tile-color.patch
patches/packages/apps/Settings/0002-Settings-Expose-condition-card-colors.patch
patches/packages/apps/Settings/0003-Settings-Expose-storage-summary-text.patch
patches/packages/apps/Settings/0004-Settings-Expose-gesture-settings-switchbar.patch
patches/packages/apps/Settings/0005-Settings-Expose-storage-icon-colors.patch
patches/packages/apps/Settings/0006-Settings-Expose-LinearColorBar-default-colors.patch
patches/packages/apps/Settings/0007-OMS7-N-Apps-show-hide-Substratum-overlays-2-2.patch
patches/packages/apps/Settings/0008-OMS7-N-Apps-show-hide-Substratum-icon-overlays-2-2.patch
patches/packages/apps/Settings/0009-Exclude-overlays-from-the-app-counter.patch
patches/packages/apps/Settings/0010-Hide-the-show-hide-overlays-when-no-overlay-installe.patch
patches/packages/apps/Settings/0011-Expose-color-for-external-settings-icons.patch
patches/packages/apps/Settings/0012-Expose-dashboard-category-padding-bottom.patch
patches/packages/apps/Settings/0013-Expose-switchbar-background-color.patch
patches/packages/apps/Settings/0014-Settings-Expose-bluetooth-pin-confirm-dialog-text-co.patch
patches/packages/apps/Settings/0015-Set-external-settings-icon-tint-mode-to-SRC_ATOP.patch
patches/packages/apps/Settings/0016-Settings-Guard-against-themes-without-colorAccent-de.patch
patches/packages/apps/Settings/0017-Settings-Expose-styles-in-the-manifest-for-themes.patch
patches/packages/apps/Settings/0018-Settings-Expose-and-add-tint-mode-to-custom-icons.patch
patches/packages/apps/Settings/0019-Settings-Expose-ALL-hardcoded-and-android-colors.patch
patches/packages/apps/Settings/0020-Development-Allow-all-Masquerade-calling-packages-fo.patch
patches/system/sepolicy/0001-OMS-N-Add-service-overlay-to-service_contexts.patch [deleted file]
patches/system/sepolicy/0001-OMS7-N-Add-service-overlay-to-service_contexts.patch [new file with mode: 0644]
patches/system/sepolicy/0002-Introduce-sepolicy-exceptions-for-theme-assets.patch
patches/system/sepolicy/0003-sepolicy-fix-themed-boot-animation.patch
patches/system/sepolicy/0004-sepolicy-fix-themed-sounds.patch
patches/system/sepolicy/0005-initial-policy-edits-for-masquerade-to-operate-rootl.patch
patches/system/sepolicy/0006-sepolicy-rename-masquerade-domain-and-allow-JobServi.patch
patches/system/sepolicy/0007-sepolicy-allow-masquerade-to-read-and-write-theme-as.patch
patches/system/sepolicy/0008-sepolicy-Fix-application-of-bootanimation.patch
patches/system/sepolicy/0009-sepolicy-Redo-masquerade-rules.patch
patches/system/sepolicy/0010-Welcome-to-Theme-Interfacer-2-2.patch

index f3cacf0792ad37d4a55e2c6d3e4ef348f2ca3c8b..bd3c013a63b99db7c7dc1b9b4b90a424f02114b4 100644 (file)
@@ -1,7 +1,7 @@
-From aec0448a9ef3828a4882dad71265334dca4e087f Mon Sep 17 00:00:00 2001
+From e399fb9b4fee40ad4bf0e4aee27b6cffae5a5899 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/44] OMS7-N: Support tagging resources as OK to overlay
+Subject: [PATCH 01/47] OMS7-N: Support tagging resources as OK to overlay
  [1/11]
 
 This will allow applications to have a resource xml defining what
@@ -97,10 +97,10 @@ index 12a6b0f9a4e..6094a576d75 100644
              String8* pTargetPath, String8* pOverlayPath);
  
 diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp
-index 5b36a43abdc..c0e8a980c2d 100644
+index 61a04c212d4..6319d893cc8 100644
 --- a/libs/androidfw/AssetManager.cpp
 +++ b/libs/androidfw/AssetManager.cpp
-@@ -252,7 +252,7 @@ bool AssetManager::addOverlayPath(const String8& packagePath, int32_t* cookie)
+@@ -253,7 +253,7 @@ bool AssetManager::addOverlayPath(const String8& packagePath, int32_t* cookie)
      String8 targetPath;
      String8 overlayPath;
      if (!ResTable::getIdmapInfo(idmap->getBuffer(false), idmap->getLength(),
index 1c881f06839c210d5181f768395964a56d910367..cf27eb4c4383707011bb0b795fd1d951db6ffc55 100644 (file)
@@ -1,7 +1,7 @@
-From 0865f28568ea71401837a37357bc270d8e3a062c Mon Sep 17 00:00:00 2001
+From f9e781525d7ece472d2016584914755e8d13bec7 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/44] OMS7-N: Introduce the OverlayManagerService [2/11]
+Subject: [PATCH 02/47] 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
@@ -84,7 +84,7 @@ Change-Id: Icc3c7daa25345d20bc5014b865024422eab72f5b
  create mode 100644 services/core/java/com/android/server/om/OverlayManagerShellCommand.java
 
 diff --git a/Android.mk b/Android.mk
-index bdb45550fa1..df427801fa7 100644
+index 7f06a7a02ad..a0fbd6930da 100644
 --- a/Android.mk
 +++ b/Android.mk
 @@ -137,6 +137,7 @@ LOCAL_SRC_FILES += \
@@ -96,10 +96,10 @@ index bdb45550fa1..df427801fa7 100644
        core/java/android/content/pm/IOnAppsChangedListener.aidl \
        core/java/android/content/pm/IOtaDexopt.aidl \
 diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
-index 3a2f471e96e..1ca44e0f633 100644
+index ab37cd80b81..dea1d5a60df 100644
 --- a/core/java/android/content/Context.java
 +++ b/core/java/android/content/Context.java
-@@ -3656,6 +3656,16 @@ public abstract class Context {
+@@ -3653,6 +3653,16 @@ public abstract class Context {
      public static final String GATEKEEPER_SERVICE = "android.service.gatekeeper.IGateKeeperService";
  
      /**
@@ -117,7 +117,7 @@ index 3a2f471e96e..1ca44e0f633 100644
       * process and user ID running in the system.
       *
 diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
-index 861aae5a879..1afae798bcf 100644
+index 2142aae2ec7..ad43aa5a776 100644
 --- a/core/java/android/content/Intent.java
 +++ b/core/java/android/content/Intent.java
 @@ -3092,6 +3092,40 @@ public class Intent implements Parcelable, Cloneable {
@@ -618,13 +618,13 @@ index 00000000000..a25cf0c008c
 +    }
 +}
 diff --git a/core/java/android/content/pm/PackageManagerInternal.java b/core/java/android/content/pm/PackageManagerInternal.java
-index f5bcf64417a..bdbdd1ebcf9 100644
+index 9bb21288686..7863919df4d 100644
 --- a/core/java/android/content/pm/PackageManagerInternal.java
 +++ b/core/java/android/content/pm/PackageManagerInternal.java
-@@ -168,4 +168,28 @@ public abstract class PackageManagerInternal {
-      * @return Whether was launched.
+@@ -181,4 +181,28 @@ public abstract class PackageManagerInternal {
+      * user id is not currently assigned.
       */
-     public abstract boolean wasPackageEverLaunched(String packageName, int userId);
+     public abstract String getNameForUid(int uid);
 +
 +    /**
 +     * Get all overlay packages for a user.
@@ -651,7 +651,7 @@ index f5bcf64417a..bdbdd1ebcf9 100644
 +    public abstract void setResourceDirs(int userId, String packageName, String[] resourceDirs);
  }
 diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
-index 2c76dee9754..6a5bd3946db 100644
+index e15a0b8c895..cd200e20481 100644
 --- a/core/res/AndroidManifest.xml
 +++ b/core/res/AndroidManifest.xml
 @@ -84,6 +84,10 @@
@@ -3026,12 +3026,12 @@ index 00000000000..d6f53737913
 +    }
 +}
 diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
-index 4cfa3d5d40c..7860bbdaf5d 100644
+index 9e899afe3a3..3aacfb43913 100644
 --- a/services/core/java/com/android/server/pm/PackageManagerService.java
 +++ b/services/core/java/com/android/server/pm/PackageManagerService.java
-@@ -21460,6 +21460,47 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
-                 return mSettings.wasPackageEverLaunchedLPr(packageName, userId);
-             }
+@@ -21466,6 +21466,47 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
+         public String getNameForUid(int uid) {
+             return PackageManagerService.this.getNameForUid(uid);
          }
 +
 +        @Override
index 7b33efaa44d2a3721eafb832945ccceb2a011824..4d7a44d879a7a4c23e2cef54cc51e44328a9e853 100644 (file)
@@ -1,7 +1,7 @@
-From 0dddffd1c6201f3cd5e235a37014bc10331e45eb Mon Sep 17 00:00:00 2001
+From 427b392b55d816ff7a56461718d94d42048cb775 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/44] OMS7-N: Integrate OverlayManagerService into framework
+Subject: [PATCH 03/47] OMS7-N: Integrate OverlayManagerService into framework
  [3/11]
 
 Hand over ownership of overlays to OverlayManagerService.
@@ -52,17 +52,17 @@ Change-Id: If0b1eaa690c38f9c33f7c8dc981314205a73fa9c
  core/java/android/app/ResourcesManager.java        | 119 ++++++++++++++----
  core/java/android/content/pm/PackageParser.java    |  20 +--
  core/java/android/content/pm/PackageUserState.java |   7 +-
- core/jni/android_util_AssetManager.cpp             |  95 ---------------
- include/androidfw/AssetManager.h                   |  15 +--
- libs/androidfw/AssetManager.cpp                    | 112 -----------------
+ core/jni/android_util_AssetManager.cpp             |  89 --------------
+ include/androidfw/AssetManager.h                   |  14 +--
+ libs/androidfw/AssetManager.cpp                    | 111 -----------------
  .../com/android/server/SystemServiceManager.java   |  24 ++--
  .../android/server/am/ActivityManagerService.java  |  51 ++++++++
- .../android/server/om/OverlayManagerService.java   |  61 +++++-----
- .../android/server/pm/PackageManagerService.java   | 134 ++++-----------------
+ .../android/server/om/OverlayManagerService.java   |  61 +++++----
+ .../android/server/pm/PackageManagerService.java   | 136 ++++-----------------
  .../com/android/server/pm/PackageSettingBase.java  |   9 +-
  .../core/java/com/android/server/pm/Settings.java  |   4 +-
  services/java/com/android/server/SystemServer.java |   4 +
- 21 files changed, 337 insertions(+), 481 deletions(-)
+ 21 files changed, 337 insertions(+), 475 deletions(-)
 
 diff --git a/cmds/idmap/Android.mk b/cmds/idmap/Android.mk
 index 50ccb07a382..eb6da18ea0a 100644
@@ -244,10 +244,10 @@ index 50479c8e951..389f3422fb5 100644
              throws RemoteException {
          Parcel data = Parcel.obtain();
 diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
-index 2d22f26069f..55fc25de68b 100644
+index 9d2ef914738..9e479ec6772 100644
 --- a/core/java/android/app/ActivityThread.java
 +++ b/core/java/android/app/ActivityThread.java
-@@ -897,6 +897,14 @@ public final class ActivityThread {
+@@ -898,6 +898,14 @@ public final class ActivityThread {
              sendMessage(H.CONFIGURATION_CHANGED, config);
          }
  
@@ -262,7 +262,7 @@ index 2d22f26069f..55fc25de68b 100644
          public void updateTimeZone() {
              TimeZone.setDefault(null);
          }
-@@ -1405,6 +1413,7 @@ public final class ActivityThread {
+@@ -1406,6 +1414,7 @@ public final class ActivityThread {
          public static final int MULTI_WINDOW_MODE_CHANGED = 152;
          public static final int PICTURE_IN_PICTURE_MODE_CHANGED = 153;
          public static final int LOCAL_VOICE_INTERACTION_STARTED = 154;
@@ -270,7 +270,7 @@ index 2d22f26069f..55fc25de68b 100644
  
          String codeToString(int code) {
              if (DEBUG_MESSAGES) {
-@@ -1461,6 +1470,7 @@ public final class ActivityThread {
+@@ -1462,6 +1471,7 @@ public final class ActivityThread {
                      case MULTI_WINDOW_MODE_CHANGED: return "MULTI_WINDOW_MODE_CHANGED";
                      case PICTURE_IN_PICTURE_MODE_CHANGED: return "PICTURE_IN_PICTURE_MODE_CHANGED";
                      case LOCAL_VOICE_INTERACTION_STARTED: return "LOCAL_VOICE_INTERACTION_STARTED";
@@ -278,7 +278,7 @@ index 2d22f26069f..55fc25de68b 100644
                  }
              }
              return Integer.toString(code);
-@@ -1716,6 +1726,10 @@ public final class ActivityThread {
+@@ -1717,6 +1727,10 @@ public final class ActivityThread {
                      handleLocalVoiceInteractionStarted((IBinder) ((SomeArgs) msg.obj).arg1,
                              (IVoiceInteractor) ((SomeArgs) msg.obj).arg2);
                      break;
@@ -289,7 +289,7 @@ index 2d22f26069f..55fc25de68b 100644
              }
              Object obj = msg.obj;
              if (obj instanceof SomeArgs) {
-@@ -4803,6 +4817,37 @@ public final class ActivityThread {
+@@ -4804,6 +4818,37 @@ public final class ActivityThread {
          }
      }
  
@@ -658,15 +658,15 @@ index e64e4c4cc5e..83573951712 100644
  
      /**
 diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp
-index 1a7294f1424..6c5a88fa827 100644
+index fd663cdc7fe..417edb22905 100644
 --- a/core/jni/android_util_AssetManager.cpp
 +++ b/core/jni/android_util_AssetManager.cpp
-@@ -129,85 +129,6 @@ jint copyValue(JNIEnv* env, jobject outValue, const ResTable* table,
+@@ -130,92 +130,6 @@ jint copyValue(JNIEnv* env, jobject outValue, const ResTable* table,
      return block;
  }
  
 -// This is called by zygote (running as user root) as part of preloadResources.
--static void verifySystemIdmaps(const char* overlay_dir)
+-static void verifySystemIdmaps()
 -{
 -    pid_t pid;
 -    char system_id[10];
@@ -710,7 +710,7 @@ index 1a7294f1424..6c5a88fa827 100644
 -                }
 -
 -                // Generic idmap parameters
--                const char* argv[7];
+-                const char* argv[8];
 -                int argc = 0;
 -                struct stat st;
 -
@@ -721,17 +721,24 @@ index 1a7294f1424..6c5a88fa827 100644
 -                argv[argc++] = AssetManager::TARGET_APK_PATH;
 -                argv[argc++] = AssetManager::IDMAP_DIR;
 -
--                // Directories to scan for overlays
--                // /vendor/overlay
--
--               if (stat(overlay_dir, &st) == 0) {
--                   argv[argc++] = overlay_dir;
+-                // Directories to scan for overlays: if OVERLAY_THEME_DIR_PROPERTY is defined,
+-                // use OVERLAY_DIR/<value of OVERLAY_THEME_DIR_PROPERTY> in addition to OVERLAY_DIR.
+-                char subdir[PROP_VALUE_MAX];
+-                int len = __system_property_get(AssetManager::OVERLAY_THEME_DIR_PROPERTY, subdir);
+-                if (len > 0) {
+-                    String8 overlayPath = String8(AssetManager::OVERLAY_DIR) + "/" + subdir;
+-                    if (stat(overlayPath.string(), &st) == 0) {
+-                        argv[argc++] = overlayPath.string();
+-                    }
+-                }
+-                if (stat(AssetManager::OVERLAY_DIR, &st) == 0) {
+-                    argv[argc++] = AssetManager::OVERLAY_DIR;
 -                }
 -
 -                // Finally, invoke idmap (if any overlay directory exists)
 -                if (argc > 5) {
 -                    execv(AssetManager::IDMAP_BIN, (char* const*)argv);
--                    ALOGE("failed to execl for idmap: %s", strerror(errno));
+-                    ALOGE("failed to execv for idmap: %s", strerror(errno));
 -                    exit(1); // should never get here
 -                } else {
 -                    exit(0);
@@ -747,34 +754,21 @@ index 1a7294f1424..6c5a88fa827 100644
  // ----------------------------------------------------------------------------
  
  // this guy is exported to other jni routines
-@@ -2078,22 +1999,6 @@ static jintArray android_content_AssetManager_getStyleAttributes(JNIEnv* env, jo
+@@ -2086,9 +2000,6 @@ static jintArray android_content_AssetManager_getStyleAttributes(JNIEnv* env, jo
  
  static void android_content_AssetManager_init(JNIEnv* env, jobject clazz, jboolean isSystem)
  {
 -    if (isSystem) {
--        // Load frameworks-res.apk's overlay through regionalization environment
--        if (Environment::isSupported()) {
--            Environment* environment = new Environment();
--            if (environment != NULL) {
--                const char* overlay_dir = environment->getOverlayDir();
--                if (overlay_dir != NULL && strcmp(overlay_dir, "") != 0) {
--                    ALOGD("Regionalization - getOverlayDir:%s", overlay_dir);
--                    verifySystemIdmaps(overlay_dir);
--                }
--                delete environment;
--            }
--        }
--
--        verifySystemIdmaps(AssetManager::OVERLAY_DIR);
+-        verifySystemIdmaps();
 -    }
      AssetManager* am = new AssetManager();
      if (am == NULL) {
          jniThrowException(env, "java/lang/OutOfMemoryError", "");
 diff --git a/include/androidfw/AssetManager.h b/include/androidfw/AssetManager.h
-index 2d5f4c2f90b..0326e2b3d33 100644
+index b4a645fc8ab..1abfe1fc8ca 100644
 --- a/include/androidfw/AssetManager.h
 +++ b/include/androidfw/AssetManager.h
-@@ -238,12 +238,10 @@ public:
+@@ -244,12 +244,10 @@ public:
  private:
      struct asset_path
      {
@@ -788,7 +782,7 @@ index 2d5f4c2f90b..0326e2b3d33 100644
          bool isSystemAsset;
      };
  
-@@ -288,9 +286,6 @@ private:
+@@ -294,9 +292,6 @@ private:
  
      Asset* openIdmapLocked(const struct asset_path& ap) const;
  
@@ -798,7 +792,7 @@ index 2d5f4c2f90b..0326e2b3d33 100644
      class SharedZip : public RefBase {
      public:
          static sp<SharedZip> get(const String8& path, bool createIfNotPresent = true);
-@@ -305,9 +300,6 @@ private:
+@@ -311,9 +306,6 @@ private:
          
          bool isUpToDate();
  
@@ -808,7 +802,7 @@ index 2d5f4c2f90b..0326e2b3d33 100644
      protected:
          ~SharedZip();
  
-@@ -322,8 +314,6 @@ private:
+@@ -328,8 +320,6 @@ private:
          Asset* mResourceTableAsset;
          ResTable* mResourceTable;
  
@@ -817,22 +811,20 @@ index 2d5f4c2f90b..0326e2b3d33 100644
          static Mutex gLock;
          static DefaultKeyedVector<String8, wp<SharedZip> > gOpen;
      };
-@@ -357,9 +347,8 @@ private:
+@@ -363,8 +353,6 @@ private:
  
          bool isUpToDate();
  
 -        void addOverlay(const String8& path, const asset_path& overlay);
 -        bool getOverlay(const String8& path, size_t idx, asset_path* out) const;
          void closeZipFromPath(const String8& zip);
-+
      private:
          void closeZip(int idx);
 diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp
-index c0e8a980c2d..b9954573d79 100644
+index 6319d893cc8..5eae1459444 100644
 --- a/libs/androidfw/AssetManager.cpp
 +++ b/libs/androidfw/AssetManager.cpp
-@@ -214,15 +214,6 @@ bool AssetManager::addAssetPath(
+@@ -215,15 +215,6 @@ bool AssetManager::addAssetPath(
          *cookie = static_cast<int32_t>(mAssetPaths.size());
      }
  
@@ -848,7 +840,7 @@ index c0e8a980c2d..b9954573d79 100644
      if (mResources != NULL) {
          appendPathToResTable(ap, appAsLib);
      }
-@@ -606,11 +597,6 @@ FileType AssetManager::getFileType(const char* fileName)
+@@ -607,11 +598,6 @@ FileType AssetManager::getFileType(const char* fileName)
  }
  
  bool AssetManager::appendPathToResTable(const asset_path& ap, bool appAsLib) const {
@@ -860,7 +852,7 @@ index c0e8a980c2d..b9954573d79 100644
      Asset* ass = NULL;
      ResTable* sharedRes = NULL;
      bool shared = true;
-@@ -652,14 +638,6 @@ bool AssetManager::appendPathToResTable(const asset_path& ap, bool appAsLib) con
+@@ -653,14 +639,6 @@ bool AssetManager::appendPathToResTable(const asset_path& ap, bool appAsLib) con
                  ALOGV("Creating shared resources for %s", ap.path.string());
                  sharedRes = new ResTable();
                  sharedRes->add(ass, idmap, nextEntryIdx + 1, false);
@@ -875,7 +867,7 @@ index c0e8a980c2d..b9954573d79 100644
                  sharedRes = const_cast<AssetManager*>(this)->
                      mZipSet.setZipResourceTable(ap.path, sharedRes);
              }
-@@ -772,66 +750,6 @@ Asset* AssetManager::openIdmapLocked(const struct asset_path& ap) const
+@@ -773,65 +751,6 @@ Asset* AssetManager::openIdmapLocked(const struct asset_path& ap) const
      return ass;
  }
  
@@ -921,7 +913,6 @@ index c0e8a980c2d..b9954573d79 100644
 -            sharedRes->add(oass, oidmap, offset + 1, false);
 -            const_cast<AssetManager*>(this)->mAssetPaths.add(oap);
 -            const_cast<AssetManager*>(this)->mZipSet.addOverlay(targetPackagePath, oap);
--
 -            oidmap->close();
 -            delete oidmap;
 -            ALOGD("close idmap=%s pid=%d\n", oap.idmap.string(), getpid());
@@ -930,8 +921,8 @@ index c0e8a980c2d..b9954573d79 100644
 -        if (oap.path.find(OVERLAY_DIR) != -1) {
 -           const_cast<AssetManager*>(this)->mZipSet.closeZipFromPath(oap.path);
 -           ALOGD("close: %s and reset entry\n", oap.path.string());
--      }
--  }
+-       }
+-   }
 -
 -#ifndef _WIN32
 -    TEMP_FAILURE_RETRY(flock(fileno(fin), LOCK_UN));
@@ -942,7 +933,7 @@ index c0e8a980c2d..b9954573d79 100644
  const ResTable& AssetManager::getResources(bool required) const
  {
      const ResTable* rt = getResTable(required);
-@@ -1970,20 +1888,6 @@ bool AssetManager::SharedZip::isUpToDate()
+@@ -1970,20 +1889,6 @@ bool AssetManager::SharedZip::isUpToDate()
      return mModWhen == modWhen;
  }
  
@@ -963,7 +954,7 @@ index c0e8a980c2d..b9954573d79 100644
  AssetManager::SharedZip::~SharedZip()
  {
      if (kIsDebug) {
-@@ -2125,22 +2029,6 @@ bool AssetManager::ZipSet::isUpToDate()
+@@ -2125,22 +2030,6 @@ bool AssetManager::ZipSet::isUpToDate()
      return true;
  }
  
@@ -987,7 +978,7 @@ index c0e8a980c2d..b9954573d79 100644
   * Compute the zip file's index.
   *
 diff --git a/services/core/java/com/android/server/SystemServiceManager.java b/services/core/java/com/android/server/SystemServiceManager.java
-index 90f507c146b..904c967acdc 100644
+index a0c80fe666e..0aad4c74b05 100644
 --- a/services/core/java/com/android/server/SystemServiceManager.java
 +++ b/services/core/java/com/android/server/SystemServiceManager.java
 @@ -16,6 +16,7 @@
@@ -998,7 +989,7 @@ index 90f507c146b..904c967acdc 100644
  import android.content.Context;
  import android.os.Trace;
  import android.util.Slog;
-@@ -104,22 +105,25 @@ public class SystemServiceManager {
+@@ -105,22 +106,25 @@ public class SystemServiceManager {
                          + ": service constructor threw an exception", ex);
              }
  
@@ -1035,10 +1026,10 @@ index 90f507c146b..904c967acdc 100644
       * Starts the specified boot phase for all system services that have been started up to
       * this point.
 diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
-index a3923b94ef9..f4d07aff3e6 100644
+index 2e73c72db93..a94822e5698 100644
 --- a/services/core/java/com/android/server/am/ActivityManagerService.java
 +++ b/services/core/java/com/android/server/am/ActivityManagerService.java
-@@ -19344,6 +19344,57 @@ public final class ActivityManagerService extends ActivityManagerNative
+@@ -19376,6 +19376,57 @@ public final class ActivityManagerService extends ActivityManagerNative
      }
  
      /**
@@ -1169,10 +1160,10 @@ index ec148dd9fa7..761ef5240ec 100644
  
      private void schedulePersistSettings() {
 diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
-index 7860bbdaf5d..1d9a5906f34 100644
+index 3aacfb43913..298a9df359d 100644
 --- a/services/core/java/com/android/server/pm/PackageManagerService.java
 +++ b/services/core/java/com/android/server/pm/PackageManagerService.java
-@@ -400,17 +400,16 @@ public class PackageManagerService extends IPackageManager.Stub {
+@@ -399,17 +399,16 @@ public class PackageManagerService extends IPackageManager.Stub {
      static final int SCAN_UPDATE_TIME = 1<<6;
      static final int SCAN_DEFER_DEX = 1<<7;
      static final int SCAN_BOOTING = 1<<8;
@@ -1200,7 +1191,7 @@ index 7860bbdaf5d..1d9a5906f34 100644
  
      private static final int[] EMPTY_INT_ARRAY = new int[0];
  
-@@ -601,10 +600,6 @@ public class PackageManagerService extends IPackageManager.Stub {
+@@ -603,10 +602,6 @@ public class PackageManagerService extends IPackageManager.Stub {
      final ArrayMap<String, Set<String>> mKnownCodebase =
              new ArrayMap<String, Set<String>>();
  
@@ -1211,9 +1202,16 @@ index 7860bbdaf5d..1d9a5906f34 100644
      /**
       * Tracks new system packages [received in an OTA] that we expect to
       * find updated user-installed versions. Keys are package name, values
-@@ -2347,8 +2342,8 @@ public class PackageManagerService extends IPackageManager.Stub {
-             File vendorOverlayDir = new File(VENDOR_OVERLAY_DIR);
-             scanDirTracedLI(vendorOverlayDir, mDefParseFlags
+@@ -2354,13 +2349,13 @@ public class PackageManagerService extends IPackageManager.Stub {
+             if (!overlayThemeDir.isEmpty()) {
+                 scanDirTracedLI(new File(VENDOR_OVERLAY_DIR, overlayThemeDir), mDefParseFlags
+                         | PackageParser.PARSE_IS_SYSTEM
+-                        | PackageParser.PARSE_IS_SYSTEM_DIR
+-                        | PackageParser.PARSE_TRUSTED_OVERLAY, scanFlags | SCAN_TRUSTED_OVERLAY, 0);
++                        | PackageParser.PARSE_IS_SYSTEM_DIR,
++                        scanFlags, 0);
+             }
+             scanDirTracedLI(new File(VENDOR_OVERLAY_DIR), mDefParseFlags
                      | PackageParser.PARSE_IS_SYSTEM
 -                    | PackageParser.PARSE_IS_SYSTEM_DIR
 -                    | PackageParser.PARSE_TRUSTED_OVERLAY, scanFlags | SCAN_TRUSTED_OVERLAY, 0);
@@ -1222,16 +1220,7 @@ index 7860bbdaf5d..1d9a5906f34 100644
  
              // Find base frameworks (resource packages without code).
              scanDirTracedLI(frameworkDir, mDefParseFlags
-@@ -2405,7 +2400,7 @@ public class PackageManagerService extends IPackageManager.Stub {
-                     // Collect overlay in <Package>/system/vendor
-                     scanDirLI(new File(RegionalizationSystemDir, "vendor/overlay"),
-                             PackageParser.PARSE_IS_SYSTEM | PackageParser.PARSE_IS_SYSTEM_DIR,
--                            scanFlags | SCAN_TRUSTED_OVERLAY, 0);
-+                            scanFlags, 0);
-                 }
-             }
-@@ -6732,60 +6727,6 @@ public class PackageManagerService extends IPackageManager.Stub {
+@@ -6719,60 +6714,6 @@ public class PackageManagerService extends IPackageManager.Stub {
          return finalList;
      }
  
@@ -1292,7 +1281,7 @@ index 7860bbdaf5d..1d9a5906f34 100644
      private void scanDirTracedLI(File dir, final int parseFlags, int scanFlags, long currentTime) {
          Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "scanDir");
          try {
-@@ -6973,10 +6914,6 @@ public class PackageManagerService extends IPackageManager.Stub {
+@@ -6954,10 +6895,6 @@ public class PackageManagerService extends IPackageManager.Stub {
          pp.setOnlyPowerOffAlarmApps(mOnlyPowerOffAlarm);
          pp.setDisplayMetrics(mMetrics);
  
@@ -1303,7 +1292,7 @@ index 7860bbdaf5d..1d9a5906f34 100644
          Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "parsePackage");
          final PackageParser.Package pkg;
          try {
-@@ -8209,7 +8146,6 @@ public class PackageManagerService extends IPackageManager.Stub {
+@@ -8190,7 +8127,6 @@ public class PackageManagerService extends IPackageManager.Stub {
              pkg.applicationInfo.privateFlags &=
                      ~ApplicationInfo.PRIVATE_FLAG_DIRECT_BOOT_AWARE;
          }
@@ -1311,7 +1300,7 @@ index 7860bbdaf5d..1d9a5906f34 100644
  
          if ((policyFlags&PackageParser.PARSE_IS_PRIVILEGED) != 0) {
              pkg.applicationInfo.privateFlags |= ApplicationInfo.PRIVATE_FLAG_PRIVILEGED;
-@@ -8804,7 +8740,6 @@ public class PackageManagerService extends IPackageManager.Stub {
+@@ -8785,7 +8721,6 @@ public class PackageManagerService extends IPackageManager.Stub {
          // writer
          Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "updateSettings");
  
@@ -1319,7 +1308,7 @@ index 7860bbdaf5d..1d9a5906f34 100644
          synchronized (mPackages) {
              // We don't expect installation to fail beyond this point
  
-@@ -9151,36 +9086,10 @@ public class PackageManagerService extends IPackageManager.Stub {
+@@ -9132,36 +9067,10 @@ public class PackageManagerService extends IPackageManager.Stub {
              }
  
              pkgSetting.setTimeStamp(scanFileTime);
@@ -1356,7 +1345,7 @@ index 7860bbdaf5d..1d9a5906f34 100644
          return pkg;
      }
  
-@@ -16627,7 +16536,7 @@ public class PackageManagerService extends IPackageManager.Stub {
+@@ -16628,7 +16537,7 @@ public class PackageManagerService extends IPackageManager.Stub {
                      false /*hidden*/, false /*suspended*/, null, null, null,
                      false /*blockUninstall*/,
                      ps.readUserState(nextUserId).domainVerificationStatus, 0,
@@ -1365,7 +1354,7 @@ index 7860bbdaf5d..1d9a5906f34 100644
          }
      }
  
-@@ -21492,14 +21401,13 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
+@@ -21498,14 +21407,13 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
  
          @Override
          public void setResourceDirs(int userId, String packageName, String[] resourceDirs) {
@@ -1458,7 +1447,7 @@ index 285b5bbf3ec..f00080ce739 100755
                      readPreferredActivitiesLPw(parser, userId);
                  } else if (tagName.equals(TAG_PERSISTENT_PREFERRED_ACTIVITIES)) {
 diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
-index 6f2141708ed..ab425c05e95 100644
+index ef4fc252640..6e973b785f6 100644
 --- a/services/java/com/android/server/SystemServer.java
 +++ b/services/java/com/android/server/SystemServer.java
 @@ -85,6 +85,7 @@ import com.android.server.media.projection.MediaProjectionManagerService;
@@ -1469,7 +1458,7 @@ index 6f2141708ed..ab425c05e95 100644
  import com.android.server.os.RegionalizationService;
  import com.android.server.os.SchedulingPolicyService;
  import com.android.server.pm.BackgroundDexOptService;
-@@ -531,6 +532,9 @@ public final class SystemServer {
+@@ -537,6 +538,9 @@ public final class SystemServer {
          // Set up the Application instance for the system process and get started.
          mActivityManagerService.setSystemProcess();
  
index 17a2788360242aa12f0a51b638af58e65b0982ee..8ebcc3bdc07c8fccdb4b2f7bae1e0ad5b5f29db0 100644 (file)
@@ -1,7 +1,7 @@
-From fcda98ecae5ad3adfaf7ed92ef52c85a5fbcdef3 Mon Sep 17 00:00:00 2001
+From cb7d5a91445c6a76a2388b57f65d1982a64e55bb 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/44] OMS7-N: Set EXTRA_REPLACING correctly in
+Subject: [PATCH 04/47] OMS7-N: Set EXTRA_REPLACING correctly in
  ACTION_PACKAGE_ADDED [4/11]
 
 When broadcasting ACTION_PACKAGE_ADDED the recipients of the Intent are
@@ -35,10 +35,10 @@ Change-Id: Icf869013d5d652de4bf0f6df4529b7a68d35a25c
  1 file changed, 1 insertion(+)
 
 diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
-index 1d9a5906f34..f1dfbae5eda 100644
+index 298a9df359d..0aee826c411 100644
 --- a/services/core/java/com/android/server/pm/PackageManagerService.java
 +++ b/services/core/java/com/android/server/pm/PackageManagerService.java
-@@ -1718,6 +1718,7 @@ public class PackageManagerService extends IPackageManager.Stub {
+@@ -1722,6 +1722,7 @@ public class PackageManagerService extends IPackageManager.Stub {
  
                  // Send added for users that don't see the package for the first time
                  if (update) {
index b6ca391e9a49223302b9e8b4cea3bf889ec8c6d6..66cebcdf06daca89a51122a4b79ede483b11b23c 100644 (file)
@@ -1,7 +1,7 @@
-From 66ca00234a6b26d0bff0b0ecef353d5d295ad5bc Mon Sep 17 00:00:00 2001
+From 51337c08f01e1ea59cefddf87e264cce0a2c3112 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/44] OMS7-N: idmap: suppress print for padded resources
+Subject: [PATCH 05/47] OMS7-N: idmap: suppress print for padded resources
  [5/11]
 
 Change-Id: I565ccf515068b96927e4317cc9c06543415bb324
index 517da42c210676d63f8baf6a87ebb7e9755672b9..591ad0b1fb369f6eb6440b367761670c2dde3195 100644 (file)
@@ -1,7 +1,7 @@
-From 1d7b5b5e6be2f5907ce930be3702c29d83bf26ac Mon Sep 17 00:00:00 2001
+From e7c0bc5092c738b357aef95eee4bc967d8972081 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/44] OMS7-N: Fix memory leak during idmap creation [6/11]
+Subject: [PATCH 06/47] OMS7-N: Fix memory leak during idmap creation [6/11]
 
 Plug a memory leak in AssetManager::createIdmap.
 
@@ -11,10 +11,10 @@ Change-Id: Ieed805c596df931e2167ebb47c1b2907d6bf67f4
  1 file changed, 25 insertions(+), 13 deletions(-)
 
 diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp
-index b9954573d79..ef580e386ab 100644
+index 5eae1459444..8669f243fee 100644
 --- a/libs/androidfw/AssetManager.cpp
 +++ b/libs/androidfw/AssetManager.cpp
-@@ -291,22 +291,34 @@ bool AssetManager::createIdmap(const char* targetApkPath, const char* overlayApk
+@@ -292,22 +292,34 @@ bool AssetManager::createIdmap(const char* targetApkPath, const char* overlayApk
  {
      AutoMutex _l(mLock);
      const String8 paths[2] = { String8(targetApkPath), String8(overlayApkPath) };
index 633229529d874185ae221f8c04e2049ec538ce7c..32bd1a635f0c69b97077a3029498f503eeecb6fb 100644 (file)
@@ -1,7 +1,7 @@
-From dd4278a14958fe23e8bcb333834db4eecf8b28d1 Mon Sep 17 00:00:00 2001
+From 94df6a3b5b4c5d7f160b33ac972b8c3d33868b9a 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/44] OMS7-N: installd: add command 'rmidmap' [7/11]
+Subject: [PATCH 07/47] 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
index 73285100bd3d1333a97cbce5e6da7745a89bc9e3..07b3288496d733b3ede8329f5e0fe74d75e391f6 100644 (file)
@@ -1,7 +1,7 @@
-From 74a8673ac19a22470fba00d2074678bfdcb33ca0 Mon Sep 17 00:00:00 2001
+From 3ff68dce5cd9bd2b6f09816ff324e85f4b3f7a9b 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/44] OMS7-N: Disable Zygote preloaded drawables [8/11]
+Subject: [PATCH 08/47] 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
@@ -19,10 +19,10 @@ Change-Id: I253b1a22482ac664c196533a4c2fcd88ae84b996
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java
-index 20f84b52d19..455849e0c19 100644
+index cc71d37ea1c..8278b90de0d 100644
 --- a/core/java/com/android/internal/os/ZygoteInit.java
 +++ b/core/java/com/android/internal/os/ZygoteInit.java
-@@ -108,7 +108,7 @@ public class ZygoteInit {
+@@ -109,7 +109,7 @@ public class ZygoteInit {
      private static final String PRELOADED_CLASSES = "/system/etc/preloaded-classes";
  
      /** Controls whether we should preload resources during zygote init. */
@@ -31,7 +31,7 @@ index 20f84b52d19..455849e0c19 100644
  
      /**
       * Registers a server socket for zygote command connections
-@@ -437,6 +437,8 @@ public class ZygoteInit {
+@@ -440,6 +440,8 @@ public class ZygoteInit {
                      Log.i(TAG, "...preloaded " + N + " resource in "
                              + (SystemClock.uptimeMillis() - startTime) + "ms.");
                  }
index e4b90d6adfe28957c0da8350603ff69ea81f1be4..5edcda47ca597ad5b955b6165f5c04941a2b9b90 100644 (file)
@@ -1,7 +1,7 @@
-From 6dca35a8d93847e1b1e92861cf1d3ea4dd499790 Mon Sep 17 00:00:00 2001
+From fa6affd0e6101b05268d8f838a5eb74a447b231b 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/44] OMS7-N: Persistence on boot through
+Subject: [PATCH 09/47] OMS7-N: Persistence on boot through
  OverlayManagerServiceImpl [9/11]
 
 Overlays should not be enforced by the traditional OverlayManagerService
index a87c8997c123011a8b5b8aa29ae1f6e902ade0f8..c8e97bf3b76f70d6d25b79b348c865634003fb2f 100644 (file)
@@ -1,7 +1,7 @@
-From 64df193733d7f4ff9ee3a18cf2708fb40c915f88 Mon Sep 17 00:00:00 2001
+From 0128c1fcd6675c009fccfd8c2fd8247a73cfa1ec 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/44] OMS7-N: Do not enforce code policy limiting overlay
+Subject: [PATCH 10/47] OMS7-N: Do not enforce code policy limiting overlay
  installation [10/11]
 
 Change-Id: Iea317f3771f25dbfcbf4938e88cace12fd97d7eb
@@ -10,10 +10,10 @@ Change-Id: Iea317f3771f25dbfcbf4938e88cace12fd97d7eb
  1 file changed, 4 deletions(-)
 
 diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
-index f1dfbae5eda..a57b79af02e 100644
+index 0aee826c411..6c89c2e2129 100644
 --- a/services/core/java/com/android/server/pm/PackageManagerService.java
 +++ b/services/core/java/com/android/server/pm/PackageManagerService.java
-@@ -8152,10 +8152,6 @@ public class PackageManagerService extends IPackageManager.Stub {
+@@ -8133,10 +8133,6 @@ public class PackageManagerService extends IPackageManager.Stub {
              pkg.applicationInfo.privateFlags |= ApplicationInfo.PRIVATE_FLAG_PRIVILEGED;
          }
  
index 3d1ae905e73104fd9e0fd38be9b91fd12201e18c..85f6a5f3ada7a56d21f2e6ad7ec24ef3fe97368a 100644 (file)
@@ -1,7 +1,7 @@
-From b92d08f68e8898ec81eea49b32e650acd09db543 Mon Sep 17 00:00:00 2001
+From 38655468244c789bba45df44e022e334ef8d14d8 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/44] OMS7-N: Implement multi-target enable/disable and
+Subject: [PATCH 11/47] 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
diff --git a/patches/frameworks/base/0012-N-Extras-Add-dynamic-theme-BootAnimation-support.patch b/patches/frameworks/base/0012-N-Extras-Add-dynamic-theme-BootAnimation-support.patch
new file mode 100644 (file)
index 0000000..541cc69
--- /dev/null
@@ -0,0 +1,38 @@
+From 6401e0731359e93a0ab6d27e2482fcc4115e864c Mon Sep 17 00:00:00 2001
+From: 0xD34D <clark@scheffsblend.com>
+Date: Mon, 20 Jun 2016 22:59:48 +0300
+Subject: [PATCH 12/47] N-Extras: Add dynamic theme BootAnimation support
+
+Extracted from "Themes: Port to CM13 [1/3]"
+http://review.cyanogenmod.org/#/c/113273/14
+
+Change-Id: I394897c10f02695f0416e87e9bf960e840bcb3b7
+---
+ cmds/bootanimation/BootAnimation.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
+index 10fabcfb735..53e4965eccc 100644
+--- a/cmds/bootanimation/BootAnimation.cpp
++++ b/cmds/bootanimation/BootAnimation.cpp
+@@ -65,6 +65,7 @@ namespace android {
+ static const char OEM_BOOTANIMATION_FILE[] = "/oem/media/bootanimation.zip";
+ static const char SYSTEM_BOOTANIMATION_FILE[] = "/system/media/bootanimation.zip";
+ static const char SYSTEM_ENCRYPTED_BOOTANIMATION_FILE[] = "/system/media/bootanimation-encrypted.zip";
++static const char THEME_BOOTANIMATION_FILE[] = "/data/system/theme/bootanimation.zip";
+ static const char SYSTEM_DATA_DIR_PATH[] = "/data/system";
+ static const char SYSTEM_TIME_DIR_NAME[] = "time";
+ static const char SYSTEM_TIME_DIR_PATH[] = "/data/system/time";
+@@ -322,6 +323,9 @@ status_t BootAnimation::readyToRun() {
+     if (encryptedAnimation && (access(SYSTEM_ENCRYPTED_BOOTANIMATION_FILE, R_OK) == 0)) {
+         mZipFileName = SYSTEM_ENCRYPTED_BOOTANIMATION_FILE;
+     }
++    else if (access(THEME_BOOTANIMATION_FILE, R_OK) == 0) {
++        mZipFileName = THEME_BOOTANIMATION_FILE;
++    }
+     else if (access(OEM_BOOTANIMATION_FILE, R_OK) == 0) {
+         mZipFileName = OEM_BOOTANIMATION_FILE;
+     }
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0012-Themes-Expose-resolver-hardcoded-colors.patch b/patches/frameworks/base/0012-Themes-Expose-resolver-hardcoded-colors.patch
deleted file mode 100644 (file)
index 9eabae8..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-From 9c8d1caf4ceed49cce6f8d314f1a8a8867ac21a2 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/44] Themes: Expose resolver hardcoded colors
-
-commit dbbd5e70cc65002df41561474b03362022dd6716
-Author: Dave Kover <dkover@cyngn.com>
-Date:   Wed Feb 18 16:11:14 2015 -0800
-
-    Themes: Expose resolver hardcoded colors
-
-    Expose background colors of the resolver list.
-
-    Change-Id: I3a0a460c5ffe0f5057b3b9ec92faa7a3e09c9e01
-
-commit 0343eb126f3901a3857791137f74fa805bb9d75c
-Author: Thyrus11 <thyrus11@gmail.com>
-Date:   Sat Feb 21 07:19:42 2015 +0100
-
-    Themes: Make resolver list fully themeable
-
-    Follow-up on commit cc9e3b8fcba95b911d1cda36f7770c410058aa8b.
-
-    Change-Id: I3f006a1157db9d0b151a4fe8edf50e7edc7a0b9f
-
-commit c7d973809488b801e8c708d740009f1233bb762e
-Author: Nicholas Chum <nicholaschum@gmail.com>
-Date:   Sun Nov 8 05:27:28 2015 -0500
-
-    Themes: Allow Resolver List BG to be fully themed
-
-    We are able to trace the activity of the new resolver/chooser through
-    different
-    methods, thus leading us to the Java file:
-    \com\android\internal\app\ChooserActivity.java
-    Here we see that the exposed "chooser_service_row_background_color" is
-    available, but not the rest of the activity, so we look into R.layout's,
-    and we
-    find chooser_grid to be the only one containing hardcoded
-    "@color/white" values (as this is framework, we assume this is also
-    known as
-    "@android:color/white" to themers).
-
-    Expose all "@color/white" values from this file to resolver_list_bg.
-
-    Change-Id: I286d92b5d1f672c8adb3c0af1951793521536d90
-
-Change-Id: Iec7951147bbbc99aee6b06ae50c1acc7b9c01a7f
----
- core/res/res/layout/chooser_grid.xml                 |  6 +++---
- .../res/layout/resolver_different_item_header.xml    |  2 +-
- core/res/res/layout/resolver_list.xml                |  8 ++++----
- core/res/res/layout/resolver_list_with_default.xml   |  6 +++---
- core/res/res/values/projekt_colors.xml               | 20 ++++++++++++++++++++
- 5 files changed, 31 insertions(+), 11 deletions(-)
- create mode 100644 core/res/res/values/projekt_colors.xml
-
-diff --git a/core/res/res/layout/chooser_grid.xml b/core/res/res/layout/chooser_grid.xml
-index d8dd447e6a7..78c2e05f372 100644
---- a/core/res/res/layout/chooser_grid.xml
-+++ b/core/res/res/layout/chooser_grid.xml
-@@ -31,7 +31,7 @@
-             android:layout_alwaysShow="true"
-             android:elevation="8dp"
-             android:paddingStart="16dp"
--            android:background="@color/white" >
-+            android:background="@color/resolver_list_bg" >
-         <TextView android:id="@+id/profile_button"
-                   android:layout_width="wrap_content"
-                   android:layout_height="48dp"
-@@ -74,7 +74,7 @@
-             android:id="@+id/resolver_list"
-             android:clipToPadding="false"
-             android:scrollbarStyle="outsideOverlay"
--            android:background="@color/white"
-+            android:background="@color/resolver_list_bg"
-             android:elevation="8dp"
-             android:listSelector="@color/transparent"
-             android:divider="@null"
-@@ -85,7 +85,7 @@
-               android:layout_width="match_parent"
-               android:layout_height="wrap_content"
-               android:layout_alwaysShow="true"
--              android:background="@color/white"
-+              android:background="@color/resolver_list_bg"
-               android:text="@string/noApplications"
-               android:padding="32dp"
-               android:gravity="center"
-diff --git a/core/res/res/layout/resolver_different_item_header.xml b/core/res/res/layout/resolver_different_item_header.xml
-index 58891363e20..201c8c686fe 100644
---- a/core/res/res/layout/resolver_different_item_header.xml
-+++ b/core/res/res/layout/resolver_different_item_header.xml
-@@ -29,6 +29,6 @@
-     android:paddingEnd="16dp"
-     android:paddingTop="8dp"
-     android:paddingBottom="8dp"
--    android:background="@color/white"
-+    android:background="@color/resolver_list_bg"
-     android:elevation="8dp"
-     />
-diff --git a/core/res/res/layout/resolver_list.xml b/core/res/res/layout/resolver_list.xml
-index c4e8e9cb63b..1b6230a5a09 100644
---- a/core/res/res/layout/resolver_list.xml
-+++ b/core/res/res/layout/resolver_list.xml
-@@ -30,7 +30,7 @@
-         android:layout_height="wrap_content"
-         android:layout_alwaysShow="true"
-         android:elevation="8dp"
--        android:background="@color/white">
-+        android:background="@color/resolver_list_bg">
-         <TextView
-             android:id="@+id/profile_button"
-@@ -69,7 +69,7 @@
-         android:id="@+id/resolver_list"
-         android:clipToPadding="false"
-         android:scrollbarStyle="outsideOverlay"
--        android:background="@color/white"
-+        android:background="@color/resolver_list_bg"
-         android:elevation="8dp"
-         android:nestedScrollingEnabled="true"
-         android:scrollIndicators="top|bottom"
-@@ -78,7 +78,7 @@
-     <TextView android:id="@+id/empty"
-               android:layout_width="match_parent"
-               android:layout_height="wrap_content"
--              android:background="@color/white"
-+              android:background="@color/resolver_list_bg"
-               android:elevation="8dp"
-               android:layout_alwaysShow="true"
-               android:text="@string/noApplications"
-@@ -99,7 +99,7 @@
-         android:orientation="horizontal"
-         android:layoutDirection="locale"
-         android:measureWithLargestChild="true"
--        android:background="@color/white"
-+        android:background="@color/resolver_list_bg"
-         android:paddingTop="8dp"
-         android:paddingBottom="8dp"
-         android:paddingStart="12dp"
-diff --git a/core/res/res/layout/resolver_list_with_default.xml b/core/res/res/layout/resolver_list_with_default.xml
-index 02dc2ede430..d3baf682fe0 100644
---- a/core/res/res/layout/resolver_list_with_default.xml
-+++ b/core/res/res/layout/resolver_list_with_default.xml
-@@ -29,7 +29,7 @@
-         android:layout_height="wrap_content"
-         android:layout_alwaysShow="true"
-         android:orientation="vertical"
--        android:background="@color/white"
-+        android:background="@color/resolver_list_bg"
-         android:elevation="8dp">
-         <LinearLayout
-@@ -110,7 +110,7 @@
-             android:paddingBottom="8dp"
-             android:paddingStart="12dp"
-             android:paddingEnd="12dp"
--            android:background="@color/white"
-+            android:background="@color/resolver_list_bg"
-             android:elevation="8dp">
-             <Button
-@@ -150,7 +150,7 @@
-         android:id="@+id/resolver_list"
-         android:clipToPadding="false"
-         android:scrollbarStyle="outsideOverlay"
--        android:background="@color/white"
-+        android:background="@color/resolver_list_bg"
-         android:elevation="8dp"
-         android:nestedScrollingEnabled="true"
-         android:divider="@null" />
-diff --git a/core/res/res/values/projekt_colors.xml b/core/res/res/values/projekt_colors.xml
-new file mode 100644
-index 00000000000..c6dbc1ca1c9
---- /dev/null
-+++ b/core/res/res/values/projekt_colors.xml
-@@ -0,0 +1,20 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<!--
-+    Copyright (c) 2016 Projekt Substratum
-+
-+    Licensed under the Apache License, Version 2.0 (the "License");
-+    you may not use this file except in compliance with the License.
-+    You may obtain a copy of the License at
-+
-+        http://www.apache.org/licenses/LICENSE-2.0
-+
-+    Unless required by applicable law or agreed to in writing, software
-+    distributed under the License is distributed on an "AS IS" BASIS,
-+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+    See the License for the specific language governing permissions and
-+    limitations under the License.
-+-->
-+
-+<resources>
-+    <color name="resolver_list_bg">@color/white</color>
-+</resources>
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0013-N-Extras-Add-dynamic-theme-fonts-support.patch b/patches/frameworks/base/0013-N-Extras-Add-dynamic-theme-fonts-support.patch
new file mode 100644 (file)
index 0000000..58a3d1e
--- /dev/null
@@ -0,0 +1,600 @@
+From 13155afe5a3c9a0cc921e3626c8e4e943ac5287e Mon Sep 17 00:00:00 2001
+From: 0xD34D <clark@scheffsblend.com>
+Date: Wed, 22 Jun 2016 23:54:23 +0300
+Subject: [PATCH 13/47] 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
+demand.
+
+Extracted from Themes: Port to CM13 [1/3]
+http://review.cyanogenmod.org/#/c/113273/14
+
+Squashed:
+
+Small adjustment to Font commit
+Author camcory
+https://github.com/SubstratumResources/platform_frameworks_base/commit/a13f088dff70bc52f2053f32acff47a7a377a807
+
+Themes: Ensure themed fonts always have fallbacks
+Author 0xD34D
+https://github.com/CyanogenMod/android_frameworks_base/commit/18b301874e2a658eb01f97defd70da038521f450
+
+Themes: Let garbage collector free up native instances
+Author 0xD34D
+https://github.com/CyanogenMod/android_frameworks_base/commit/b7108ea9ce7ad2226aa6340046d24e069c6e8e21
+
+Themes: Make parse() method in FontListParser public
+Author 0xD34D
+https://github.com/CyanogenMod/android_frameworks_base/commit/b3ae4609f2754fd156e34dfbf39551041e976031
+
+Fonts: add sans-serif fallback fonts first
+Author 0xD34D
+https://github.com/CyanogenMod/android_frameworks_base/commit/f1d7b86dd267ed5b59e51339edc4553d37561a39
+
+Themes: Add config change flag for font change
+Author 0xD34D
+https://github.com/CyanogenMod/android_frameworks_base/commit/2ec1a33b70d3c013daa956696b68167a5eeef70d
+
+Themes: don't recreateDefaults on typeface when locale changes
+Author romanbb
+https://github.com/CyanogenMod/android_frameworks_base/commit/e05ffea4ea55a4eb6b40436a864a570509eb33ac
+
+Change-Id: I1f61bd269b42ab6145482a51d25fe5b1b5308f94
+---
+ core/java/android/app/ActivityThread.java          |   7 +-
+ core/java/android/content/pm/ActivityInfo.java     |   5 +
+ core/java/android/content/res/Configuration.java   |   5 +-
+ core/java/android/os/Process.java                  |   7 +-
+ .../com/android/internal/os/ZygoteConnection.java  |  10 ++
+ graphics/java/android/graphics/FontListParser.java |  48 ++++--
+ graphics/java/android/graphics/Typeface.java       | 174 +++++++++++++++++++--
+ .../android/server/am/ActivityManagerService.java  |  11 +-
+ 8 files changed, 240 insertions(+), 27 deletions(-)
+
+diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
+index 9e479ec6772..0061062943a 100644
+--- a/core/java/android/app/ActivityThread.java
++++ b/core/java/android/app/ActivityThread.java
+@@ -48,6 +48,7 @@ import android.database.sqlite.SQLiteDebug;
+ import android.database.sqlite.SQLiteDebug.DbStats;
+ import android.graphics.Bitmap;
+ import android.graphics.Canvas;
++import android.graphics.Typeface;
+ import android.hardware.display.DisplayManagerGlobal;
+ import android.net.ConnectivityManager;
+ import android.net.IConnectivityManager;
+@@ -4853,8 +4854,12 @@ public final class ActivityThread {
+         if (configDiff != 0) {
+             // Ask text layout engine to free its caches if there is a locale change
+             boolean hasLocaleConfigChange = ((configDiff & ActivityInfo.CONFIG_LOCALE) != 0);
+-            if (hasLocaleConfigChange) {
++            boolean hasFontConfigChange = ((configDiff & ActivityInfo.CONFIG_THEME_FONT) != 0);
++            if (hasLocaleConfigChange || hasFontConfigChange) {
+                 Canvas.freeTextLayoutCaches();
++                if (hasFontConfigChange) {
++                    Typeface.recreateDefaults();
++                }
+                 if (DEBUG_CONFIGURATION) Slog.v(TAG, "Cleared TextLayout Caches");
+             }
+         }
+diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java
+index 5a09c0028cd..42febcfe59c 100644
+--- a/core/java/android/content/pm/ActivityInfo.java
++++ b/core/java/android/content/pm/ActivityInfo.java
+@@ -624,6 +624,11 @@ public class ActivityInfo extends ComponentInfo
+      */
+     public static final int CONFIG_LAYOUT_DIRECTION = 0x2000;
+     /**
++     * Bit in {@link #configChanges} that indicates a font change occurred
++     * @hide
++     */
++    public static final int CONFIG_THEME_FONT = 0x200000;
++    /**
+      * Bit in {@link #configChanges} that indicates that the activity
+      * can itself handle changes to the font scaling factor.  Set from the
+      * {@link android.R.attr#configChanges} attribute.  This is
+diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java
+index b2d518c56ca..2f7c3ec18dc 100644
+--- a/core/java/android/content/res/Configuration.java
++++ b/core/java/android/content/res/Configuration.java
+@@ -955,6 +955,7 @@ public final class Configuration implements Parcelable, Comparable<Configuration
+         int changed = 0;
+         if (delta.fontScale > 0 && fontScale != delta.fontScale) {
+             changed |= ActivityInfo.CONFIG_FONT_SCALE;
++            changed |= ActivityInfo.CONFIG_THEME_FONT;
+             fontScale = delta.fontScale;
+         }
+         if (delta.mcc != 0 && mcc != delta.mcc) {
+@@ -1121,6 +1122,7 @@ public final class Configuration implements Parcelable, Comparable<Configuration
+         int changed = 0;
+         if (delta.fontScale > 0 && fontScale != delta.fontScale) {
+             changed |= ActivityInfo.CONFIG_FONT_SCALE;
++            changed |= ActivityInfo.CONFIG_THEME_FONT;
+         }
+         if (delta.mcc != 0 && mcc != delta.mcc) {
+             changed |= ActivityInfo.CONFIG_MCC;
+@@ -1211,7 +1213,8 @@ public final class Configuration implements Parcelable, Comparable<Configuration
+      */
+     public static boolean needNewResources(@Config int configChanges,
+             @Config int interestingChanges) {
+-        return (configChanges & (interestingChanges|ActivityInfo.CONFIG_FONT_SCALE)) != 0;
++        return (configChanges & (interestingChanges|ActivityInfo.CONFIG_FONT_SCALE|
++                    ActivityInfo.CONFIG_THEME_FONT)) != 0;
+     }
+     /**
+diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java
+index e1b7fdad25e..6dcd045b07f 100644
+--- a/core/java/android/os/Process.java
++++ b/core/java/android/os/Process.java
+@@ -516,11 +516,12 @@ public class Process {
+                                   String abi,
+                                   String instructionSet,
+                                   String appDataDir,
++                                  boolean refreshTheme,
+                                   String[] zygoteArgs) {
+         try {
+             return startViaZygote(processClass, niceName, uid, gid, gids,
+                     debugFlags, mountExternal, targetSdkVersion, seInfo,
+-                    abi, instructionSet, appDataDir, zygoteArgs);
++                    abi, instructionSet, appDataDir, refreshTheme, zygoteArgs);
+         } catch (ZygoteStartFailedEx ex) {
+             Log.e(LOG_TAG,
+                     "Starting VM process through Zygote failed");
+@@ -648,6 +649,7 @@ public class Process {
+                                   String abi,
+                                   String instructionSet,
+                                   String appDataDir,
++                                  boolean refreshTheme,
+                                   String[] extraArgs)
+                                   throws ZygoteStartFailedEx {
+         synchronized(Process.class) {
+@@ -689,6 +691,9 @@ public class Process {
+             } else if (mountExternal == Zygote.MOUNT_EXTERNAL_WRITE) {
+                 argsForZygote.add("--mount-external-write");
+             }
++            if (refreshTheme) {
++                argsForZygote.add("--refresh_theme");
++            }
+             argsForZygote.add("--target-sdk-version=" + targetSdkVersion);
+             //TODO optionally enable debuger
+diff --git a/core/java/com/android/internal/os/ZygoteConnection.java b/core/java/com/android/internal/os/ZygoteConnection.java
+index 85d84bb3f98..81257f0d341 100644
+--- a/core/java/com/android/internal/os/ZygoteConnection.java
++++ b/core/java/com/android/internal/os/ZygoteConnection.java
+@@ -22,6 +22,7 @@ import static android.system.OsConstants.STDERR_FILENO;
+ import static android.system.OsConstants.STDIN_FILENO;
+ import static android.system.OsConstants.STDOUT_FILENO;
++import android.graphics.Typeface;
+ import android.net.Credentials;
+ import android.net.LocalSocket;
+ import android.os.Process;
+@@ -194,6 +195,10 @@ class ZygoteConnection {
+                 Os.fcntlInt(childPipeFd, F_SETFD, 0);
+             }
++            if (parsedArgs.refreshTheme) {
++                Typeface.recreateDefaults();
++            }
++
+             /**
+              * In order to avoid leaking descriptors to the Zygote child,
+              * the native code must close the two Zygote socket descriptors
+@@ -373,6 +378,9 @@ class ZygoteConnection {
+          */
+         String appDataDir;
++        /** from --refresh_theme */
++        boolean refreshTheme;
++
+         /**
+          * Constructs instance and parses args
+          * @param args zygote command-line args
+@@ -531,6 +539,8 @@ class ZygoteConnection {
+                     instructionSet = arg.substring(arg.indexOf('=') + 1);
+                 } else if (arg.startsWith("--app-data-dir=")) {
+                     appDataDir = arg.substring(arg.indexOf('=') + 1);
++                } else if (arg.equals("--refresh_theme")) {
++                    refreshTheme = true;
+                 } else {
+                     break;
+                 }
+diff --git a/graphics/java/android/graphics/FontListParser.java b/graphics/java/android/graphics/FontListParser.java
+index 7871aa81dde..f4590c94647 100644
+--- a/graphics/java/android/graphics/FontListParser.java
++++ b/graphics/java/android/graphics/FontListParser.java
+@@ -21,6 +21,9 @@ import android.util.Xml;
+ import org.xmlpull.v1.XmlPullParser;
+ import org.xmlpull.v1.XmlPullParserException;
++import java.io.BufferedInputStream;
++import java.io.File;
++import java.io.FileInputStream;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.util.ArrayList;
+@@ -88,18 +91,41 @@ public class FontListParser {
+     }
+     /* Parse fallback list (no names) */
+-    public static Config parse(InputStream in) throws XmlPullParserException, IOException {
++    public static Config parse(File configFilename, String fontDir)
++            throws XmlPullParserException, IOException {
++        FileInputStream in = null;
++        in = new FileInputStream(configFilename);
++        return FontListParser.parse(in, fontDir);
++    }
++
++    /* Parse fallback list (no names) */
++    public static Config parse(InputStream in, String fontDir)
++            throws XmlPullParserException, IOException {
++        BufferedInputStream bis = null;
+         try {
++            // wrap input stream in a BufferedInputStream, if it's not already, for mark support
++            if (!(in instanceof BufferedInputStream)) {
++                bis = new BufferedInputStream(in);
++            } else {
++                bis = (BufferedInputStream) in;
++            }
++            // mark the beginning so we can reset to this position after checking format
++            bis.mark(in.available());
++            return parseNormalFormat(bis, fontDir);
++        } finally {
++            if (bis != null) bis.close();
++        }
++    }
++
++    public static Config parseNormalFormat(InputStream in, String dirName)
++            throws XmlPullParserException, IOException {
+             XmlPullParser parser = Xml.newPullParser();
+             parser.setInput(in, null);
+             parser.nextTag();
+-            return readFamilies(parser);
+-        } finally {
+-            in.close();
+-        }
++            return readFamilies(parser, dirName);
+     }
+-    private static Config readFamilies(XmlPullParser parser)
++    private static Config readFamilies(XmlPullParser parser, String dirPath)
+             throws XmlPullParserException, IOException {
+         Config config = new Config();
+         parser.require(XmlPullParser.START_TAG, null, "familyset");
+@@ -107,7 +133,7 @@ public class FontListParser {
+             if (parser.getEventType() != XmlPullParser.START_TAG) continue;
+             String tag = parser.getName();
+             if (tag.equals("family")) {
+-                config.families.add(readFamily(parser));
++                config.families.add(readFamily(parser, dirPath));
+             } else if (tag.equals("alias")) {
+                 config.aliases.add(readAlias(parser));
+             } else {
+@@ -117,7 +143,7 @@ public class FontListParser {
+         return config;
+     }
+-    private static Family readFamily(XmlPullParser parser)
++    private static Family readFamily(XmlPullParser parser, String dirPath)
+             throws XmlPullParserException, IOException {
+         String name = parser.getAttributeValue(null, "name");
+         String lang = parser.getAttributeValue(null, "lang");
+@@ -127,7 +153,7 @@ public class FontListParser {
+             if (parser.getEventType() != XmlPullParser.START_TAG) continue;
+             String tag = parser.getName();
+             if (tag.equals("font")) {
+-                fonts.add(readFont(parser));
++                fonts.add(readFont(parser, dirPath));
+             } else {
+                 skip(parser);
+             }
+@@ -139,7 +165,7 @@ public class FontListParser {
+     private static final Pattern FILENAME_WHITESPACE_PATTERN =
+             Pattern.compile("^[ \\n\\r\\t]+|[ \\n\\r\\t]+$");
+-    private static Font readFont(XmlPullParser parser)
++    private static Font readFont(XmlPullParser parser, String dirPath)
+             throws XmlPullParserException, IOException {
+         String indexStr = parser.getAttributeValue(null, "index");
+         int index = indexStr == null ? 0 : Integer.parseInt(indexStr);
+@@ -160,7 +186,7 @@ public class FontListParser {
+                 skip(parser);
+             }
+         }
+-        String fullFilename = "/system/fonts/" +
++        String fullFilename = dirPath + File.separatorChar +
+                 FILENAME_WHITESPACE_PATTERN.matcher(filename).replaceAll("");
+         return new Font(fullFilename, index, axes, weight, isItalic);
+     }
+diff --git a/graphics/java/android/graphics/Typeface.java b/graphics/java/android/graphics/Typeface.java
+index 2886f0dd4a2..990c9bd1fbf 100644
+--- a/graphics/java/android/graphics/Typeface.java
++++ b/graphics/java/android/graphics/Typeface.java
+@@ -17,6 +17,7 @@
+ package android.graphics;
+ import android.content.res.AssetManager;
++import android.graphics.FontListParser.Family;
+ import android.util.Log;
+ import android.util.LongSparseArray;
+ import android.util.LruCache;
+@@ -75,6 +76,8 @@ public class Typeface {
+     static final String FONTS_CONFIG = "fonts.xml";
++    static final String SANS_SERIF_FAMILY_NAME = "sans-serif";
++
+     /**
+      * @hide
+      */
+@@ -88,6 +91,13 @@ public class Typeface {
+     private int mStyle = 0;
++    // Typefaces that we can garbage collect when changing fonts, and so we don't break public APIs
++    private static Typeface DEFAULT_INTERNAL;
++    private static Typeface DEFAULT_BOLD_INTERNAL;
++    private static Typeface SANS_SERIF_INTERNAL;
++    private static Typeface SERIF_INTERNAL;
++    private static Typeface MONOSPACE_INTERNAL;
++
+     private static void setDefault(Typeface t) {
+         sDefaultTypeface = t;
+         nativeSetDefault(t.native_instance);
+@@ -263,7 +273,10 @@ public class Typeface {
+         for (int i = 0; i < families.length; i++) {
+             ptrArray[i] = families[i].mNativePtr;
+         }
+-        return new Typeface(nativeCreateFromArray(ptrArray));
++
++
++        Typeface typeface = new Typeface(nativeCreateFromArray(ptrArray));
++        return typeface;
+     }
+     /**
+@@ -318,6 +331,73 @@ public class Typeface {
+         return fontFamily;
+     }
++    /**
++     * Adds the family from src with the name familyName as a fallback font in dst
++     * @param src Source font config
++     * @param dst Destination font config
++     * @param familyName Name of family to add as a fallback
++     */
++    private static void addFallbackFontsForFamilyName(FontListParser.Config src,
++            FontListParser.Config dst, String familyName) {
++        for (Family srcFamily : src.families) {
++            if (familyName.equals(srcFamily.name)) {
++                // set the name to null so that it will be added as a fallback
++                srcFamily.name = null;
++                dst.families.add(srcFamily);
++                return;
++            }
++        }
++    }
++
++    /**
++     * Adds any font families in src that do not exist in dst
++     * @param src Source font config
++     * @param dst Destination font config
++     */
++    private static void addMissingFontFamilies(FontListParser.Config src,
++            FontListParser.Config dst) {
++        final int N = dst.families.size();
++        // add missing families
++        for (Family srcFamily : src.families) {
++            boolean addFamily = true;
++            for (int i = 0; i < N && addFamily; i++) {
++                final Family dstFamily = dst.families.get(i);
++                final String dstFamilyName = dstFamily.name;
++                if (dstFamilyName != null && dstFamilyName.equals(srcFamily.name)) {
++                    addFamily = false;
++                    break;
++                }
++            }
++            if (addFamily) {
++                dst.families.add(srcFamily);
++            }
++        }
++    }
++
++    /**
++     * Adds any aliases in src that do not exist in dst
++     * @param src Source font config
++     * @param dst Destination font config
++     */
++    private static void addMissingFontAliases(FontListParser.Config src,
++            FontListParser.Config dst) {
++        final int N = dst.aliases.size();
++        // add missing aliases
++        for (FontListParser.Alias alias : src.aliases) {
++            boolean addAlias = true;
++            for (int i = 0; i < N && addAlias; i++) {
++                final String dstAliasName = dst.aliases.get(i).name;
++                if (dstAliasName != null && dstAliasName.equals(alias.name)) {
++                    addAlias = false;
++                    break;
++                }
++            }
++            if (addAlias) {
++                dst.aliases.add(alias);
++            }
++        }
++    }
++
+     /*
+      * (non-Javadoc)
+      *
+@@ -326,10 +406,36 @@ public class Typeface {
+     private static void init() {
+         // Load font config and initialize Minikin state
+         File systemFontConfigLocation = getSystemFontConfigLocation();
+-        File configFilename = new File(systemFontConfigLocation, FONTS_CONFIG);
++        File themeFontConfigLocation = getThemeFontConfigLocation();
++
++        File systemConfigFile = new File(systemFontConfigLocation, FONTS_CONFIG);
++        File themeConfigFile = new File(themeFontConfigLocation, FONTS_CONFIG);
++        File configFile = null;
++        File fontDir;
++
++        if (themeConfigFile.exists()) {
++            configFile = themeConfigFile;
++            fontDir = getThemeFontDirLocation();
++        } else {
++            configFile = systemConfigFile;
++            fontDir = getSystemFontDirLocation();
++        }
++
+         try {
+-            FileInputStream fontsIn = new FileInputStream(configFilename);
+-            FontListParser.Config fontConfig = FontListParser.parse(fontsIn);
++            FontListParser.Config fontConfig = FontListParser.parse(configFile,
++                    fontDir.getAbsolutePath());
++            FontListParser.Config systemFontConfig = null;
++
++            // If the fonts are coming from a theme, we will need to make sure that we include
++            // any font families from the system fonts that the theme did not include.
++            // NOTE: All the system font families without names ALWAYS get added.
++            if (configFile == themeConfigFile) {
++                systemFontConfig = FontListParser.parse(systemConfigFile,
++                        getSystemFontDirLocation().getAbsolutePath());
++                addFallbackFontsForFamilyName(systemFontConfig, fontConfig, SANS_SERIF_FAMILY_NAME);
++                addMissingFontFamilies(systemFontConfig, fontConfig);
++                addMissingFontAliases(systemFontConfig, fontConfig);
++            }
+             Map<String, ByteBuffer> bufferForPath = new HashMap<String, ByteBuffer>();
+@@ -342,6 +448,7 @@ public class Typeface {
+                     familyList.add(makeFamilyFromParsed(f, bufferForPath));
+                 }
+             }
++
+             sFallbackFonts = familyList.toArray(new FontFamily[familyList.size()]);
+             setDefault(Typeface.createFromFamilies(sFallbackFonts));
+@@ -377,22 +484,53 @@ public class Typeface {
+             Log.w(TAG, "Didn't create default family (most likely, non-Minikin build)", e);
+             // TODO: normal in non-Minikin case, remove or make error when Minikin-only
+         } catch (FileNotFoundException e) {
+-            Log.e(TAG, "Error opening " + configFilename, e);
++            Log.e(TAG, "Error opening " + configFile, e);
+         } catch (IOException e) {
+-            Log.e(TAG, "Error reading " + configFilename, e);
++            Log.e(TAG, "Error reading " + configFile, e);
+         } catch (XmlPullParserException e) {
+-            Log.e(TAG, "XML parse exception for " + configFilename, e);
++            Log.e(TAG, "XML parse exception for " + configFile, e);
+         }
+     }
++    /**
++     * Clears caches in java and skia.
++     * Skia will then reparse font config
++     * @hide
++     */
++    public static void recreateDefaults() {
++        sTypefaceCache.clear();
++        sSystemFontMap.clear();
++        init();
++
++        DEFAULT_INTERNAL = create((String) null, 0);
++        DEFAULT_BOLD_INTERNAL = create((String) null, Typeface.BOLD);
++        SANS_SERIF_INTERNAL = create("sans-serif", 0);
++        SERIF_INTERNAL = create("serif", 0);
++        MONOSPACE_INTERNAL = create("monospace", 0);
++
++        DEFAULT.native_instance = DEFAULT_INTERNAL.native_instance;
++        DEFAULT_BOLD.native_instance = DEFAULT_BOLD_INTERNAL.native_instance;
++        SANS_SERIF.native_instance = SANS_SERIF_INTERNAL.native_instance;
++        SERIF.native_instance = SERIF_INTERNAL.native_instance;
++        MONOSPACE.native_instance = MONOSPACE_INTERNAL.native_instance;
++        sDefaults[2] = create((String) null, Typeface.ITALIC);
++        sDefaults[3] = create((String) null, Typeface.BOLD_ITALIC);
++    }
++
+     static {
+         init();
+         // Set up defaults and typefaces exposed in public API
+-        DEFAULT         = create((String) null, 0);
+-        DEFAULT_BOLD    = create((String) null, Typeface.BOLD);
+-        SANS_SERIF      = create("sans-serif", 0);
+-        SERIF           = create("serif", 0);
+-        MONOSPACE       = create("monospace", 0);
++        DEFAULT_INTERNAL         = create((String) null, 0);
++        DEFAULT_BOLD_INTERNAL    = create((String) null, Typeface.BOLD);
++        SANS_SERIF_INTERNAL      = create("sans-serif", 0);
++        SERIF_INTERNAL           = create("serif", 0);
++        MONOSPACE_INTERNAL       = create("monospace", 0);
++
++        DEFAULT         = new Typeface(DEFAULT_INTERNAL.native_instance);
++        DEFAULT_BOLD    = new Typeface(DEFAULT_BOLD_INTERNAL.native_instance);
++        SANS_SERIF      = new Typeface(SANS_SERIF_INTERNAL.native_instance);
++        SERIF           = new Typeface(SERIF_INTERNAL.native_instance);
++        MONOSPACE       = new Typeface(MONOSPACE_INTERNAL.native_instance);
+         sDefaults = new Typeface[] {
+             DEFAULT,
+@@ -407,6 +545,18 @@ public class Typeface {
+         return new File("/system/etc/");
+     }
++    private static File getSystemFontDirLocation() {
++        return new File("/system/fonts/");
++    }
++
++    private static File getThemeFontConfigLocation() {
++        return new File("/data/system/theme/fonts/");
++    }
++
++    private static File getThemeFontDirLocation() {
++        return new File("/data/system/theme/fonts/");
++    }
++
+     @Override
+     protected void finalize() throws Throwable {
+         try {
+diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
+index a94822e5698..7424f1e356f 100644
+--- a/services/core/java/com/android/server/am/ActivityManagerService.java
++++ b/services/core/java/com/android/server/am/ActivityManagerService.java
+@@ -513,6 +513,8 @@ public final class ActivityManagerService extends ActivityManagerNative
+     // as one line, but close enough for now.
+     static final int RESERVED_BYTES_PER_LOGCAT_LINE = 100;
++    static final String PROP_REFRESH_THEME = "sys.refresh_theme";
++
+     // Access modes for handleIncomingUser.
+     static final int ALLOW_NON_FULL = 0;
+     static final int ALLOW_NON_FULL_IN_PROFILE = 1;
+@@ -3956,6 +3958,13 @@ public final class ActivityManagerService extends ActivityManagerNative
+                 mNativeDebuggingApp = null;
+             }
++            //Check if zygote should refresh its fonts
++            boolean refreshTheme = false;
++            if (SystemProperties.getBoolean(PROP_REFRESH_THEME, false)) {
++                SystemProperties.set(PROP_REFRESH_THEME, "false");
++                refreshTheme = true;
++            }
++
+             String requiredAbi = (abiOverride != null) ? abiOverride : app.info.primaryCpuAbi;
+             if (requiredAbi == null) {
+                 requiredAbi = Build.SUPPORTED_ABIS[0];
+@@ -3980,7 +3989,7 @@ public final class ActivityManagerService extends ActivityManagerNative
+             Process.ProcessStartResult startResult = Process.start(entryPoint,
+                     app.processName, uid, uid, gids, debugFlags, mountExternal,
+                     app.info.targetSdkVersion, app.info.seinfo, requiredAbi, instructionSet,
+-                    app.info.dataDir, entryPointArgs);
++                    app.info.dataDir, refreshTheme, entryPointArgs);
+             checkTime(startTime, "startProcess: returned from zygote!");
+             Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0013-Themes-Allow-Immersive-cling-colors-to-be-fully-them.patch b/patches/frameworks/base/0013-Themes-Allow-Immersive-cling-colors-to-be-fully-them.patch
deleted file mode 100644 (file)
index 9fa2c7c..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-From 665269aa1ed0cf30e8d06da0e1516c62be32192b 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/44] 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
-the colors to be.
-
-Change-Id: Ia0927fda5e44a3ce8ef699cb018bea9b9e7ace62
----
- core/res/res/layout/immersive_mode_cling.xml | 12 ++++++------
- core/res/res/values/projekt_colors.xml       |  3 +++
- 2 files changed, 9 insertions(+), 6 deletions(-)
-
-diff --git a/core/res/res/layout/immersive_mode_cling.xml b/core/res/res/layout/immersive_mode_cling.xml
-index b08b0f4d59c..6dbde20d481 100644
---- a/core/res/res/layout/immersive_mode_cling.xml
-+++ b/core/res/res/layout/immersive_mode_cling.xml
-@@ -16,7 +16,7 @@
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-         android:layout_width="match_parent"
-         android:layout_height="wrap_content"
--        android:background="?android:attr/colorAccent"
-+        android:background="@color/immersive_cling_bg_color"
-         android:gravity="center_vertical"
-         android:paddingBottom="24dp">
-@@ -47,7 +47,7 @@
-                 android:paddingTop="8dp"
-                 android:scaleType="center"
-                 android:src="@drawable/ic_expand_more_48dp"
--                android:tint="?android:attr/colorAccent"/>
-+                android:tint="@color/immersive_cling_bg_color"/>
-     </FrameLayout>
-     <TextView
-@@ -59,7 +59,7 @@
-             android:paddingStart="48dp"
-             android:paddingTop="40dp"
-             android:text="@string/immersive_cling_title"
--            android:textColor="@color/primary_text_default_material_light"
-+            android:textColor="@color/immersive_cling_text_color"
-             android:textSize="24sp" />
-     <TextView
-@@ -71,7 +71,7 @@
-             android:paddingStart="48dp"
-             android:paddingTop="12.6dp"
-             android:text="@string/immersive_cling_description"
--            android:textColor="@color/primary_text_default_material_light"
-+            android:textColor="@color/immersive_cling_text_color"
-             android:textSize="16sp" />
-     <Button
-@@ -86,7 +86,7 @@
-             android:paddingEnd="8dp"
-             android:paddingStart="8dp"
-             android:text="@string/immersive_cling_positive"
--            android:textColor="@android:color/white"
-+            android:textColor="@color/immersive_cling_button_text_color"
-             android:textSize="14sp" />
--</RelativeLayout>
-\ No newline at end of file
-+</RelativeLayout>
-diff --git a/core/res/res/values/projekt_colors.xml b/core/res/res/values/projekt_colors.xml
-index c6dbc1ca1c9..7408ae99682 100644
---- a/core/res/res/values/projekt_colors.xml
-+++ b/core/res/res/values/projekt_colors.xml
-@@ -17,4 +17,7 @@
- <resources>
-     <color name="resolver_list_bg">@color/white</color>
-+    <color name="immersive_cling_bg_color">@color/accent_device_default_light</color>
-+    <color name="immersive_cling_text_color">@color/primary_text_default_material_light</color>
-+    <color name="immersive_cling_button_text_color">@android:color/white</color>
- </resources>
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0014-N-Extras-AudioService-Allow-system-effect-sounds-to-.patch b/patches/frameworks/base/0014-N-Extras-AudioService-Allow-system-effect-sounds-to-.patch
new file mode 100644 (file)
index 0000000..7c65573
--- /dev/null
@@ -0,0 +1,79 @@
+From 4fe7e1f0459c09f59b87f2fe59203065e160ee1d Mon Sep 17 00:00:00 2001
+From: Nicholas Chum <nicholaschum@gmail.com>
+Date: Sun, 17 Jul 2016 17:56:40 -0400
+Subject: [PATCH 14/47] N-Extras: AudioService: Allow system effect sounds to
+ be themed
+
+This commit checks whether there is a preexisting file in the themed
+directory "/data/system/theme/audio/ui/" and if so, change the base
+file paths for the sound. If the file does not exist in the theme
+directory, then use the default sounds.
+
+At the current moment, this will require a soft reboot to work.
+
+Change-Id: I7666c2bd259443ccec442bf6059786bea3dc069e
+---
+ .../com/android/server/audio/AudioService.java     | 26 +++++++++++++++++-----
+ 1 file changed, 21 insertions(+), 5 deletions(-)
+
+diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
+index 1cce6c8b5c1..c42f95b856c 100644
+--- a/services/core/java/com/android/server/audio/AudioService.java
++++ b/services/core/java/com/android/server/audio/AudioService.java
+@@ -123,6 +123,7 @@ import com.android.server.pm.UserManagerService;
+ import org.xmlpull.v1.XmlPullParserException;
++import java.io.File;
+ import java.io.FileDescriptor;
+ import java.io.IOException;
+ import java.io.PrintWriter;
+@@ -281,6 +282,7 @@ public class AudioService extends IAudioService.Stub {
+     /* Sound effect file names  */
+     private static final String SOUND_EFFECTS_PATH = "/media/audio/ui/";
++    private static final String SOUND_EFFECTS_THEMED_PATH = "/data/system/theme/audio/ui/";
+     private static final List<String> SOUND_EFFECT_FILES = new ArrayList<String>();
+     /* Sound effect file name mapping sound effect id (AudioManager.FX_xxx) to
+@@ -4687,9 +4689,16 @@ public class AudioService extends IAudioService.Stub {
+                         continue;
+                     }
+                     if (poolId[SOUND_EFFECT_FILES_MAP[effect][0]] == -1) {
+-                        String filePath = Environment.getRootDirectory()
+-                                + SOUND_EFFECTS_PATH
+-                                + SOUND_EFFECT_FILES.get(SOUND_EFFECT_FILES_MAP[effect][0]);
++                        String filePath = "";
++                        File theme_file = new File(SOUND_EFFECTS_THEMED_PATH +
++                            SOUND_EFFECT_FILES.get(SOUND_EFFECT_FILES_MAP[effect][0]));
++                        if (theme_file.exists()) {
++                            filePath = theme_file.getAbsolutePath();
++                        } else {
++                            filePath = Environment.getRootDirectory()
++                                    + SOUND_EFFECTS_PATH
++                                    + SOUND_EFFECT_FILES.get(SOUND_EFFECT_FILES_MAP[effect][0]);
++                        }
+                         int sampleId = mSoundPool.load(filePath, 0);
+                         if (sampleId <= 0) {
+                             Log.w(TAG, "Soundpool could not load file: "+filePath);
+@@ -4795,8 +4804,15 @@ public class AudioService extends IAudioService.Stub {
+                 } else {
+                     MediaPlayer mediaPlayer = new MediaPlayer();
+                     try {
+-                        String filePath = Environment.getRootDirectory() + SOUND_EFFECTS_PATH +
+-                                    SOUND_EFFECT_FILES.get(SOUND_EFFECT_FILES_MAP[effectType][0]);
++                        String filePath = "";
++                        File theme_file = new File(SOUND_EFFECTS_THEMED_PATH +
++                                    SOUND_EFFECT_FILES.get(SOUND_EFFECT_FILES_MAP[effectType][0]));
++                        if (theme_file.exists()) {
++                            filePath = theme_file.getAbsolutePath();
++                        } else {
++                            filePath = Environment.getRootDirectory() + SOUND_EFFECTS_PATH +
++                                        SOUND_EFFECT_FILES.get(SOUND_EFFECT_FILES_MAP[effectType][0]);
++                        }
+                         mediaPlayer.setDataSource(filePath);
+                         mediaPlayer.setAudioStreamType(AudioSystem.STREAM_SYSTEM);
+                         mediaPlayer.prepare();
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0014-Themes-Allow-Permission-Icons-to-be-fully-themed.patch b/patches/frameworks/base/0014-Themes-Allow-Permission-Icons-to-be-fully-themed.patch
deleted file mode 100644 (file)
index 33ae0c5..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-From fa913888958a64b31ad16d870592af73960fab74 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/44] 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.
-
-These icons are able to be changed through framework XMLs, but this line
-forces a black tint (invisible on dark themes) on the icons. Let's
-remove this.
-
-Change-Id: I31eb5021a6d297997dbba156f98cbf47f2102b6c
----
- core/res/res/layout/app_permission_item.xml | 2 +-
- core/res/res/values/projekt_colors.xml      | 1 +
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/core/res/res/layout/app_permission_item.xml b/core/res/res/layout/app_permission_item.xml
-index 383d771074e..a80d40efd2b 100644
---- a/core/res/res/layout/app_permission_item.xml
-+++ b/core/res/res/layout/app_permission_item.xml
-@@ -32,7 +32,7 @@
-         android:layout_marginStart="16dp"
-         android:layout_marginEnd="8dp"
-         android:scaleType="fitCenter"
--        android:tint="@android:color/black"/>
-+        android:tint="@color/app_permission_icon_tint"/>
-     <ImageView
-         android:layout_width="wrap_content"
-diff --git a/core/res/res/values/projekt_colors.xml b/core/res/res/values/projekt_colors.xml
-index 7408ae99682..a7316ab979c 100644
---- a/core/res/res/values/projekt_colors.xml
-+++ b/core/res/res/values/projekt_colors.xml
-@@ -20,4 +20,5 @@
-     <color name="immersive_cling_bg_color">@color/accent_device_default_light</color>
-     <color name="immersive_cling_text_color">@color/primary_text_default_material_light</color>
-     <color name="immersive_cling_button_text_color">@android:color/white</color>
-+    <color name="app_permission_icon_tint">@android:color/black</color>
- </resources>
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0015-Themes-Allow-Navbar-ripple-color-to-be-themed.patch b/patches/frameworks/base/0015-Themes-Allow-Navbar-ripple-color-to-be-themed.patch
deleted file mode 100644 (file)
index 318f07f..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-From 4395120608ef592baf35fde2431b7943b7298ad4 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/44] Themes: Allow Navbar ripple color to be themed
-
-PS1:
-Layers Commit by @setiawanjimmy
-Rewrite of commit by: KreAch3R
-Original commit by: Dave Kover
-Distilled from: https://github.com/CyanogenMod/android_frameworks_base/commit/05ce0a6f5651743add398556d557a5f4c40c2503
-
-Change-Id: I7969e952d7e08f1d12e89291512312421585b70f
----
- packages/SystemUI/res/values/projekt_colors.xml     | 21 +++++++++++++++++++++
- .../systemui/statusbar/policy/KeyButtonRipple.java  |  5 ++++-
- 2 files changed, 25 insertions(+), 1 deletion(-)
- create mode 100644 packages/SystemUI/res/values/projekt_colors.xml
-
-diff --git a/packages/SystemUI/res/values/projekt_colors.xml b/packages/SystemUI/res/values/projekt_colors.xml
-new file mode 100644
-index 00000000000..a0f1df06b6a
---- /dev/null
-+++ b/packages/SystemUI/res/values/projekt_colors.xml
-@@ -0,0 +1,21 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<!--
-+    Copyright (c) 2016 Projekt Substratum
-+
-+    Licensed under the Apache License, Version 2.0 (the "License");
-+    you may not use this file except in compliance with the License.
-+    You may obtain a copy of the License at
-+
-+        http://www.apache.org/licenses/LICENSE-2.0
-+
-+    Unless required by applicable law or agreed to in writing, software
-+    distributed under the License is distributed on an "AS IS" BASIS,
-+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+    See the License for the specific language governing permissions and
-+    limitations under the License.
-+-->
-+
-+<resources>
-+    <!-- Navigation button ripple color -->
-+    <color name="navbutton_ripple_color">#FFFFFFFF</color>
-+</resources>
-diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java
-index 57e092a2603..2579579b0e7 100644
---- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java
-+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java
-@@ -65,16 +65,19 @@ public class KeyButtonRipple extends Drawable {
-     private final HashSet<Animator> mRunningAnimations = new HashSet<>();
-     private final ArrayList<Animator> mTmpArray = new ArrayList<>();
-+    private int mRippleColor;
-+
-     public KeyButtonRipple(Context ctx, View targetView) {
-         mMaxWidth =  ctx.getResources().getDimensionPixelSize(R.dimen.key_button_ripple_max_width);
-         mTargetView = targetView;
-+        mRippleColor = ctx.getResources().getColor(R.color.navbutton_ripple_color);
-     }
-     private Paint getRipplePaint() {
-         if (mRipplePaint == null) {
-             mRipplePaint = new Paint();
-             mRipplePaint.setAntiAlias(true);
--            mRipplePaint.setColor(0xffffffff);
-+            mRipplePaint.setColor(mRippleColor);
-         }
-         return mRipplePaint;
-     }
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0015-Themes-Expose-resolver-hardcoded-colors.patch b/patches/frameworks/base/0015-Themes-Expose-resolver-hardcoded-colors.patch
new file mode 100644 (file)
index 0000000..6f07fa7
--- /dev/null
@@ -0,0 +1,200 @@
+From f55f8d8025d795ddbe1f759055f4ea3d5dcf98af Mon Sep 17 00:00:00 2001
+From: Dave Kover <dkover@cyngn.com>
+Date: Fri, 9 Dec 2016 10:47:17 -0700
+Subject: [PATCH 15/47] Themes: Expose resolver hardcoded colors
+
+commit dbbd5e70cc65002df41561474b03362022dd6716
+Author: Dave Kover <dkover@cyngn.com>
+Date:   Wed Feb 18 16:11:14 2015 -0800
+
+    Themes: Expose resolver hardcoded colors
+
+    Expose background colors of the resolver list.
+
+    Change-Id: I3a0a460c5ffe0f5057b3b9ec92faa7a3e09c9e01
+
+commit 0343eb126f3901a3857791137f74fa805bb9d75c
+Author: Thyrus11 <thyrus11@gmail.com>
+Date:   Sat Feb 21 07:19:42 2015 +0100
+
+    Themes: Make resolver list fully themeable
+
+    Follow-up on commit cc9e3b8fcba95b911d1cda36f7770c410058aa8b.
+
+    Change-Id: I3f006a1157db9d0b151a4fe8edf50e7edc7a0b9f
+
+commit c7d973809488b801e8c708d740009f1233bb762e
+Author: Nicholas Chum <nicholaschum@gmail.com>
+Date:   Sun Nov 8 05:27:28 2015 -0500
+
+    Themes: Allow Resolver List BG to be fully themed
+
+    We are able to trace the activity of the new resolver/chooser through
+    different
+    methods, thus leading us to the Java file:
+    \com\android\internal\app\ChooserActivity.java
+    Here we see that the exposed "chooser_service_row_background_color" is
+    available, but not the rest of the activity, so we look into R.layout's,
+    and we
+    find chooser_grid to be the only one containing hardcoded
+    "@color/white" values (as this is framework, we assume this is also
+    known as
+    "@android:color/white" to themers).
+
+    Expose all "@color/white" values from this file to resolver_list_bg.
+
+    Change-Id: I286d92b5d1f672c8adb3c0af1951793521536d90
+
+Change-Id: Iec7951147bbbc99aee6b06ae50c1acc7b9c01a7f
+---
+ core/res/res/layout/chooser_grid.xml                 |  6 +++---
+ .../res/layout/resolver_different_item_header.xml    |  2 +-
+ core/res/res/layout/resolver_list.xml                |  8 ++++----
+ core/res/res/layout/resolver_list_with_default.xml   |  6 +++---
+ core/res/res/values/projekt_colors.xml               | 20 ++++++++++++++++++++
+ 5 files changed, 31 insertions(+), 11 deletions(-)
+ create mode 100644 core/res/res/values/projekt_colors.xml
+
+diff --git a/core/res/res/layout/chooser_grid.xml b/core/res/res/layout/chooser_grid.xml
+index d8dd447e6a7..78c2e05f372 100644
+--- a/core/res/res/layout/chooser_grid.xml
++++ b/core/res/res/layout/chooser_grid.xml
+@@ -31,7 +31,7 @@
+             android:layout_alwaysShow="true"
+             android:elevation="8dp"
+             android:paddingStart="16dp"
+-            android:background="@color/white" >
++            android:background="@color/resolver_list_bg" >
+         <TextView android:id="@+id/profile_button"
+                   android:layout_width="wrap_content"
+                   android:layout_height="48dp"
+@@ -74,7 +74,7 @@
+             android:id="@+id/resolver_list"
+             android:clipToPadding="false"
+             android:scrollbarStyle="outsideOverlay"
+-            android:background="@color/white"
++            android:background="@color/resolver_list_bg"
+             android:elevation="8dp"
+             android:listSelector="@color/transparent"
+             android:divider="@null"
+@@ -85,7 +85,7 @@
+               android:layout_width="match_parent"
+               android:layout_height="wrap_content"
+               android:layout_alwaysShow="true"
+-              android:background="@color/white"
++              android:background="@color/resolver_list_bg"
+               android:text="@string/noApplications"
+               android:padding="32dp"
+               android:gravity="center"
+diff --git a/core/res/res/layout/resolver_different_item_header.xml b/core/res/res/layout/resolver_different_item_header.xml
+index 58891363e20..201c8c686fe 100644
+--- a/core/res/res/layout/resolver_different_item_header.xml
++++ b/core/res/res/layout/resolver_different_item_header.xml
+@@ -29,6 +29,6 @@
+     android:paddingEnd="16dp"
+     android:paddingTop="8dp"
+     android:paddingBottom="8dp"
+-    android:background="@color/white"
++    android:background="@color/resolver_list_bg"
+     android:elevation="8dp"
+     />
+diff --git a/core/res/res/layout/resolver_list.xml b/core/res/res/layout/resolver_list.xml
+index c4e8e9cb63b..1b6230a5a09 100644
+--- a/core/res/res/layout/resolver_list.xml
++++ b/core/res/res/layout/resolver_list.xml
+@@ -30,7 +30,7 @@
+         android:layout_height="wrap_content"
+         android:layout_alwaysShow="true"
+         android:elevation="8dp"
+-        android:background="@color/white">
++        android:background="@color/resolver_list_bg">
+         <TextView
+             android:id="@+id/profile_button"
+@@ -69,7 +69,7 @@
+         android:id="@+id/resolver_list"
+         android:clipToPadding="false"
+         android:scrollbarStyle="outsideOverlay"
+-        android:background="@color/white"
++        android:background="@color/resolver_list_bg"
+         android:elevation="8dp"
+         android:nestedScrollingEnabled="true"
+         android:scrollIndicators="top|bottom"
+@@ -78,7 +78,7 @@
+     <TextView android:id="@+id/empty"
+               android:layout_width="match_parent"
+               android:layout_height="wrap_content"
+-              android:background="@color/white"
++              android:background="@color/resolver_list_bg"
+               android:elevation="8dp"
+               android:layout_alwaysShow="true"
+               android:text="@string/noApplications"
+@@ -99,7 +99,7 @@
+         android:orientation="horizontal"
+         android:layoutDirection="locale"
+         android:measureWithLargestChild="true"
+-        android:background="@color/white"
++        android:background="@color/resolver_list_bg"
+         android:paddingTop="8dp"
+         android:paddingBottom="8dp"
+         android:paddingStart="12dp"
+diff --git a/core/res/res/layout/resolver_list_with_default.xml b/core/res/res/layout/resolver_list_with_default.xml
+index 02dc2ede430..d3baf682fe0 100644
+--- a/core/res/res/layout/resolver_list_with_default.xml
++++ b/core/res/res/layout/resolver_list_with_default.xml
+@@ -29,7 +29,7 @@
+         android:layout_height="wrap_content"
+         android:layout_alwaysShow="true"
+         android:orientation="vertical"
+-        android:background="@color/white"
++        android:background="@color/resolver_list_bg"
+         android:elevation="8dp">
+         <LinearLayout
+@@ -110,7 +110,7 @@
+             android:paddingBottom="8dp"
+             android:paddingStart="12dp"
+             android:paddingEnd="12dp"
+-            android:background="@color/white"
++            android:background="@color/resolver_list_bg"
+             android:elevation="8dp">
+             <Button
+@@ -150,7 +150,7 @@
+         android:id="@+id/resolver_list"
+         android:clipToPadding="false"
+         android:scrollbarStyle="outsideOverlay"
+-        android:background="@color/white"
++        android:background="@color/resolver_list_bg"
+         android:elevation="8dp"
+         android:nestedScrollingEnabled="true"
+         android:divider="@null" />
+diff --git a/core/res/res/values/projekt_colors.xml b/core/res/res/values/projekt_colors.xml
+new file mode 100644
+index 00000000000..0743f7f4b04
+--- /dev/null
++++ b/core/res/res/values/projekt_colors.xml
+@@ -0,0 +1,20 @@
++<?xml version="1.0" encoding="utf-8"?>
++<!--
++    Copyright (c) 2016-2017 Projekt Substratum
++
++    Licensed under the Apache License, Version 2.0 (the "License");
++    you may not use this file except in compliance with the License.
++    You may obtain a copy of the License at
++
++        http://www.apache.org/licenses/LICENSE-2.0
++
++    Unless required by applicable law or agreed to in writing, software
++    distributed under the License is distributed on an "AS IS" BASIS,
++    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++    See the License for the specific language governing permissions and
++    limitations under the License.
++-->
++
++<resources>
++    <color name="resolver_list_bg">@color/white</color>
++</resources>
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0016-SystemUI-Expose-QS-edit-item-decoration-background-c.patch b/patches/frameworks/base/0016-SystemUI-Expose-QS-edit-item-decoration-background-c.patch
deleted file mode 100644 (file)
index f9bc62c..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-From 36093ba31e7cb282ca2017a6cb31042d2251cf1b 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/44] SystemUI: Expose QS edit item decoration background
- color
-
-PS2:
-More descriptive color name
-
-@nathanchance edit: updated for 7.1 Nougat
-
-Change-Id: I9867ca26e7d9dacad37d2b70180a98fede0fb0e8
----
- packages/SystemUI/res/values/projekt_colors.xml                     | 2 ++
- .../SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java | 6 ++++--
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/packages/SystemUI/res/values/projekt_colors.xml b/packages/SystemUI/res/values/projekt_colors.xml
-index a0f1df06b6a..42f4a1568df 100644
---- a/packages/SystemUI/res/values/projekt_colors.xml
-+++ b/packages/SystemUI/res/values/projekt_colors.xml
-@@ -18,4 +18,6 @@
- <resources>
-     <!-- Navigation button ripple color -->
-     <color name="navbutton_ripple_color">#FFFFFFFF</color>
-+    <!-- QS edit page background color -->
-+    <color name="qs_edit_item_decoration_bg">@*android:color/secondary_device_default_settings</color>
- </resources>
-diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
-index 8d7f6ee7285..c7a1441a6b3 100644
---- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
-+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
-@@ -471,11 +471,10 @@ public class TileAdapter extends RecyclerView.Adapter<Holder> implements TileSta
-         private TileItemDecoration(Context context) {
-             TypedArray ta =
-                     context.obtainStyledAttributes(new int[]{android.R.attr.colorSecondary});
--            mDrawable = new ColorDrawable(ta.getColor(0, 0));
-+            mDrawable = new ColorDrawable();
-             ta.recycle();
-         }
--
-         @Override
-         public void onDraw(Canvas c, RecyclerView parent, State state) {
-             super.onDraw(c, parent, state);
-@@ -494,6 +493,9 @@ public class TileAdapter extends RecyclerView.Adapter<Holder> implements TileSta
-                         .getLayoutParams();
-                 final int top = child.getTop() + params.topMargin +
-                         Math.round(ViewCompat.getTranslationY(child));
-+                // Set drawable color
-+                mDrawable.setColor(mContext.getResources().getColor(
-+                        R.color.qs_edit_item_decoration_bg));
-                 // Draw full width, in case there aren't tiles all the way across.
-                 mDrawable.setBounds(0, top, width, bottom);
-                 mDrawable.draw(c);
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0016-Themes-Allow-Immersive-cling-colors-to-be-fully-them.patch b/patches/frameworks/base/0016-Themes-Allow-Immersive-cling-colors-to-be-fully-them.patch
new file mode 100644 (file)
index 0000000..b01e7ef
--- /dev/null
@@ -0,0 +1,81 @@
+From 5bdb65ab83637446427dc8be510f75a784d1cb0e Mon Sep 17 00:00:00 2001
+From: Nicholas Chum <nicholaschum@gmail.com>
+Date: Tue, 17 Nov 2015 18:57:11 -0500
+Subject: [PATCH 16/47] 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
+the colors to be.
+
+Change-Id: Ia0927fda5e44a3ce8ef699cb018bea9b9e7ace62
+---
+ core/res/res/layout/immersive_mode_cling.xml | 12 ++++++------
+ core/res/res/values/projekt_colors.xml       |  3 +++
+ 2 files changed, 9 insertions(+), 6 deletions(-)
+
+diff --git a/core/res/res/layout/immersive_mode_cling.xml b/core/res/res/layout/immersive_mode_cling.xml
+index b08b0f4d59c..6dbde20d481 100644
+--- a/core/res/res/layout/immersive_mode_cling.xml
++++ b/core/res/res/layout/immersive_mode_cling.xml
+@@ -16,7 +16,7 @@
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+         android:layout_width="match_parent"
+         android:layout_height="wrap_content"
+-        android:background="?android:attr/colorAccent"
++        android:background="@color/immersive_cling_bg_color"
+         android:gravity="center_vertical"
+         android:paddingBottom="24dp">
+@@ -47,7 +47,7 @@
+                 android:paddingTop="8dp"
+                 android:scaleType="center"
+                 android:src="@drawable/ic_expand_more_48dp"
+-                android:tint="?android:attr/colorAccent"/>
++                android:tint="@color/immersive_cling_bg_color"/>
+     </FrameLayout>
+     <TextView
+@@ -59,7 +59,7 @@
+             android:paddingStart="48dp"
+             android:paddingTop="40dp"
+             android:text="@string/immersive_cling_title"
+-            android:textColor="@color/primary_text_default_material_light"
++            android:textColor="@color/immersive_cling_text_color"
+             android:textSize="24sp" />
+     <TextView
+@@ -71,7 +71,7 @@
+             android:paddingStart="48dp"
+             android:paddingTop="12.6dp"
+             android:text="@string/immersive_cling_description"
+-            android:textColor="@color/primary_text_default_material_light"
++            android:textColor="@color/immersive_cling_text_color"
+             android:textSize="16sp" />
+     <Button
+@@ -86,7 +86,7 @@
+             android:paddingEnd="8dp"
+             android:paddingStart="8dp"
+             android:text="@string/immersive_cling_positive"
+-            android:textColor="@android:color/white"
++            android:textColor="@color/immersive_cling_button_text_color"
+             android:textSize="14sp" />
+-</RelativeLayout>
+\ No newline at end of file
++</RelativeLayout>
+diff --git a/core/res/res/values/projekt_colors.xml b/core/res/res/values/projekt_colors.xml
+index 0743f7f4b04..63fddaf7125 100644
+--- a/core/res/res/values/projekt_colors.xml
++++ b/core/res/res/values/projekt_colors.xml
+@@ -17,4 +17,7 @@
+ <resources>
+     <color name="resolver_list_bg">@color/white</color>
++    <color name="immersive_cling_bg_color">@color/accent_device_default_light</color>
++    <color name="immersive_cling_text_color">@color/primary_text_default_material_light</color>
++    <color name="immersive_cling_button_text_color">@android:color/white</color>
+ </resources>
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0017-Allow-custom-alpha-for-notification-shade-bg-color.patch b/patches/frameworks/base/0017-Allow-custom-alpha-for-notification-shade-bg-color.patch
deleted file mode 100644 (file)
index 03e828d..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-From b57980faf6c981376a98541f2c2f5aa9566a395f 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/44] Allow custom alpha for notification shade bg color
-
-Change-Id: If621df83d994feae0448a734408ba85ac8329325
----
- .../stack/NotificationStackScrollLayout.java       | 40 +++++++++++++++-------
- 1 file changed, 27 insertions(+), 13 deletions(-)
-
-diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
-index a6fe4382475..5cf0e0a1e10 100644
---- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
-+++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
-@@ -430,19 +430,33 @@ public class NotificationStackScrollLayout extends ViewGroup
-     }
-     private void updateBackgroundDimming() {
--        float alpha = BACKGROUND_ALPHA_DIMMED + (1 - BACKGROUND_ALPHA_DIMMED) * (1.0f - mDimAmount);
--        alpha *= mBackgroundFadeAmount;
--        // We need to manually blend in the background color
--        int scrimColor = mScrimController.getScrimBehindColor();
--        // SRC_OVER blending Sa + (1 - Sa)*Da, Rc = Sc + (1 - Sa)*Dc
--        float alphaInv = 1 - alpha;
--        int color = Color.argb((int) (alpha * 255 + alphaInv * Color.alpha(scrimColor)),
--                (int) (mBackgroundFadeAmount * Color.red(mBgColor)
--                        + alphaInv * Color.red(scrimColor)),
--                (int) (mBackgroundFadeAmount * Color.green(mBgColor)
--                        + alphaInv * Color.green(scrimColor)),
--                (int) (mBackgroundFadeAmount * Color.blue(mBgColor)
--                        + alphaInv * Color.blue(scrimColor)));
-+        int color;
-+        if(Color.alpha(mBgColor) == 255) {
-+            float alpha = BACKGROUND_ALPHA_DIMMED +
-+                    (1 - BACKGROUND_ALPHA_DIMMED) * (1.0f - mDimAmount);
-+            alpha *= mBackgroundFadeAmount;
-+            // We need to manually blend in the background color
-+            int scrimColor = mScrimController.getScrimBehindColor();
-+            // SRC_OVER blending Sa + (1 - Sa)*Da, Rc = Sc + (1 - Sa)*Dc
-+            float alphaInv = 1 - alpha;
-+            color = Color.argb(
-+                    (int) (alpha * 255 + alphaInv * Color.alpha(scrimColor)),
-+                    (int) (mBackgroundFadeAmount * Color.red(mBgColor)
-+                            + alphaInv * Color.red(scrimColor)),
-+                    (int) (mBackgroundFadeAmount * Color.green(mBgColor)
-+                            + alphaInv * Color.green(scrimColor)),
-+                    (int) (mBackgroundFadeAmount * Color.blue(mBgColor)
-+                            + alphaInv * Color.blue(scrimColor)));
-+        } else {
-+            int a = Color.alpha(mBgColor) +
-+                Color.alpha(mScrimController.getScrimBehindColor());
-+            if(a > 255) a = 255;
-+            else if(a < 0) /* shouldn't happen */ a = 0;
-+            color = Color.argb(
-+                a,
-+                Color.red(mBgColor), Color.green(mBgColor), Color.blue(mBgColor)
-+            );
-+        }
-         mBackgroundPaint.setColor(color);
-         invalidate();
-     }
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0017-Themes-Allow-Permission-Icons-to-be-fully-themed.patch b/patches/frameworks/base/0017-Themes-Allow-Permission-Icons-to-be-fully-themed.patch
new file mode 100644 (file)
index 0000000..65252a6
--- /dev/null
@@ -0,0 +1,44 @@
+From f8647465e56fda449dcfb1bca7e988b373e3b7cf Mon Sep 17 00:00:00 2001
+From: Nicholas Chum <nicholaschum@gmail.com>
+Date: Mon, 23 Nov 2015 23:49:15 -0500
+Subject: [PATCH 17/47] 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.
+
+These icons are able to be changed through framework XMLs, but this line
+forces a black tint (invisible on dark themes) on the icons. Let's
+remove this.
+
+Change-Id: I31eb5021a6d297997dbba156f98cbf47f2102b6c
+---
+ core/res/res/layout/app_permission_item.xml | 2 +-
+ core/res/res/values/projekt_colors.xml      | 1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/core/res/res/layout/app_permission_item.xml b/core/res/res/layout/app_permission_item.xml
+index 383d771074e..a80d40efd2b 100644
+--- a/core/res/res/layout/app_permission_item.xml
++++ b/core/res/res/layout/app_permission_item.xml
+@@ -32,7 +32,7 @@
+         android:layout_marginStart="16dp"
+         android:layout_marginEnd="8dp"
+         android:scaleType="fitCenter"
+-        android:tint="@android:color/black"/>
++        android:tint="@color/app_permission_icon_tint"/>
+     <ImageView
+         android:layout_width="wrap_content"
+diff --git a/core/res/res/values/projekt_colors.xml b/core/res/res/values/projekt_colors.xml
+index 63fddaf7125..06f3edfcc39 100644
+--- a/core/res/res/values/projekt_colors.xml
++++ b/core/res/res/values/projekt_colors.xml
+@@ -20,4 +20,5 @@
+     <color name="immersive_cling_bg_color">@color/accent_device_default_light</color>
+     <color name="immersive_cling_text_color">@color/primary_text_default_material_light</color>
+     <color name="immersive_cling_button_text_color">@android:color/white</color>
++    <color name="app_permission_icon_tint">@android:color/black</color>
+ </resources>
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0018-Themes-Allow-Navbar-ripple-color-to-be-themed.patch b/patches/frameworks/base/0018-Themes-Allow-Navbar-ripple-color-to-be-themed.patch
new file mode 100644 (file)
index 0000000..4f291e8
--- /dev/null
@@ -0,0 +1,73 @@
+From 466359b147637ec9a126b6e4e411156e977ebd67 Mon Sep 17 00:00:00 2001
+From: Dave Kover <dkover@cyngn.com>
+Date: Thu, 14 Apr 2016 10:19:13 +0700
+Subject: [PATCH 18/47] Themes: Allow Navbar ripple color to be themed
+
+PS1:
+Layers Commit by @setiawanjimmy
+Rewrite of commit by: KreAch3R
+Original commit by: Dave Kover
+Distilled from: https://github.com/CyanogenMod/android_frameworks_base/commit/05ce0a6f5651743add398556d557a5f4c40c2503
+
+Change-Id: I7969e952d7e08f1d12e89291512312421585b70f
+---
+ packages/SystemUI/res/values/projekt_colors.xml     | 21 +++++++++++++++++++++
+ .../systemui/statusbar/policy/KeyButtonRipple.java  |  5 ++++-
+ 2 files changed, 25 insertions(+), 1 deletion(-)
+ create mode 100644 packages/SystemUI/res/values/projekt_colors.xml
+
+diff --git a/packages/SystemUI/res/values/projekt_colors.xml b/packages/SystemUI/res/values/projekt_colors.xml
+new file mode 100644
+index 00000000000..b3696c0373a
+--- /dev/null
++++ b/packages/SystemUI/res/values/projekt_colors.xml
+@@ -0,0 +1,21 @@
++<?xml version="1.0" encoding="utf-8"?>
++<!--
++    Copyright (c) 2016-2017 Projekt Substratum
++
++    Licensed under the Apache License, Version 2.0 (the "License");
++    you may not use this file except in compliance with the License.
++    You may obtain a copy of the License at
++
++        http://www.apache.org/licenses/LICENSE-2.0
++
++    Unless required by applicable law or agreed to in writing, software
++    distributed under the License is distributed on an "AS IS" BASIS,
++    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++    See the License for the specific language governing permissions and
++    limitations under the License.
++-->
++
++<resources>
++    <!-- Navigation button ripple color -->
++    <color name="navbutton_ripple_color">#FFFFFFFF</color>
++</resources>
+diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java
+index 57e092a2603..2579579b0e7 100644
+--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java
++++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonRipple.java
+@@ -65,16 +65,19 @@ public class KeyButtonRipple extends Drawable {
+     private final HashSet<Animator> mRunningAnimations = new HashSet<>();
+     private final ArrayList<Animator> mTmpArray = new ArrayList<>();
++    private int mRippleColor;
++
+     public KeyButtonRipple(Context ctx, View targetView) {
+         mMaxWidth =  ctx.getResources().getDimensionPixelSize(R.dimen.key_button_ripple_max_width);
+         mTargetView = targetView;
++        mRippleColor = ctx.getResources().getColor(R.color.navbutton_ripple_color);
+     }
+     private Paint getRipplePaint() {
+         if (mRipplePaint == null) {
+             mRipplePaint = new Paint();
+             mRipplePaint.setAntiAlias(true);
+-            mRipplePaint.setColor(0xffffffff);
++            mRipplePaint.setColor(mRippleColor);
+         }
+         return mRipplePaint;
+     }
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0018-Themes-Expose-various-QuickSettings-text-colors.patch b/patches/frameworks/base/0018-Themes-Expose-various-QuickSettings-text-colors.patch
deleted file mode 100644 (file)
index 79b5688..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From 8efc87d7a3387f3f6d754ef36bc8bb9897a2e2f0 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/44] Themes: Expose various QuickSettings text colors
-
-Change-Id: Iaea71ca83afbc3d8cc6faea6afac16cabb46cfff
----
- packages/SystemUI/res/layout/qs_customize_panel_content.xml | 3 ++-
- packages/SystemUI/res/layout/status_bar_alarm_group.xml     | 2 +-
- packages/SystemUI/res/values/projekt_colors.xml             | 4 ++++
- 3 files changed, 7 insertions(+), 2 deletions(-)
-
-diff --git a/packages/SystemUI/res/layout/qs_customize_panel_content.xml b/packages/SystemUI/res/layout/qs_customize_panel_content.xml
-index 04d0e6524ea..9c232502651 100644
---- a/packages/SystemUI/res/layout/qs_customize_panel_content.xml
-+++ b/packages/SystemUI/res/layout/qs_customize_panel_content.xml
-@@ -23,7 +23,8 @@
-         android:layout_height="wrap_content"
-         android:layout_marginTop="28dp"
-         android:navigationContentDescription="@*android:string/action_bar_up_description"
--        style="?android:attr/toolbarStyle" />
-+        style="?android:attr/toolbarStyle"
-+        android:titleTextColor="@color/qs_edit_toolbar_text_color"/>
-     <android.support.v7.widget.RecyclerView
-         android:id="@android:id/list"
-diff --git a/packages/SystemUI/res/layout/status_bar_alarm_group.xml b/packages/SystemUI/res/layout/status_bar_alarm_group.xml
-index 1b47d4b5a19..dca8afb8cb8 100644
---- a/packages/SystemUI/res/layout/status_bar_alarm_group.xml
-+++ b/packages/SystemUI/res/layout/status_bar_alarm_group.xml
-@@ -73,7 +73,7 @@
-         android:paddingTop="3dp"
-         android:drawablePadding="8dp"
-         android:drawableStart="@drawable/ic_access_alarms_small"
--        android:textColor="#64ffffff"
-+        android:textColor="@color/qs_alarm_status_text_color"
-         android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
-         android:gravity="top"
-         android:background="?android:attr/selectableItemBackgroundBorderless"
-diff --git a/packages/SystemUI/res/values/projekt_colors.xml b/packages/SystemUI/res/values/projekt_colors.xml
-index 42f4a1568df..0f891994c9d 100644
---- a/packages/SystemUI/res/values/projekt_colors.xml
-+++ b/packages/SystemUI/res/values/projekt_colors.xml
-@@ -20,4 +20,8 @@
-     <color name="navbutton_ripple_color">#FFFFFFFF</color>
-     <!-- QS edit page background color -->
-     <color name="qs_edit_item_decoration_bg">@*android:color/secondary_device_default_settings</color>
-+    <!-- QS alarm status text color -->
-+    <color name="qs_alarm_status_text_color">#64ffffff</color>
-+    <!-- QS edit page toolbar text color -->
-+    <color name="qs_edit_toolbar_text_color">#FFFFFF</color>
- </resources>
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0019-Notifications-Expose-a-bool-to-disable-dynamic-color.patch b/patches/frameworks/base/0019-Notifications-Expose-a-bool-to-disable-dynamic-color.patch
deleted file mode 100644 (file)
index 22196cb..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-From bb786714f7fd84e6fcbe62fc6bc760620c1a5861 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/44] 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
-notification.
-
-PS6:
-Separate app title and small icon colors for more flexibility.
-Expose hardcoded sender text name.
-
-Change-Id: I3c7828118991ec4fc616011caf073c81f75428b4
----
- core/java/android/app/Notification.java | 23 ++++++++++++++++++++---
- core/res/res/values/projekt_colors.xml  |  2 ++
- core/res/res/values/projekt_config.xml  | 25 +++++++++++++++++++++++++
- core/res/res/values/projekt_symbols.xml | 25 +++++++++++++++++++++++++
- 4 files changed, 72 insertions(+), 3 deletions(-)
- create mode 100644 core/res/res/values/projekt_config.xml
- create mode 100644 core/res/res/values/projekt_symbols.xml
-
-diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
-index 9f217d48aa8..55029aad4ae 100644
---- a/core/java/android/app/Notification.java
-+++ b/core/java/android/app/Notification.java
-@@ -29,6 +29,7 @@ import android.content.pm.ApplicationInfo;
- import android.content.pm.PackageManager;
- import android.content.pm.PackageManager.NameNotFoundException;
- import android.content.res.ColorStateList;
-+import android.content.res.Resources;
- import android.graphics.Bitmap;
- import android.graphics.Canvas;
- import android.graphics.Color;
-@@ -3884,7 +3885,7 @@ public class Notification implements Parcelable
-         private void processSmallIconColor(Icon smallIcon, RemoteViews contentView) {
-             boolean colorable = !isLegacy() || getColorUtil().isGrayscaleIcon(mContext, smallIcon);
-             if (colorable) {
--                contentView.setDrawableParameters(R.id.icon, false, -1, resolveContrastColor(),
-+                contentView.setDrawableParameters(R.id.icon, false, -1, resolveIconContrastColor(),
-                         PorterDuff.Mode.SRC_ATOP, -1);
-             }
-@@ -3901,7 +3902,7 @@ public class Notification implements Parcelable
-             if (largeIcon != null && isLegacy()
-                     && getColorUtil().isGrayscaleIcon(mContext, largeIcon)) {
-                 // resolve color will fall back to the default when legacy
--                contentView.setDrawableParameters(R.id.icon, false, -1, resolveContrastColor(),
-+                contentView.setDrawableParameters(R.id.icon, false, -1, resolveIconContrastColor(),
-                         PorterDuff.Mode.SRC_ATOP, -1);
-             }
-         }
-@@ -3912,7 +3913,23 @@ public class Notification implements Parcelable
-             }
-         }
-+        int getSenderTextColor() {
-+            return mContext.getColor(R.color.sender_text_color);
-+        }
-+
-+        int resolveIconContrastColor() {
-+            if (!Resources.getSystem().getBoolean(R.bool.config_allowNotificationIconTextTinting)) {
-+                return mContext.getColor(R.color.notification_icon_default_color);
-+            } else {
-+                return resolveContrastColor();
-+            }
-+        }
-+
-         int resolveContrastColor() {
-+            if (!Resources.getSystem().getBoolean(R.bool.config_allowNotificationIconTextTinting)) {
-+                return mContext.getColor(R.color.notification_text_default_color);
-+            }
-+
-             if (mCachedContrastColorIsFor == mN.color && mCachedContrastColor != COLOR_INVALID) {
-                 return mCachedContrastColor;
-             }
-@@ -4915,7 +4932,7 @@ public class Notification implements Parcelable
-                         0 /* flags */);
-             } else {
-                 sb.append(bidi.unicodeWrap(m.mSender),
--                        makeFontColorSpan(Color.BLACK),
-+                        makeFontColorSpan(mBuilder.getSenderTextColor()),
-                         0 /* flags */);
-             }
-             CharSequence text = m.mText == null ? "" : m.mText;
-diff --git a/core/res/res/values/projekt_colors.xml b/core/res/res/values/projekt_colors.xml
-index a7316ab979c..d17fbba053d 100644
---- a/core/res/res/values/projekt_colors.xml
-+++ b/core/res/res/values/projekt_colors.xml
-@@ -21,4 +21,6 @@
-     <color name="immersive_cling_text_color">@color/primary_text_default_material_light</color>
-     <color name="immersive_cling_button_text_color">@android:color/white</color>
-     <color name="app_permission_icon_tint">@android:color/black</color>
-+    <color name="notification_text_default_color">@android:color/notification_default_color</color>
-+    <color name="sender_text_color">@android:color/black</color>
- </resources>
-diff --git a/core/res/res/values/projekt_config.xml b/core/res/res/values/projekt_config.xml
-new file mode 100644
-index 00000000000..f6eb90a49eb
---- /dev/null
-+++ b/core/res/res/values/projekt_config.xml
-@@ -0,0 +1,25 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<!--
-+    Copyright (c) 2016 Project Substratum
-+
-+    Licensed under the Apache License, Version 2.0 (the "License");
-+    you may not use this file except in compliance with the License.
-+    You may obtain a copy of the License at
-+
-+        http://www.apache.org/licenses/LICENSE-2.0
-+
-+    Unless required by applicable law or agreed to in writing, software
-+    distributed under the License is distributed on an "AS IS" BASIS,
-+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+    See the License for the specific language governing permissions and
-+    limitations under the License.
-+-->
-+
-+<!-- These resources are around just to allow their values to be customized
-+     for different hardware and product builds.  Do not translate. -->
-+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-+
-+    <!-- True if the notifications should dynamically tint the app icon and app title -->
-+    <bool name="config_allowNotificationIconTextTinting">true</bool>
-+
-+</resources>
-diff --git a/core/res/res/values/projekt_symbols.xml b/core/res/res/values/projekt_symbols.xml
-new file mode 100644
-index 00000000000..f597a5f3f7b
---- /dev/null
-+++ b/core/res/res/values/projekt_symbols.xml
-@@ -0,0 +1,25 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<!--
-+    Copyright (c) 2016 Project Substratum
-+
-+    Licensed under the Apache License, Version 2.0 (the "License");
-+    you may not use this file except in compliance with the License.
-+    You may obtain a copy of the License at
-+
-+        http://www.apache.org/licenses/LICENSE-2.0
-+
-+    Unless required by applicable law or agreed to in writing, software
-+    distributed under the License is distributed on an "AS IS" BASIS,
-+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+    See the License for the specific language governing permissions and
-+    limitations under the License.
-+-->
-+
-+<resources>
-+
-+  <!-- Notification icon/text dynamic tint -->
-+  <java-symbol type="bool" name="config_allowNotificationIconTextTinting" />
-+  <java-symbol type="color" name="notification_text_default_color" />
-+  <java-symbol type="color" name="sender_text_color" />
-+
-+</resources>
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0019-SystemUI-Expose-QS-edit-item-decoration-background-c.patch b/patches/frameworks/base/0019-SystemUI-Expose-QS-edit-item-decoration-background-c.patch
new file mode 100644 (file)
index 0000000..1ee8075
--- /dev/null
@@ -0,0 +1,58 @@
+From 5f1190b455b738cd8df13d216846fedf9c671434 Mon Sep 17 00:00:00 2001
+From: Ivan Iskandar <iiiiskandar14@gmail.com>
+Date: Sun, 18 Sep 2016 21:33:18 +0700
+Subject: [PATCH 19/47] SystemUI: Expose QS edit item decoration background
+ color
+
+PS2:
+More descriptive color name
+
+@nathanchance edit: updated for 7.1 Nougat
+
+Change-Id: I9867ca26e7d9dacad37d2b70180a98fede0fb0e8
+---
+ packages/SystemUI/res/values/projekt_colors.xml                     | 2 ++
+ .../SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java | 6 ++++--
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/packages/SystemUI/res/values/projekt_colors.xml b/packages/SystemUI/res/values/projekt_colors.xml
+index b3696c0373a..740c740771f 100644
+--- a/packages/SystemUI/res/values/projekt_colors.xml
++++ b/packages/SystemUI/res/values/projekt_colors.xml
+@@ -18,4 +18,6 @@
+ <resources>
+     <!-- Navigation button ripple color -->
+     <color name="navbutton_ripple_color">#FFFFFFFF</color>
++    <!-- QS edit page background color -->
++    <color name="qs_edit_item_decoration_bg">@*android:color/secondary_device_default_settings</color>
+ </resources>
+diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
+index 8d7f6ee7285..c7a1441a6b3 100644
+--- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
++++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
+@@ -471,11 +471,10 @@ public class TileAdapter extends RecyclerView.Adapter<Holder> implements TileSta
+         private TileItemDecoration(Context context) {
+             TypedArray ta =
+                     context.obtainStyledAttributes(new int[]{android.R.attr.colorSecondary});
+-            mDrawable = new ColorDrawable(ta.getColor(0, 0));
++            mDrawable = new ColorDrawable();
+             ta.recycle();
+         }
+-
+         @Override
+         public void onDraw(Canvas c, RecyclerView parent, State state) {
+             super.onDraw(c, parent, state);
+@@ -494,6 +493,9 @@ public class TileAdapter extends RecyclerView.Adapter<Holder> implements TileSta
+                         .getLayoutParams();
+                 final int top = child.getTop() + params.topMargin +
+                         Math.round(ViewCompat.getTranslationY(child));
++                // Set drawable color
++                mDrawable.setColor(mContext.getResources().getColor(
++                        R.color.qs_edit_item_decoration_bg));
+                 // Draw full width, in case there aren't tiles all the way across.
+                 mDrawable.setBounds(0, top, width, bottom);
+                 mDrawable.draw(c);
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0020-Allow-custom-alpha-for-notification-shade-bg-color.patch b/patches/frameworks/base/0020-Allow-custom-alpha-for-notification-shade-bg-color.patch
new file mode 100644 (file)
index 0000000..1daf6be
--- /dev/null
@@ -0,0 +1,64 @@
+From faced872b4cea982ee2f8b1fc70c174d903539b2 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 20/47] Allow custom alpha for notification shade bg color
+
+Change-Id: If621df83d994feae0448a734408ba85ac8329325
+---
+ .../stack/NotificationStackScrollLayout.java       | 40 +++++++++++++++-------
+ 1 file changed, 27 insertions(+), 13 deletions(-)
+
+diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+index 9c969900015..84a9715cd45 100644
+--- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
++++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
+@@ -431,19 +431,33 @@ public class NotificationStackScrollLayout extends ViewGroup
+     }
+     private void updateBackgroundDimming() {
+-        float alpha = BACKGROUND_ALPHA_DIMMED + (1 - BACKGROUND_ALPHA_DIMMED) * (1.0f - mDimAmount);
+-        alpha *= mBackgroundFadeAmount;
+-        // We need to manually blend in the background color
+-        int scrimColor = mScrimController.getScrimBehindColor();
+-        // SRC_OVER blending Sa + (1 - Sa)*Da, Rc = Sc + (1 - Sa)*Dc
+-        float alphaInv = 1 - alpha;
+-        int color = Color.argb((int) (alpha * 255 + alphaInv * Color.alpha(scrimColor)),
+-                (int) (mBackgroundFadeAmount * Color.red(mBgColor)
+-                        + alphaInv * Color.red(scrimColor)),
+-                (int) (mBackgroundFadeAmount * Color.green(mBgColor)
+-                        + alphaInv * Color.green(scrimColor)),
+-                (int) (mBackgroundFadeAmount * Color.blue(mBgColor)
+-                        + alphaInv * Color.blue(scrimColor)));
++        int color;
++        if(Color.alpha(mBgColor) == 255) {
++            float alpha = BACKGROUND_ALPHA_DIMMED +
++                    (1 - BACKGROUND_ALPHA_DIMMED) * (1.0f - mDimAmount);
++            alpha *= mBackgroundFadeAmount;
++            // We need to manually blend in the background color
++            int scrimColor = mScrimController.getScrimBehindColor();
++            // SRC_OVER blending Sa + (1 - Sa)*Da, Rc = Sc + (1 - Sa)*Dc
++            float alphaInv = 1 - alpha;
++            color = Color.argb(
++                    (int) (alpha * 255 + alphaInv * Color.alpha(scrimColor)),
++                    (int) (mBackgroundFadeAmount * Color.red(mBgColor)
++                            + alphaInv * Color.red(scrimColor)),
++                    (int) (mBackgroundFadeAmount * Color.green(mBgColor)
++                            + alphaInv * Color.green(scrimColor)),
++                    (int) (mBackgroundFadeAmount * Color.blue(mBgColor)
++                            + alphaInv * Color.blue(scrimColor)));
++        } else {
++            int a = Color.alpha(mBgColor) +
++                Color.alpha(mScrimController.getScrimBehindColor());
++            if(a > 255) a = 255;
++            else if(a < 0) /* shouldn't happen */ a = 0;
++            color = Color.argb(
++                a,
++                Color.red(mBgColor), Color.green(mBgColor), Color.blue(mBgColor)
++            );
++        }
+         mBackgroundPaint.setColor(color);
+         invalidate();
+     }
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0020-Notification-dynamic-colors-bool-compatible-with-OMS.patch b/patches/frameworks/base/0020-Notification-dynamic-colors-bool-compatible-with-OMS.patch
deleted file mode 100644 (file)
index 8737e2f..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-From e3be9aa310a7d394301c6be9222dd2ae6305f922 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/44] 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
-
-// Resources.getSystem Resources are created on request and aren't tracked by
-// mResourceReferences.
-//
-// If overlays targeting "android" are to be used, we must create the system
-// resources regardless of whether they already exist, since otherwise the
-// information on what overlays to use would be lost. This is wasteful for most
-// applications, so limit this operation to the system user only. (This means
-// Resources.getSystem() will *not* use overlays for applications.)
-
-Replaced deprecated Resources.getSystem() with compatible method.
-
-Change-Id: I02efe27de3cc7067552964ffbaf079f9e9b5bc3e
----
- core/java/android/app/Notification.java | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
-index 55029aad4ae..67c2132b667 100644
---- a/core/java/android/app/Notification.java
-+++ b/core/java/android/app/Notification.java
-@@ -3918,7 +3918,7 @@ public class Notification implements Parcelable
-         }
-         int resolveIconContrastColor() {
--            if (!Resources.getSystem().getBoolean(R.bool.config_allowNotificationIconTextTinting)) {
-+            if (!mContext.getResources().getBoolean(R.bool.config_allowNotificationIconTextTinting)) {
-                 return mContext.getColor(R.color.notification_icon_default_color);
-             } else {
-                 return resolveContrastColor();
-@@ -3926,7 +3926,7 @@ public class Notification implements Parcelable
-         }
-         int resolveContrastColor() {
--            if (!Resources.getSystem().getBoolean(R.bool.config_allowNotificationIconTextTinting)) {
-+            if (!mContext.getResources().getBoolean(R.bool.config_allowNotificationIconTextTinting)) {
-                 return mContext.getColor(R.color.notification_text_default_color);
-             }
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0021-Allow-prevention-of-doze-notification-color-inversio.patch b/patches/frameworks/base/0021-Allow-prevention-of-doze-notification-color-inversio.patch
deleted file mode 100644 (file)
index cdd2937..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-From 2e0bf0d461b7ecf53f42745535f6fc52e94946a4 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/44] Allow prevention of doze notification color inversion
-
-Removed empty newline at the end -- KreAch3R
-Removed slims files for aosp roms -- Bgill55
-
-Change-Id: I2d361c34904f3d168894b8b1741456319fd68456
----
- core/res/res/values/projekt_config.xml                           | 5 +++++
- core/res/res/values/projekt_symbols.xml                          | 3 +++
- packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java | 4 +++-
- 3 files changed, 11 insertions(+), 1 deletion(-)
-
-diff --git a/core/res/res/values/projekt_config.xml b/core/res/res/values/projekt_config.xml
-index f6eb90a49eb..5234959fc9e 100644
---- a/core/res/res/values/projekt_config.xml
-+++ b/core/res/res/values/projekt_config.xml
-@@ -22,4 +22,9 @@
-     <!-- True if the notifications should dynamically tint the app icon and app title -->
-     <bool name="config_allowNotificationIconTextTinting">true</bool>
-+    <!-- Whether doze should invert colors for notifications. If the RRO theme causes
-+    the NORMAL notification background to be dark and the text to be light, this boolean
-+    needs to be set to false, to prevent the doze notifications from being light -->
-+    <bool name="config_invert_colors_on_doze">true</bool>
-+
- </resources>
-diff --git a/core/res/res/values/projekt_symbols.xml b/core/res/res/values/projekt_symbols.xml
-index f597a5f3f7b..16a5728e6c9 100644
---- a/core/res/res/values/projekt_symbols.xml
-+++ b/core/res/res/values/projekt_symbols.xml
-@@ -22,4 +22,7 @@
-   <java-symbol type="color" name="notification_text_default_color" />
-   <java-symbol type="color" name="sender_text_color" />
-+  <!-- Doze invert -->
-+  <java-symbol type="bool" name="config_invert_colors_on_doze" />
-+
- </resources>
-diff --git a/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java b/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
-index 2c96e31d9f5..65fd1158b95 100644
---- a/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
-+++ b/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
-@@ -20,6 +20,7 @@ import android.animation.Animator;
- import android.animation.AnimatorListenerAdapter;
- import android.animation.ValueAnimator;
- import android.content.Context;
-+import android.content.res.Resources;
- import android.graphics.ColorMatrix;
- import android.graphics.ColorMatrixColorFilter;
- import android.graphics.Paint;
-@@ -90,7 +91,8 @@ public class ViewInvertHelper {
-     }
-     public void update(boolean invert) {
--        if (invert) {
-+        if (invert && Resources.getSystem().getBoolean(
-+                com.android.internal.R.bool.config_invert_colors_on_doze)) {
-             updateInvertPaint(1f);
-             for (int i = 0; i < mTargets.size(); i++) {
-                 mTargets.get(i).setLayerType(View.LAYER_TYPE_HARDWARE, mDarkPaint);
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0021-Themes-Expose-various-QuickSettings-text-colors.patch b/patches/frameworks/base/0021-Themes-Expose-various-QuickSettings-text-colors.patch
new file mode 100644 (file)
index 0000000..63f3dbb
--- /dev/null
@@ -0,0 +1,55 @@
+From bb171f6151d20d4dce0a0319aebbdb7637f74714 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 21/47] Themes: Expose various QuickSettings text colors
+
+Change-Id: Iaea71ca83afbc3d8cc6faea6afac16cabb46cfff
+---
+ packages/SystemUI/res/layout/qs_customize_panel_content.xml | 3 ++-
+ packages/SystemUI/res/layout/status_bar_alarm_group.xml     | 2 +-
+ packages/SystemUI/res/values/projekt_colors.xml             | 4 ++++
+ 3 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/packages/SystemUI/res/layout/qs_customize_panel_content.xml b/packages/SystemUI/res/layout/qs_customize_panel_content.xml
+index 04d0e6524ea..9c232502651 100644
+--- a/packages/SystemUI/res/layout/qs_customize_panel_content.xml
++++ b/packages/SystemUI/res/layout/qs_customize_panel_content.xml
+@@ -23,7 +23,8 @@
+         android:layout_height="wrap_content"
+         android:layout_marginTop="28dp"
+         android:navigationContentDescription="@*android:string/action_bar_up_description"
+-        style="?android:attr/toolbarStyle" />
++        style="?android:attr/toolbarStyle"
++        android:titleTextColor="@color/qs_edit_toolbar_text_color"/>
+     <android.support.v7.widget.RecyclerView
+         android:id="@android:id/list"
+diff --git a/packages/SystemUI/res/layout/status_bar_alarm_group.xml b/packages/SystemUI/res/layout/status_bar_alarm_group.xml
+index 1b47d4b5a19..dca8afb8cb8 100644
+--- a/packages/SystemUI/res/layout/status_bar_alarm_group.xml
++++ b/packages/SystemUI/res/layout/status_bar_alarm_group.xml
+@@ -73,7 +73,7 @@
+         android:paddingTop="3dp"
+         android:drawablePadding="8dp"
+         android:drawableStart="@drawable/ic_access_alarms_small"
+-        android:textColor="#64ffffff"
++        android:textColor="@color/qs_alarm_status_text_color"
+         android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date"
+         android:gravity="top"
+         android:background="?android:attr/selectableItemBackgroundBorderless"
+diff --git a/packages/SystemUI/res/values/projekt_colors.xml b/packages/SystemUI/res/values/projekt_colors.xml
+index 740c740771f..76cde3ed614 100644
+--- a/packages/SystemUI/res/values/projekt_colors.xml
++++ b/packages/SystemUI/res/values/projekt_colors.xml
+@@ -20,4 +20,8 @@
+     <color name="navbutton_ripple_color">#FFFFFFFF</color>
+     <!-- QS edit page background color -->
+     <color name="qs_edit_item_decoration_bg">@*android:color/secondary_device_default_settings</color>
++    <!-- QS alarm status text color -->
++    <color name="qs_alarm_status_text_color">#64ffffff</color>
++    <!-- QS edit page toolbar text color -->
++    <color name="qs_edit_toolbar_text_color">#FFFFFF</color>
+ </resources>
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0022-Notifications-Expose-a-bool-to-disable-dynamic-color.patch b/patches/frameworks/base/0022-Notifications-Expose-a-bool-to-disable-dynamic-color.patch
new file mode 100644 (file)
index 0000000..4401621
--- /dev/null
@@ -0,0 +1,162 @@
+From c625ad1cc957fcbb4211fb827adbd6d7e871e9a6 Mon Sep 17 00:00:00 2001
+From: Nicholas Chum <nicholaschum@gmail.com>
+Date: Sat, 27 Aug 2016 10:56:46 -0400
+Subject: [PATCH 22/47] 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
+notification.
+
+PS6:
+Separate app title and small icon colors for more flexibility.
+Expose hardcoded sender text name.
+
+Change-Id: I3c7828118991ec4fc616011caf073c81f75428b4
+---
+ core/java/android/app/Notification.java | 23 ++++++++++++++++++++---
+ core/res/res/values/projekt_colors.xml  |  2 ++
+ core/res/res/values/projekt_config.xml  | 25 +++++++++++++++++++++++++
+ core/res/res/values/projekt_symbols.xml | 25 +++++++++++++++++++++++++
+ 4 files changed, 72 insertions(+), 3 deletions(-)
+ create mode 100644 core/res/res/values/projekt_config.xml
+ create mode 100644 core/res/res/values/projekt_symbols.xml
+
+diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
+index 9f217d48aa8..55029aad4ae 100644
+--- a/core/java/android/app/Notification.java
++++ b/core/java/android/app/Notification.java
+@@ -29,6 +29,7 @@ import android.content.pm.ApplicationInfo;
+ import android.content.pm.PackageManager;
+ import android.content.pm.PackageManager.NameNotFoundException;
+ import android.content.res.ColorStateList;
++import android.content.res.Resources;
+ import android.graphics.Bitmap;
+ import android.graphics.Canvas;
+ import android.graphics.Color;
+@@ -3884,7 +3885,7 @@ public class Notification implements Parcelable
+         private void processSmallIconColor(Icon smallIcon, RemoteViews contentView) {
+             boolean colorable = !isLegacy() || getColorUtil().isGrayscaleIcon(mContext, smallIcon);
+             if (colorable) {
+-                contentView.setDrawableParameters(R.id.icon, false, -1, resolveContrastColor(),
++                contentView.setDrawableParameters(R.id.icon, false, -1, resolveIconContrastColor(),
+                         PorterDuff.Mode.SRC_ATOP, -1);
+             }
+@@ -3901,7 +3902,7 @@ public class Notification implements Parcelable
+             if (largeIcon != null && isLegacy()
+                     && getColorUtil().isGrayscaleIcon(mContext, largeIcon)) {
+                 // resolve color will fall back to the default when legacy
+-                contentView.setDrawableParameters(R.id.icon, false, -1, resolveContrastColor(),
++                contentView.setDrawableParameters(R.id.icon, false, -1, resolveIconContrastColor(),
+                         PorterDuff.Mode.SRC_ATOP, -1);
+             }
+         }
+@@ -3912,7 +3913,23 @@ public class Notification implements Parcelable
+             }
+         }
++        int getSenderTextColor() {
++            return mContext.getColor(R.color.sender_text_color);
++        }
++
++        int resolveIconContrastColor() {
++            if (!Resources.getSystem().getBoolean(R.bool.config_allowNotificationIconTextTinting)) {
++                return mContext.getColor(R.color.notification_icon_default_color);
++            } else {
++                return resolveContrastColor();
++            }
++        }
++
+         int resolveContrastColor() {
++            if (!Resources.getSystem().getBoolean(R.bool.config_allowNotificationIconTextTinting)) {
++                return mContext.getColor(R.color.notification_text_default_color);
++            }
++
+             if (mCachedContrastColorIsFor == mN.color && mCachedContrastColor != COLOR_INVALID) {
+                 return mCachedContrastColor;
+             }
+@@ -4915,7 +4932,7 @@ public class Notification implements Parcelable
+                         0 /* flags */);
+             } else {
+                 sb.append(bidi.unicodeWrap(m.mSender),
+-                        makeFontColorSpan(Color.BLACK),
++                        makeFontColorSpan(mBuilder.getSenderTextColor()),
+                         0 /* flags */);
+             }
+             CharSequence text = m.mText == null ? "" : m.mText;
+diff --git a/core/res/res/values/projekt_colors.xml b/core/res/res/values/projekt_colors.xml
+index 06f3edfcc39..337620949dd 100644
+--- a/core/res/res/values/projekt_colors.xml
++++ b/core/res/res/values/projekt_colors.xml
+@@ -21,4 +21,6 @@
+     <color name="immersive_cling_text_color">@color/primary_text_default_material_light</color>
+     <color name="immersive_cling_button_text_color">@android:color/white</color>
+     <color name="app_permission_icon_tint">@android:color/black</color>
++    <color name="notification_text_default_color">@android:color/notification_default_color</color>
++    <color name="sender_text_color">@android:color/black</color>
+ </resources>
+diff --git a/core/res/res/values/projekt_config.xml b/core/res/res/values/projekt_config.xml
+new file mode 100644
+index 00000000000..83f5494b0f6
+--- /dev/null
++++ b/core/res/res/values/projekt_config.xml
+@@ -0,0 +1,25 @@
++<?xml version="1.0" encoding="utf-8"?>
++<!--
++    Copyright (c) 2016-2017 Projekt Substratum
++
++    Licensed under the Apache License, Version 2.0 (the "License");
++    you may not use this file except in compliance with the License.
++    You may obtain a copy of the License at
++
++        http://www.apache.org/licenses/LICENSE-2.0
++
++    Unless required by applicable law or agreed to in writing, software
++    distributed under the License is distributed on an "AS IS" BASIS,
++    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++    See the License for the specific language governing permissions and
++    limitations under the License.
++-->
++
++<!-- These resources are around just to allow their values to be customized
++     for different hardware and product builds.  Do not translate. -->
++<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
++
++    <!-- True if the notifications should dynamically tint the app icon and app title -->
++    <bool name="config_allowNotificationIconTextTinting">true</bool>
++
++</resources>
+diff --git a/core/res/res/values/projekt_symbols.xml b/core/res/res/values/projekt_symbols.xml
+new file mode 100644
+index 00000000000..e831f478d30
+--- /dev/null
++++ b/core/res/res/values/projekt_symbols.xml
+@@ -0,0 +1,25 @@
++<?xml version="1.0" encoding="utf-8"?>
++<!--
++    Copyright (c) 2016-2017 Projekt Substratum
++
++    Licensed under the Apache License, Version 2.0 (the "License");
++    you may not use this file except in compliance with the License.
++    You may obtain a copy of the License at
++
++        http://www.apache.org/licenses/LICENSE-2.0
++
++    Unless required by applicable law or agreed to in writing, software
++    distributed under the License is distributed on an "AS IS" BASIS,
++    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++    See the License for the specific language governing permissions and
++    limitations under the License.
++-->
++
++<resources>
++
++  <!-- Notification icon/text dynamic tint -->
++  <java-symbol type="bool" name="config_allowNotificationIconTextTinting" />
++  <java-symbol type="color" name="notification_text_default_color" />
++  <java-symbol type="color" name="sender_text_color" />
++
++</resources>
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0022-OMS7-compatible-Ambient-notification-inversion.patch b/patches/frameworks/base/0022-OMS7-compatible-Ambient-notification-inversion.patch
deleted file mode 100644 (file)
index 91b27b7..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-From 1f0ae547e8224a87f882d41b6a76818f1da82cd1 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/44] 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
-
-// Resources.getSystem Resources are created on request and aren't tracked by
-// mResourceReferences.
-//
-// If overlays targeting "android" are to be used, we must create the system
-// resources regardless of whether they already exist, since otherwise the
-// information on what overlays to use would be lost. This is wasteful for most
-// applications, so limit this operation to the system user only. (This means
-// Resources.getSystem() will *not* use overlays for applications.)
-
-Replaced deprecated Resources.getSystem() with compatible method.
-
-Change-Id: I80ad5d037004f0dc63d9eb746c3af05e59a8834e
----
- packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java b/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
-index 65fd1158b95..605f381e9e2 100644
---- a/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
-+++ b/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
-@@ -20,7 +20,6 @@ import android.animation.Animator;
- import android.animation.AnimatorListenerAdapter;
- import android.animation.ValueAnimator;
- import android.content.Context;
--import android.content.res.Resources;
- import android.graphics.ColorMatrix;
- import android.graphics.ColorMatrixColorFilter;
- import android.graphics.Paint;
-@@ -37,6 +36,7 @@ public class ViewInvertHelper {
-     private final ColorMatrix mMatrix = new ColorMatrix();
-     private final ColorMatrix mGrayscaleMatrix = new ColorMatrix();
-     private final long mFadeDuration;
-+    private final boolean mThemeInvert;
-     private final ArrayList<View> mTargets = new ArrayList<>();
-     public ViewInvertHelper(View v, long fadeDuration) {
-@@ -45,6 +45,7 @@ public class ViewInvertHelper {
-     }
-     public ViewInvertHelper(Context context, long fadeDuration) {
-         mFadeDuration = fadeDuration;
-+        mThemeInvert = context.getResources().getBoolean(com.android.internal.R.bool.config_invert_colors_on_doze);
-     }
-     private static ArrayList<View> constructArray(View target) {
-@@ -91,8 +92,7 @@ public class ViewInvertHelper {
-     }
-     public void update(boolean invert) {
--        if (invert && Resources.getSystem().getBoolean(
--                com.android.internal.R.bool.config_invert_colors_on_doze)) {
-+        if (invert && mThemeInvert) {
-             updateInvertPaint(1f);
-             for (int i = 0; i < mTargets.size(); i++) {
-                 mTargets.get(i).setLayerType(View.LAYER_TYPE_HARDWARE, mDarkPaint);
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0023-Notification-dynamic-colors-bool-compatible-with-OMS.patch b/patches/frameworks/base/0023-Notification-dynamic-colors-bool-compatible-with-OMS.patch
new file mode 100644 (file)
index 0000000..1e66cc9
--- /dev/null
@@ -0,0 +1,48 @@
+From acc2c83469f20c56d7cd412ac61b8bb60ab5f220 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 23/47] 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
+
+// Resources.getSystem Resources are created on request and aren't tracked by
+// mResourceReferences.
+//
+// If overlays targeting "android" are to be used, we must create the system
+// resources regardless of whether they already exist, since otherwise the
+// information on what overlays to use would be lost. This is wasteful for most
+// applications, so limit this operation to the system user only. (This means
+// Resources.getSystem() will *not* use overlays for applications.)
+
+Replaced deprecated Resources.getSystem() with compatible method.
+
+Change-Id: I02efe27de3cc7067552964ffbaf079f9e9b5bc3e
+---
+ core/java/android/app/Notification.java | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
+index 55029aad4ae..67c2132b667 100644
+--- a/core/java/android/app/Notification.java
++++ b/core/java/android/app/Notification.java
+@@ -3918,7 +3918,7 @@ public class Notification implements Parcelable
+         }
+         int resolveIconContrastColor() {
+-            if (!Resources.getSystem().getBoolean(R.bool.config_allowNotificationIconTextTinting)) {
++            if (!mContext.getResources().getBoolean(R.bool.config_allowNotificationIconTextTinting)) {
+                 return mContext.getColor(R.color.notification_icon_default_color);
+             } else {
+                 return resolveContrastColor();
+@@ -3926,7 +3926,7 @@ public class Notification implements Parcelable
+         }
+         int resolveContrastColor() {
+-            if (!Resources.getSystem().getBoolean(R.bool.config_allowNotificationIconTextTinting)) {
++            if (!mContext.getResources().getBoolean(R.bool.config_allowNotificationIconTextTinting)) {
+                 return mContext.getColor(R.color.notification_text_default_color);
+             }
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0023-SystemUI-Use-own-drawables-for-QS-expand-icon.patch b/patches/frameworks/base/0023-SystemUI-Use-own-drawables-for-QS-expand-icon.patch
deleted file mode 100644 (file)
index bcce721..0000000
+++ /dev/null
@@ -1,505 +0,0 @@
-From 91295ce26c9123f48ffcdb8fadf1cfa92664c891 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/44] 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
-and volume panel expand icon.
-
-Change-Id: Ice8d8a520b9b22ba773cceb885e11c8a4bbf6d5f
----
- .../anim/ic_qs_collapse_chevron_02_animation.xml   | 25 +++++++++
- .../anim/ic_qs_collapse_rectangle_1_animation.xml  | 26 +++++++++
- .../anim/ic_qs_collapse_rectangle_2_animation.xml  | 26 +++++++++
- .../res/anim/ic_qs_expand_chevron_01_animation.xml | 25 +++++++++
- .../anim/ic_qs_expand_rectangle_3_animation.xml    | 26 +++++++++
- .../anim/ic_qs_expand_rectangle_4_animation.xml    | 26 +++++++++
- packages/SystemUI/res/drawable/ic_qs_collapse.xml  | 62 ++++++++++++++++++++++
- .../res/drawable/ic_qs_collapse_animation.xml      | 29 ++++++++++
- packages/SystemUI/res/drawable/ic_qs_expand.xml    | 62 ++++++++++++++++++++++
- .../res/drawable/ic_qs_expand_animation.xml        | 29 ++++++++++
- .../ic_qs_collapse_animation_interpolator_0.xml    | 17 ++++++
- .../ic_qs_expand_animation_interpolator_0.xml      | 17 ++++++
- .../statusbar/phone/ExpandableIndicator.java       |  8 +--
- 13 files changed, 374 insertions(+), 4 deletions(-)
- create mode 100644 packages/SystemUI/res/anim/ic_qs_collapse_chevron_02_animation.xml
- create mode 100644 packages/SystemUI/res/anim/ic_qs_collapse_rectangle_1_animation.xml
- create mode 100644 packages/SystemUI/res/anim/ic_qs_collapse_rectangle_2_animation.xml
- create mode 100644 packages/SystemUI/res/anim/ic_qs_expand_chevron_01_animation.xml
- create mode 100644 packages/SystemUI/res/anim/ic_qs_expand_rectangle_3_animation.xml
- create mode 100644 packages/SystemUI/res/anim/ic_qs_expand_rectangle_4_animation.xml
- create mode 100644 packages/SystemUI/res/drawable/ic_qs_collapse.xml
- create mode 100644 packages/SystemUI/res/drawable/ic_qs_collapse_animation.xml
- create mode 100644 packages/SystemUI/res/drawable/ic_qs_expand.xml
- create mode 100644 packages/SystemUI/res/drawable/ic_qs_expand_animation.xml
- create mode 100644 packages/SystemUI/res/interpolator/ic_qs_collapse_animation_interpolator_0.xml
- create mode 100644 packages/SystemUI/res/interpolator/ic_qs_expand_animation_interpolator_0.xml
-
-diff --git a/packages/SystemUI/res/anim/ic_qs_collapse_chevron_02_animation.xml b/packages/SystemUI/res/anim/ic_qs_collapse_chevron_02_animation.xml
-new file mode 100644
-index 00000000000..443f2a651e5
---- /dev/null
-+++ b/packages/SystemUI/res/anim/ic_qs_collapse_chevron_02_animation.xml
-@@ -0,0 +1,25 @@
-+<!--
-+     Copyright (C) 2015 The Android Open Source Project
-+
-+     Licensed under the Apache License, Version 2.0 (the "License");
-+     you may not use this file except in compliance with the License.
-+     You may obtain a copy of the License at
-+
-+          http://www.apache.org/licenses/LICENSE-2.0
-+
-+     Unless required by applicable law or agreed to in writing, software
-+     distributed under the License is distributed on an "AS IS" BASIS,
-+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+     See the License for the specific language governing permissions and
-+     limitations under the License.
-+-->
-+<set xmlns:android="http://schemas.android.com/apk/res/android" >
-+
-+    <objectAnimator
-+        android:duration="250"
-+        android:interpolator="@android:interpolator/fast_out_slow_in"
-+        android:pathData="M 12.0,9.0 c 0.0,0.66667 0.0,5.0 0.0,6.0"
-+        android:propertyXName="translateX"
-+        android:propertyYName="translateY" />
-+
-+</set>
-\ No newline at end of file
-diff --git a/packages/SystemUI/res/anim/ic_qs_collapse_rectangle_1_animation.xml b/packages/SystemUI/res/anim/ic_qs_collapse_rectangle_1_animation.xml
-new file mode 100644
-index 00000000000..b73cdcad154
---- /dev/null
-+++ b/packages/SystemUI/res/anim/ic_qs_collapse_rectangle_1_animation.xml
-@@ -0,0 +1,26 @@
-+<!--
-+     Copyright (C) 2015 The Android Open Source Project
-+
-+     Licensed under the Apache License, Version 2.0 (the "License");
-+     you may not use this file except in compliance with the License.
-+     You may obtain a copy of the License at
-+
-+          http://www.apache.org/licenses/LICENSE-2.0
-+
-+     Unless required by applicable law or agreed to in writing, software
-+     distributed under the License is distributed on an "AS IS" BASIS,
-+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+     See the License for the specific language governing permissions and
-+     limitations under the License.
-+-->
-+<set xmlns:android="http://schemas.android.com/apk/res/android" >
-+
-+    <objectAnimator
-+        android:duration="200"
-+        android:interpolator="@interpolator/ic_qs_collapse_animation_interpolator_0"
-+        android:propertyName="rotation"
-+        android:valueFrom="45.0"
-+        android:valueTo="-45.0"
-+        android:valueType="floatType" />
-+
-+</set>
-diff --git a/packages/SystemUI/res/anim/ic_qs_collapse_rectangle_2_animation.xml b/packages/SystemUI/res/anim/ic_qs_collapse_rectangle_2_animation.xml
-new file mode 100644
-index 00000000000..91c83fc5eff
---- /dev/null
-+++ b/packages/SystemUI/res/anim/ic_qs_collapse_rectangle_2_animation.xml
-@@ -0,0 +1,26 @@
-+<!--
-+     Copyright (C) 2015 The Android Open Source Project
-+
-+     Licensed under the Apache License, Version 2.0 (the "License");
-+     you may not use this file except in compliance with the License.
-+     You may obtain a copy of the License at
-+
-+          http://www.apache.org/licenses/LICENSE-2.0
-+
-+     Unless required by applicable law or agreed to in writing, software
-+     distributed under the License is distributed on an "AS IS" BASIS,
-+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+     See the License for the specific language governing permissions and
-+     limitations under the License.
-+-->
-+<set xmlns:android="http://schemas.android.com/apk/res/android" >
-+
-+    <objectAnimator
-+        android:duration="200"
-+        android:interpolator="@interpolator/ic_qs_collapse_animation_interpolator_0"
-+        android:propertyName="rotation"
-+        android:valueFrom="-45.0"
-+        android:valueTo="45.0"
-+        android:valueType="floatType" />
-+
-+</set>
-diff --git a/packages/SystemUI/res/anim/ic_qs_expand_chevron_01_animation.xml b/packages/SystemUI/res/anim/ic_qs_expand_chevron_01_animation.xml
-new file mode 100644
-index 00000000000..e43e6453d82
---- /dev/null
-+++ b/packages/SystemUI/res/anim/ic_qs_expand_chevron_01_animation.xml
-@@ -0,0 +1,25 @@
-+<!--
-+     Copyright (C) 2015 The Android Open Source Project
-+
-+     Licensed under the Apache License, Version 2.0 (the "License");
-+     you may not use this file except in compliance with the License.
-+     You may obtain a copy of the License at
-+
-+          http://www.apache.org/licenses/LICENSE-2.0
-+
-+     Unless required by applicable law or agreed to in writing, software
-+     distributed under the License is distributed on an "AS IS" BASIS,
-+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+     See the License for the specific language governing permissions and
-+     limitations under the License.
-+-->
-+<set xmlns:android="http://schemas.android.com/apk/res/android" >
-+
-+    <objectAnimator
-+        android:duration="250"
-+        android:interpolator="@android:interpolator/fast_out_slow_in"
-+        android:pathData="M 12.0,15.0 c 0.0,-1.0 0.0,-5.33333 0.0,-6.0"
-+        android:propertyXName="translateX"
-+        android:propertyYName="translateY" />
-+
-+</set>
-\ No newline at end of file
-diff --git a/packages/SystemUI/res/anim/ic_qs_expand_rectangle_3_animation.xml b/packages/SystemUI/res/anim/ic_qs_expand_rectangle_3_animation.xml
-new file mode 100644
-index 00000000000..493bdae7900
---- /dev/null
-+++ b/packages/SystemUI/res/anim/ic_qs_expand_rectangle_3_animation.xml
-@@ -0,0 +1,26 @@
-+<!--
-+     Copyright (C) 2015 The Android Open Source Project
-+
-+     Licensed under the Apache License, Version 2.0 (the "License");
-+     you may not use this file except in compliance with the License.
-+     You may obtain a copy of the License at
-+
-+          http://www.apache.org/licenses/LICENSE-2.0
-+
-+     Unless required by applicable law or agreed to in writing, software
-+     distributed under the License is distributed on an "AS IS" BASIS,
-+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+     See the License for the specific language governing permissions and
-+     limitations under the License.
-+-->
-+<set xmlns:android="http://schemas.android.com/apk/res/android" >
-+
-+    <objectAnimator
-+        android:duration="200"
-+        android:interpolator="@interpolator/ic_qs_expand_animation_interpolator_0"
-+        android:propertyName="rotation"
-+        android:valueFrom="45.0"
-+        android:valueTo="-45.0"
-+        android:valueType="floatType" />
-+
-+</set>
-diff --git a/packages/SystemUI/res/anim/ic_qs_expand_rectangle_4_animation.xml b/packages/SystemUI/res/anim/ic_qs_expand_rectangle_4_animation.xml
-new file mode 100644
-index 00000000000..58e485c9c74
---- /dev/null
-+++ b/packages/SystemUI/res/anim/ic_qs_expand_rectangle_4_animation.xml
-@@ -0,0 +1,26 @@
-+<!--
-+     Copyright (C) 2015 The Android Open Source Project
-+
-+     Licensed under the Apache License, Version 2.0 (the "License");
-+     you may not use this file except in compliance with the License.
-+     You may obtain a copy of the License at
-+
-+          http://www.apache.org/licenses/LICENSE-2.0
-+
-+     Unless required by applicable law or agreed to in writing, software
-+     distributed under the License is distributed on an "AS IS" BASIS,
-+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+     See the License for the specific language governing permissions and
-+     limitations under the License.
-+-->
-+<set xmlns:android="http://schemas.android.com/apk/res/android" >
-+
-+    <objectAnimator
-+        android:duration="200"
-+        android:interpolator="@interpolator/ic_qs_expand_animation_interpolator_0"
-+        android:propertyName="rotation"
-+        android:valueFrom="-45.0"
-+        android:valueTo="45.0"
-+        android:valueType="floatType" />
-+
-+</set>
-diff --git a/packages/SystemUI/res/drawable/ic_qs_collapse.xml b/packages/SystemUI/res/drawable/ic_qs_collapse.xml
-new file mode 100644
-index 00000000000..bba6b7f1341
---- /dev/null
-+++ b/packages/SystemUI/res/drawable/ic_qs_collapse.xml
-@@ -0,0 +1,62 @@
-+<!--
-+     Copyright (C) 2015 The Android Open Source Project
-+
-+     Licensed under the Apache License, Version 2.0 (the "License");
-+     you may not use this file except in compliance with the License.
-+     You may obtain a copy of the License at
-+
-+          http://www.apache.org/licenses/LICENSE-2.0
-+
-+     Unless required by applicable law or agreed to in writing, software
-+     distributed under the License is distributed on an "AS IS" BASIS,
-+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+     See the License for the specific language governing permissions and
-+     limitations under the License.
-+-->
-+<vector xmlns:android="http://schemas.android.com/apk/res/android"
-+    android:name="ic_qs_collapse"
-+    android:height="24dp"
-+    android:viewportHeight="24"
-+    android:viewportWidth="24"
-+    android:width="24dp" >
-+
-+    <group
-+        android:name="chevron_02"
-+        android:rotation="90"
-+        android:translateX="12"
-+        android:translateY="9" >
-+        <group
-+            android:name="rectangle_2"
-+            android:rotation="-45" >
-+            <group
-+                android:name="rectangle_2_pivot"
-+                android:translateY="4" >
-+                <group
-+                    android:name="rectangle_path_2_position"
-+                    android:translateY="-1" >
-+                    <path
-+                        android:name="rectangle_path_2"
-+                        android:fillColor="#FFFFFFFF"
-+                        android:pathData="M -1.0,-4.0 l 2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l -2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,-8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" />
-+                </group>
-+            </group>
-+        </group>
-+        <group
-+            android:name="rectangle_1"
-+            android:rotation="45" >
-+            <group
-+                android:name="rectangle_1_pivot"
-+                android:translateY="-4" >
-+                <group
-+                    android:name="rectangle_path_1_position"
-+                    android:translateY="1" >
-+                    <path
-+                        android:name="rectangle_path_1"
-+                        android:fillColor="#FFFFFFFF"
-+                        android:pathData="M -1.0,-4.0 l 2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l -2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,-8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" />
-+                </group>
-+            </group>
-+        </group>
-+    </group>
-+
-+</vector>
-diff --git a/packages/SystemUI/res/drawable/ic_qs_collapse_animation.xml b/packages/SystemUI/res/drawable/ic_qs_collapse_animation.xml
-new file mode 100644
-index 00000000000..8138b2e9cff
---- /dev/null
-+++ b/packages/SystemUI/res/drawable/ic_qs_collapse_animation.xml
-@@ -0,0 +1,29 @@
-+<!--
-+     Copyright (C) 2015 The Android Open Source Project
-+
-+     Licensed under the Apache License, Version 2.0 (the "License");
-+     you may not use this file except in compliance with the License.
-+     You may obtain a copy of the License at
-+
-+          http://www.apache.org/licenses/LICENSE-2.0
-+
-+     Unless required by applicable law or agreed to in writing, software
-+     distributed under the License is distributed on an "AS IS" BASIS,
-+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+     See the License for the specific language governing permissions and
-+     limitations under the License.
-+-->
-+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
-+    android:drawable="@drawable/ic_qs_collapse" >
-+
-+    <target
-+        android:name="chevron_02"
-+        android:animation="@anim/ic_qs_collapse_chevron_02_animation" />
-+    <target
-+        android:name="rectangle_2"
-+        android:animation="@anim/ic_qs_collapse_rectangle_2_animation" />
-+    <target
-+        android:name="rectangle_1"
-+        android:animation="@anim/ic_qs_collapse_rectangle_1_animation" />
-+
-+</animated-vector>
-diff --git a/packages/SystemUI/res/drawable/ic_qs_expand.xml b/packages/SystemUI/res/drawable/ic_qs_expand.xml
-new file mode 100644
-index 00000000000..bb220641e81
---- /dev/null
-+++ b/packages/SystemUI/res/drawable/ic_qs_expand.xml
-@@ -0,0 +1,62 @@
-+<!--
-+     Copyright (C) 2015 The Android Open Source Project
-+
-+     Licensed under the Apache License, Version 2.0 (the "License");
-+     you may not use this file except in compliance with the License.
-+     You may obtain a copy of the License at
-+
-+          http://www.apache.org/licenses/LICENSE-2.0
-+
-+     Unless required by applicable law or agreed to in writing, software
-+     distributed under the License is distributed on an "AS IS" BASIS,
-+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+     See the License for the specific language governing permissions and
-+     limitations under the License.
-+-->
-+<vector xmlns:android="http://schemas.android.com/apk/res/android"
-+    android:name="ic_qs_expand"
-+    android:height="24dp"
-+    android:viewportHeight="24"
-+    android:viewportWidth="24"
-+    android:width="24dp" >
-+
-+    <group
-+        android:name="chevron_01"
-+        android:rotation="90"
-+        android:translateX="12"
-+        android:translateY="15" >
-+        <group
-+            android:name="rectangle_3"
-+            android:rotation="45" >
-+            <group
-+                android:name="rectangle_2_pivot_0"
-+                android:translateY="4" >
-+                <group
-+                    android:name="rectangle_path_3_position"
-+                    android:translateY="-1" >
-+                    <path
-+                        android:name="rectangle_path_3"
-+                        android:fillColor="#FFFFFFFF"
-+                        android:pathData="M -1.0,-4.0 l 2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l -2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,-8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" />
-+                </group>
-+            </group>
-+        </group>
-+        <group
-+            android:name="rectangle_4"
-+            android:rotation="-45" >
-+            <group
-+                android:name="rectangle_1_pivot_0"
-+                android:translateY="-4" >
-+                <group
-+                    android:name="rectangle_path_4_position"
-+                    android:translateY="1" >
-+                    <path
-+                        android:name="rectangle_path_4"
-+                        android:fillColor="#FFFFFFFF"
-+                        android:pathData="M -1.0,-4.0 l 2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l -2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,-8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" />
-+                </group>
-+            </group>
-+        </group>
-+    </group>
-+
-+</vector>
-diff --git a/packages/SystemUI/res/drawable/ic_qs_expand_animation.xml b/packages/SystemUI/res/drawable/ic_qs_expand_animation.xml
-new file mode 100644
-index 00000000000..b561ee06ad8
---- /dev/null
-+++ b/packages/SystemUI/res/drawable/ic_qs_expand_animation.xml
-@@ -0,0 +1,29 @@
-+<!--
-+     Copyright (C) 2015 The Android Open Source Project
-+
-+     Licensed under the Apache License, Version 2.0 (the "License");
-+     you may not use this file except in compliance with the License.
-+     You may obtain a copy of the License at
-+
-+          http://www.apache.org/licenses/LICENSE-2.0
-+
-+     Unless required by applicable law or agreed to in writing, software
-+     distributed under the License is distributed on an "AS IS" BASIS,
-+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+     See the License for the specific language governing permissions and
-+     limitations under the License.
-+-->
-+<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
-+    android:drawable="@drawable/ic_qs_expand" >
-+
-+    <target
-+        android:name="chevron_01"
-+        android:animation="@anim/ic_qs_expand_chevron_01_animation" />
-+    <target
-+        android:name="rectangle_3"
-+        android:animation="@anim/ic_qs_expand_rectangle_3_animation" />
-+    <target
-+        android:name="rectangle_4"
-+        android:animation="@anim/ic_qs_expand_rectangle_4_animation" />
-+
-+</animated-vector>
-diff --git a/packages/SystemUI/res/interpolator/ic_qs_collapse_animation_interpolator_0.xml b/packages/SystemUI/res/interpolator/ic_qs_collapse_animation_interpolator_0.xml
-new file mode 100644
-index 00000000000..c3930e42cda
---- /dev/null
-+++ b/packages/SystemUI/res/interpolator/ic_qs_collapse_animation_interpolator_0.xml
-@@ -0,0 +1,17 @@
-+<!--
-+     Copyright (C) 2015 The Android Open Source Project
-+
-+     Licensed under the Apache License, Version 2.0 (the "License");
-+     you may not use this file except in compliance with the License.
-+     You may obtain a copy of the License at
-+
-+          http://www.apache.org/licenses/LICENSE-2.0
-+
-+     Unless required by applicable law or agreed to in writing, software
-+     distributed under the License is distributed on an "AS IS" BASIS,
-+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+     See the License for the specific language governing permissions and
-+     limitations under the License.
-+-->
-+<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
-+    android:pathData="M 0.0,0.0 c 0.0001,0.0 0.0,1.0 1.0,1.0" />
-diff --git a/packages/SystemUI/res/interpolator/ic_qs_expand_animation_interpolator_0.xml b/packages/SystemUI/res/interpolator/ic_qs_expand_animation_interpolator_0.xml
-new file mode 100644
-index 00000000000..c3930e42cda
---- /dev/null
-+++ b/packages/SystemUI/res/interpolator/ic_qs_expand_animation_interpolator_0.xml
-@@ -0,0 +1,17 @@
-+<!--
-+     Copyright (C) 2015 The Android Open Source Project
-+
-+     Licensed under the Apache License, Version 2.0 (the "License");
-+     you may not use this file except in compliance with the License.
-+     You may obtain a copy of the License at
-+
-+          http://www.apache.org/licenses/LICENSE-2.0
-+
-+     Unless required by applicable law or agreed to in writing, software
-+     distributed under the License is distributed on an "AS IS" BASIS,
-+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+     See the License for the specific language governing permissions and
-+     limitations under the License.
-+-->
-+<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
-+    android:pathData="M 0.0,0.0 c 0.0001,0.0 0.0,1.0 1.0,1.0" />
-diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandableIndicator.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandableIndicator.java
-index a295cfacbbc..0f04c28b98c 100644
---- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandableIndicator.java
-+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandableIndicator.java
-@@ -57,11 +57,11 @@ public class ExpandableIndicator extends ImageView {
-     private int getDrawableResourceId(boolean expanded) {
-         if (mIsDefaultDirection) {
--            return expanded ? R.drawable.ic_volume_collapse_animation
--                    : R.drawable.ic_volume_expand_animation;
-+            return expanded ? R.drawable.ic_qs_collapse_animation
-+                    : R.drawable.ic_qs_expand_animation;
-         } else {
--            return expanded ? R.drawable.ic_volume_expand_animation
--                    : R.drawable.ic_volume_collapse_animation;
-+            return expanded ? R.drawable.ic_qs_expand_animation
-+                    : R.drawable.ic_qs_collapse_animation;
-         }
-     }
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0024-Allow-prevention-of-doze-notification-color-inversio.patch b/patches/frameworks/base/0024-Allow-prevention-of-doze-notification-color-inversio.patch
new file mode 100644 (file)
index 0000000..f2c7f53
--- /dev/null
@@ -0,0 +1,66 @@
+From 35d80aaee2b9a8707d32225963f6cd4d5fb22b1d Mon Sep 17 00:00:00 2001
+From: Daniel Koman <dankoman30@gmail.com>
+Date: Fri, 17 Apr 2015 11:56:28 -0600
+Subject: [PATCH 24/47] Allow prevention of doze notification color inversion
+
+Removed empty newline at the end -- KreAch3R
+Removed slims files for aosp roms -- Bgill55
+
+Change-Id: I2d361c34904f3d168894b8b1741456319fd68456
+---
+ core/res/res/values/projekt_config.xml                           | 5 +++++
+ core/res/res/values/projekt_symbols.xml                          | 3 +++
+ packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java | 4 +++-
+ 3 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/core/res/res/values/projekt_config.xml b/core/res/res/values/projekt_config.xml
+index 83f5494b0f6..c180166a16b 100644
+--- a/core/res/res/values/projekt_config.xml
++++ b/core/res/res/values/projekt_config.xml
+@@ -22,4 +22,9 @@
+     <!-- True if the notifications should dynamically tint the app icon and app title -->
+     <bool name="config_allowNotificationIconTextTinting">true</bool>
++    <!-- Whether doze should invert colors for notifications. If the RRO theme causes
++    the NORMAL notification background to be dark and the text to be light, this boolean
++    needs to be set to false, to prevent the doze notifications from being light -->
++    <bool name="config_invert_colors_on_doze">true</bool>
++
+ </resources>
+diff --git a/core/res/res/values/projekt_symbols.xml b/core/res/res/values/projekt_symbols.xml
+index e831f478d30..9c2dc35dbcd 100644
+--- a/core/res/res/values/projekt_symbols.xml
++++ b/core/res/res/values/projekt_symbols.xml
+@@ -22,4 +22,7 @@
+   <java-symbol type="color" name="notification_text_default_color" />
+   <java-symbol type="color" name="sender_text_color" />
++  <!-- Doze invert -->
++  <java-symbol type="bool" name="config_invert_colors_on_doze" />
++
+ </resources>
+diff --git a/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java b/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
+index 2c96e31d9f5..65fd1158b95 100644
+--- a/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
++++ b/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
+@@ -20,6 +20,7 @@ import android.animation.Animator;
+ import android.animation.AnimatorListenerAdapter;
+ import android.animation.ValueAnimator;
+ import android.content.Context;
++import android.content.res.Resources;
+ import android.graphics.ColorMatrix;
+ import android.graphics.ColorMatrixColorFilter;
+ import android.graphics.Paint;
+@@ -90,7 +91,8 @@ public class ViewInvertHelper {
+     }
+     public void update(boolean invert) {
+-        if (invert) {
++        if (invert && Resources.getSystem().getBoolean(
++                com.android.internal.R.bool.config_invert_colors_on_doze)) {
+             updateInvertPaint(1f);
+             for (int i = 0; i < mTargets.size(); i++) {
+                 mTargets.get(i).setLayerType(View.LAYER_TYPE_HARDWARE, mDarkPaint);
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0024-N-Extras-Add-dynamic-theme-BootAnimation-support.patch b/patches/frameworks/base/0024-N-Extras-Add-dynamic-theme-BootAnimation-support.patch
deleted file mode 100644 (file)
index d67f9e5..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-From 82cf71dda5f995d9a6a7642f0489a7b5dc5fd347 Mon Sep 17 00:00:00 2001
-From: 0xD34D <clark@scheffsblend.com>
-Date: Mon, 20 Jun 2016 22:59:48 +0300
-Subject: [PATCH 24/44] N-Extras: Add dynamic theme BootAnimation support
-
-Extracted from "Themes: Port to CM13 [1/3]"
-http://review.cyanogenmod.org/#/c/113273/14
-
-Change-Id: I394897c10f02695f0416e87e9bf960e840bcb3b7
----
- cmds/bootanimation/BootAnimation.cpp | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
-index d4a9326fc0d..57e1992a903 100644
---- a/cmds/bootanimation/BootAnimation.cpp
-+++ b/cmds/bootanimation/BootAnimation.cpp
-@@ -68,6 +68,7 @@ namespace android {
- static const char OEM_BOOTANIMATION_FILE[] = "/oem/media/bootanimation.zip";
- static const char SYSTEM_BOOTANIMATION_FILE[] = "/system/media/bootanimation.zip";
- static const char SYSTEM_ENCRYPTED_BOOTANIMATION_FILE[] = "/system/media/bootanimation-encrypted.zip";
-+static const char THEME_BOOTANIMATION_FILE[] = "/data/system/theme/bootanimation.zip";
- static const char SYSTEM_DATA_DIR_PATH[] = "/data/system";
- static const char SYSTEM_TIME_DIR_NAME[] = "time";
- static const char SYSTEM_TIME_DIR_PATH[] = "/data/system/time";
-@@ -341,6 +342,9 @@ status_t BootAnimation::readyToRun() {
-     if (encryptedAnimation && (access(getAnimationFileName(IMG_ENC), R_OK) == 0)) {
-         mZipFileName = getAnimationFileName(IMG_ENC);
-     }
-+    else if (access(THEME_BOOTANIMATION_FILE, R_OK) == 0) {
-+        mZipFileName = THEME_BOOTANIMATION_FILE;
-+    }
-     else if (access(getAnimationFileName(IMG_OEM), R_OK) == 0) {
-         mZipFileName = getAnimationFileName(IMG_OEM);
-     }
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0025-N-Extras-Add-dynamic-theme-fonts-support.patch b/patches/frameworks/base/0025-N-Extras-Add-dynamic-theme-fonts-support.patch
deleted file mode 100644 (file)
index 2ef6e0f..0000000
+++ /dev/null
@@ -1,600 +0,0 @@
-From 16d66568ce9eb9a5fbc06281415a56d3f292f0e9 Mon Sep 17 00:00:00 2001
-From: 0xD34D <clark@scheffsblend.com>
-Date: Wed, 22 Jun 2016 23:54:23 +0300
-Subject: [PATCH 25/44] 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
-demand.
-
-Extracted from Themes: Port to CM13 [1/3]
-http://review.cyanogenmod.org/#/c/113273/14
-
-Squashed:
-
-Small adjustment to Font commit
-Author camcory
-https://github.com/SubstratumResources/platform_frameworks_base/commit/a13f088dff70bc52f2053f32acff47a7a377a807
-
-Themes: Ensure themed fonts always have fallbacks
-Author 0xD34D
-https://github.com/CyanogenMod/android_frameworks_base/commit/18b301874e2a658eb01f97defd70da038521f450
-
-Themes: Let garbage collector free up native instances
-Author 0xD34D
-https://github.com/CyanogenMod/android_frameworks_base/commit/b7108ea9ce7ad2226aa6340046d24e069c6e8e21
-
-Themes: Make parse() method in FontListParser public
-Author 0xD34D
-https://github.com/CyanogenMod/android_frameworks_base/commit/b3ae4609f2754fd156e34dfbf39551041e976031
-
-Fonts: add sans-serif fallback fonts first
-Author 0xD34D
-https://github.com/CyanogenMod/android_frameworks_base/commit/f1d7b86dd267ed5b59e51339edc4553d37561a39
-
-Themes: Add config change flag for font change
-Author 0xD34D
-https://github.com/CyanogenMod/android_frameworks_base/commit/2ec1a33b70d3c013daa956696b68167a5eeef70d
-
-Themes: don't recreateDefaults on typeface when locale changes
-Author romanbb
-https://github.com/CyanogenMod/android_frameworks_base/commit/e05ffea4ea55a4eb6b40436a864a570509eb33ac
-
-Change-Id: I1f61bd269b42ab6145482a51d25fe5b1b5308f94
----
- core/java/android/app/ActivityThread.java          |   7 +-
- core/java/android/content/pm/ActivityInfo.java     |   5 +
- core/java/android/content/res/Configuration.java   |   5 +-
- core/java/android/os/Process.java                  |   7 +-
- .../com/android/internal/os/ZygoteConnection.java  |  10 ++
- graphics/java/android/graphics/FontListParser.java |  48 ++++--
- graphics/java/android/graphics/Typeface.java       | 174 +++++++++++++++++++--
- .../android/server/am/ActivityManagerService.java  |  11 +-
- 8 files changed, 240 insertions(+), 27 deletions(-)
-
-diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
-index 55fc25de68b..44a900b3a1f 100644
---- a/core/java/android/app/ActivityThread.java
-+++ b/core/java/android/app/ActivityThread.java
-@@ -48,6 +48,7 @@ import android.database.sqlite.SQLiteDebug;
- import android.database.sqlite.SQLiteDebug.DbStats;
- import android.graphics.Bitmap;
- import android.graphics.Canvas;
-+import android.graphics.Typeface;
- import android.hardware.display.DisplayManagerGlobal;
- import android.net.ConnectivityManager;
- import android.net.IConnectivityManager;
-@@ -4852,8 +4853,12 @@ public final class ActivityThread {
-         if (configDiff != 0) {
-             // Ask text layout engine to free its caches if there is a locale change
-             boolean hasLocaleConfigChange = ((configDiff & ActivityInfo.CONFIG_LOCALE) != 0);
--            if (hasLocaleConfigChange) {
-+            boolean hasFontConfigChange = ((configDiff & ActivityInfo.CONFIG_THEME_FONT) != 0);
-+            if (hasLocaleConfigChange || hasFontConfigChange) {
-                 Canvas.freeTextLayoutCaches();
-+                if (hasFontConfigChange) {
-+                    Typeface.recreateDefaults();
-+                }
-                 if (DEBUG_CONFIGURATION) Slog.v(TAG, "Cleared TextLayout Caches");
-             }
-         }
-diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java
-index 5a09c0028cd..42febcfe59c 100644
---- a/core/java/android/content/pm/ActivityInfo.java
-+++ b/core/java/android/content/pm/ActivityInfo.java
-@@ -624,6 +624,11 @@ public class ActivityInfo extends ComponentInfo
-      */
-     public static final int CONFIG_LAYOUT_DIRECTION = 0x2000;
-     /**
-+     * Bit in {@link #configChanges} that indicates a font change occurred
-+     * @hide
-+     */
-+    public static final int CONFIG_THEME_FONT = 0x200000;
-+    /**
-      * Bit in {@link #configChanges} that indicates that the activity
-      * can itself handle changes to the font scaling factor.  Set from the
-      * {@link android.R.attr#configChanges} attribute.  This is
-diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java
-index b2d518c56ca..2f7c3ec18dc 100644
---- a/core/java/android/content/res/Configuration.java
-+++ b/core/java/android/content/res/Configuration.java
-@@ -955,6 +955,7 @@ public final class Configuration implements Parcelable, Comparable<Configuration
-         int changed = 0;
-         if (delta.fontScale > 0 && fontScale != delta.fontScale) {
-             changed |= ActivityInfo.CONFIG_FONT_SCALE;
-+            changed |= ActivityInfo.CONFIG_THEME_FONT;
-             fontScale = delta.fontScale;
-         }
-         if (delta.mcc != 0 && mcc != delta.mcc) {
-@@ -1121,6 +1122,7 @@ public final class Configuration implements Parcelable, Comparable<Configuration
-         int changed = 0;
-         if (delta.fontScale > 0 && fontScale != delta.fontScale) {
-             changed |= ActivityInfo.CONFIG_FONT_SCALE;
-+            changed |= ActivityInfo.CONFIG_THEME_FONT;
-         }
-         if (delta.mcc != 0 && mcc != delta.mcc) {
-             changed |= ActivityInfo.CONFIG_MCC;
-@@ -1211,7 +1213,8 @@ public final class Configuration implements Parcelable, Comparable<Configuration
-      */
-     public static boolean needNewResources(@Config int configChanges,
-             @Config int interestingChanges) {
--        return (configChanges & (interestingChanges|ActivityInfo.CONFIG_FONT_SCALE)) != 0;
-+        return (configChanges & (interestingChanges|ActivityInfo.CONFIG_FONT_SCALE|
-+                    ActivityInfo.CONFIG_THEME_FONT)) != 0;
-     }
-     /**
-diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java
-index e1b7fdad25e..6dcd045b07f 100644
---- a/core/java/android/os/Process.java
-+++ b/core/java/android/os/Process.java
-@@ -516,11 +516,12 @@ public class Process {
-                                   String abi,
-                                   String instructionSet,
-                                   String appDataDir,
-+                                  boolean refreshTheme,
-                                   String[] zygoteArgs) {
-         try {
-             return startViaZygote(processClass, niceName, uid, gid, gids,
-                     debugFlags, mountExternal, targetSdkVersion, seInfo,
--                    abi, instructionSet, appDataDir, zygoteArgs);
-+                    abi, instructionSet, appDataDir, refreshTheme, zygoteArgs);
-         } catch (ZygoteStartFailedEx ex) {
-             Log.e(LOG_TAG,
-                     "Starting VM process through Zygote failed");
-@@ -648,6 +649,7 @@ public class Process {
-                                   String abi,
-                                   String instructionSet,
-                                   String appDataDir,
-+                                  boolean refreshTheme,
-                                   String[] extraArgs)
-                                   throws ZygoteStartFailedEx {
-         synchronized(Process.class) {
-@@ -689,6 +691,9 @@ public class Process {
-             } else if (mountExternal == Zygote.MOUNT_EXTERNAL_WRITE) {
-                 argsForZygote.add("--mount-external-write");
-             }
-+            if (refreshTheme) {
-+                argsForZygote.add("--refresh_theme");
-+            }
-             argsForZygote.add("--target-sdk-version=" + targetSdkVersion);
-             //TODO optionally enable debuger
-diff --git a/core/java/com/android/internal/os/ZygoteConnection.java b/core/java/com/android/internal/os/ZygoteConnection.java
-index 85d84bb3f98..81257f0d341 100644
---- a/core/java/com/android/internal/os/ZygoteConnection.java
-+++ b/core/java/com/android/internal/os/ZygoteConnection.java
-@@ -22,6 +22,7 @@ import static android.system.OsConstants.STDERR_FILENO;
- import static android.system.OsConstants.STDIN_FILENO;
- import static android.system.OsConstants.STDOUT_FILENO;
-+import android.graphics.Typeface;
- import android.net.Credentials;
- import android.net.LocalSocket;
- import android.os.Process;
-@@ -194,6 +195,10 @@ class ZygoteConnection {
-                 Os.fcntlInt(childPipeFd, F_SETFD, 0);
-             }
-+            if (parsedArgs.refreshTheme) {
-+                Typeface.recreateDefaults();
-+            }
-+
-             /**
-              * In order to avoid leaking descriptors to the Zygote child,
-              * the native code must close the two Zygote socket descriptors
-@@ -373,6 +378,9 @@ class ZygoteConnection {
-          */
-         String appDataDir;
-+        /** from --refresh_theme */
-+        boolean refreshTheme;
-+
-         /**
-          * Constructs instance and parses args
-          * @param args zygote command-line args
-@@ -531,6 +539,8 @@ class ZygoteConnection {
-                     instructionSet = arg.substring(arg.indexOf('=') + 1);
-                 } else if (arg.startsWith("--app-data-dir=")) {
-                     appDataDir = arg.substring(arg.indexOf('=') + 1);
-+                } else if (arg.equals("--refresh_theme")) {
-+                    refreshTheme = true;
-                 } else {
-                     break;
-                 }
-diff --git a/graphics/java/android/graphics/FontListParser.java b/graphics/java/android/graphics/FontListParser.java
-index 7871aa81dde..f4590c94647 100644
---- a/graphics/java/android/graphics/FontListParser.java
-+++ b/graphics/java/android/graphics/FontListParser.java
-@@ -21,6 +21,9 @@ import android.util.Xml;
- import org.xmlpull.v1.XmlPullParser;
- import org.xmlpull.v1.XmlPullParserException;
-+import java.io.BufferedInputStream;
-+import java.io.File;
-+import java.io.FileInputStream;
- import java.io.IOException;
- import java.io.InputStream;
- import java.util.ArrayList;
-@@ -88,18 +91,41 @@ public class FontListParser {
-     }
-     /* Parse fallback list (no names) */
--    public static Config parse(InputStream in) throws XmlPullParserException, IOException {
-+    public static Config parse(File configFilename, String fontDir)
-+            throws XmlPullParserException, IOException {
-+        FileInputStream in = null;
-+        in = new FileInputStream(configFilename);
-+        return FontListParser.parse(in, fontDir);
-+    }
-+
-+    /* Parse fallback list (no names) */
-+    public static Config parse(InputStream in, String fontDir)
-+            throws XmlPullParserException, IOException {
-+        BufferedInputStream bis = null;
-         try {
-+            // wrap input stream in a BufferedInputStream, if it's not already, for mark support
-+            if (!(in instanceof BufferedInputStream)) {
-+                bis = new BufferedInputStream(in);
-+            } else {
-+                bis = (BufferedInputStream) in;
-+            }
-+            // mark the beginning so we can reset to this position after checking format
-+            bis.mark(in.available());
-+            return parseNormalFormat(bis, fontDir);
-+        } finally {
-+            if (bis != null) bis.close();
-+        }
-+    }
-+
-+    public static Config parseNormalFormat(InputStream in, String dirName)
-+            throws XmlPullParserException, IOException {
-             XmlPullParser parser = Xml.newPullParser();
-             parser.setInput(in, null);
-             parser.nextTag();
--            return readFamilies(parser);
--        } finally {
--            in.close();
--        }
-+            return readFamilies(parser, dirName);
-     }
--    private static Config readFamilies(XmlPullParser parser)
-+    private static Config readFamilies(XmlPullParser parser, String dirPath)
-             throws XmlPullParserException, IOException {
-         Config config = new Config();
-         parser.require(XmlPullParser.START_TAG, null, "familyset");
-@@ -107,7 +133,7 @@ public class FontListParser {
-             if (parser.getEventType() != XmlPullParser.START_TAG) continue;
-             String tag = parser.getName();
-             if (tag.equals("family")) {
--                config.families.add(readFamily(parser));
-+                config.families.add(readFamily(parser, dirPath));
-             } else if (tag.equals("alias")) {
-                 config.aliases.add(readAlias(parser));
-             } else {
-@@ -117,7 +143,7 @@ public class FontListParser {
-         return config;
-     }
--    private static Family readFamily(XmlPullParser parser)
-+    private static Family readFamily(XmlPullParser parser, String dirPath)
-             throws XmlPullParserException, IOException {
-         String name = parser.getAttributeValue(null, "name");
-         String lang = parser.getAttributeValue(null, "lang");
-@@ -127,7 +153,7 @@ public class FontListParser {
-             if (parser.getEventType() != XmlPullParser.START_TAG) continue;
-             String tag = parser.getName();
-             if (tag.equals("font")) {
--                fonts.add(readFont(parser));
-+                fonts.add(readFont(parser, dirPath));
-             } else {
-                 skip(parser);
-             }
-@@ -139,7 +165,7 @@ public class FontListParser {
-     private static final Pattern FILENAME_WHITESPACE_PATTERN =
-             Pattern.compile("^[ \\n\\r\\t]+|[ \\n\\r\\t]+$");
--    private static Font readFont(XmlPullParser parser)
-+    private static Font readFont(XmlPullParser parser, String dirPath)
-             throws XmlPullParserException, IOException {
-         String indexStr = parser.getAttributeValue(null, "index");
-         int index = indexStr == null ? 0 : Integer.parseInt(indexStr);
-@@ -160,7 +186,7 @@ public class FontListParser {
-                 skip(parser);
-             }
-         }
--        String fullFilename = "/system/fonts/" +
-+        String fullFilename = dirPath + File.separatorChar +
-                 FILENAME_WHITESPACE_PATTERN.matcher(filename).replaceAll("");
-         return new Font(fullFilename, index, axes, weight, isItalic);
-     }
-diff --git a/graphics/java/android/graphics/Typeface.java b/graphics/java/android/graphics/Typeface.java
-index 2886f0dd4a2..990c9bd1fbf 100644
---- a/graphics/java/android/graphics/Typeface.java
-+++ b/graphics/java/android/graphics/Typeface.java
-@@ -17,6 +17,7 @@
- package android.graphics;
- import android.content.res.AssetManager;
-+import android.graphics.FontListParser.Family;
- import android.util.Log;
- import android.util.LongSparseArray;
- import android.util.LruCache;
-@@ -75,6 +76,8 @@ public class Typeface {
-     static final String FONTS_CONFIG = "fonts.xml";
-+    static final String SANS_SERIF_FAMILY_NAME = "sans-serif";
-+
-     /**
-      * @hide
-      */
-@@ -88,6 +91,13 @@ public class Typeface {
-     private int mStyle = 0;
-+    // Typefaces that we can garbage collect when changing fonts, and so we don't break public APIs
-+    private static Typeface DEFAULT_INTERNAL;
-+    private static Typeface DEFAULT_BOLD_INTERNAL;
-+    private static Typeface SANS_SERIF_INTERNAL;
-+    private static Typeface SERIF_INTERNAL;
-+    private static Typeface MONOSPACE_INTERNAL;
-+
-     private static void setDefault(Typeface t) {
-         sDefaultTypeface = t;
-         nativeSetDefault(t.native_instance);
-@@ -263,7 +273,10 @@ public class Typeface {
-         for (int i = 0; i < families.length; i++) {
-             ptrArray[i] = families[i].mNativePtr;
-         }
--        return new Typeface(nativeCreateFromArray(ptrArray));
-+
-+
-+        Typeface typeface = new Typeface(nativeCreateFromArray(ptrArray));
-+        return typeface;
-     }
-     /**
-@@ -318,6 +331,73 @@ public class Typeface {
-         return fontFamily;
-     }
-+    /**
-+     * Adds the family from src with the name familyName as a fallback font in dst
-+     * @param src Source font config
-+     * @param dst Destination font config
-+     * @param familyName Name of family to add as a fallback
-+     */
-+    private static void addFallbackFontsForFamilyName(FontListParser.Config src,
-+            FontListParser.Config dst, String familyName) {
-+        for (Family srcFamily : src.families) {
-+            if (familyName.equals(srcFamily.name)) {
-+                // set the name to null so that it will be added as a fallback
-+                srcFamily.name = null;
-+                dst.families.add(srcFamily);
-+                return;
-+            }
-+        }
-+    }
-+
-+    /**
-+     * Adds any font families in src that do not exist in dst
-+     * @param src Source font config
-+     * @param dst Destination font config
-+     */
-+    private static void addMissingFontFamilies(FontListParser.Config src,
-+            FontListParser.Config dst) {
-+        final int N = dst.families.size();
-+        // add missing families
-+        for (Family srcFamily : src.families) {
-+            boolean addFamily = true;
-+            for (int i = 0; i < N && addFamily; i++) {
-+                final Family dstFamily = dst.families.get(i);
-+                final String dstFamilyName = dstFamily.name;
-+                if (dstFamilyName != null && dstFamilyName.equals(srcFamily.name)) {
-+                    addFamily = false;
-+                    break;
-+                }
-+            }
-+            if (addFamily) {
-+                dst.families.add(srcFamily);
-+            }
-+        }
-+    }
-+
-+    /**
-+     * Adds any aliases in src that do not exist in dst
-+     * @param src Source font config
-+     * @param dst Destination font config
-+     */
-+    private static void addMissingFontAliases(FontListParser.Config src,
-+            FontListParser.Config dst) {
-+        final int N = dst.aliases.size();
-+        // add missing aliases
-+        for (FontListParser.Alias alias : src.aliases) {
-+            boolean addAlias = true;
-+            for (int i = 0; i < N && addAlias; i++) {
-+                final String dstAliasName = dst.aliases.get(i).name;
-+                if (dstAliasName != null && dstAliasName.equals(alias.name)) {
-+                    addAlias = false;
-+                    break;
-+                }
-+            }
-+            if (addAlias) {
-+                dst.aliases.add(alias);
-+            }
-+        }
-+    }
-+
-     /*
-      * (non-Javadoc)
-      *
-@@ -326,10 +406,36 @@ public class Typeface {
-     private static void init() {
-         // Load font config and initialize Minikin state
-         File systemFontConfigLocation = getSystemFontConfigLocation();
--        File configFilename = new File(systemFontConfigLocation, FONTS_CONFIG);
-+        File themeFontConfigLocation = getThemeFontConfigLocation();
-+
-+        File systemConfigFile = new File(systemFontConfigLocation, FONTS_CONFIG);
-+        File themeConfigFile = new File(themeFontConfigLocation, FONTS_CONFIG);
-+        File configFile = null;
-+        File fontDir;
-+
-+        if (themeConfigFile.exists()) {
-+            configFile = themeConfigFile;
-+            fontDir = getThemeFontDirLocation();
-+        } else {
-+            configFile = systemConfigFile;
-+            fontDir = getSystemFontDirLocation();
-+        }
-+
-         try {
--            FileInputStream fontsIn = new FileInputStream(configFilename);
--            FontListParser.Config fontConfig = FontListParser.parse(fontsIn);
-+            FontListParser.Config fontConfig = FontListParser.parse(configFile,
-+                    fontDir.getAbsolutePath());
-+            FontListParser.Config systemFontConfig = null;
-+
-+            // If the fonts are coming from a theme, we will need to make sure that we include
-+            // any font families from the system fonts that the theme did not include.
-+            // NOTE: All the system font families without names ALWAYS get added.
-+            if (configFile == themeConfigFile) {
-+                systemFontConfig = FontListParser.parse(systemConfigFile,
-+                        getSystemFontDirLocation().getAbsolutePath());
-+                addFallbackFontsForFamilyName(systemFontConfig, fontConfig, SANS_SERIF_FAMILY_NAME);
-+                addMissingFontFamilies(systemFontConfig, fontConfig);
-+                addMissingFontAliases(systemFontConfig, fontConfig);
-+            }
-             Map<String, ByteBuffer> bufferForPath = new HashMap<String, ByteBuffer>();
-@@ -342,6 +448,7 @@ public class Typeface {
-                     familyList.add(makeFamilyFromParsed(f, bufferForPath));
-                 }
-             }
-+
-             sFallbackFonts = familyList.toArray(new FontFamily[familyList.size()]);
-             setDefault(Typeface.createFromFamilies(sFallbackFonts));
-@@ -377,22 +484,53 @@ public class Typeface {
-             Log.w(TAG, "Didn't create default family (most likely, non-Minikin build)", e);
-             // TODO: normal in non-Minikin case, remove or make error when Minikin-only
-         } catch (FileNotFoundException e) {
--            Log.e(TAG, "Error opening " + configFilename, e);
-+            Log.e(TAG, "Error opening " + configFile, e);
-         } catch (IOException e) {
--            Log.e(TAG, "Error reading " + configFilename, e);
-+            Log.e(TAG, "Error reading " + configFile, e);
-         } catch (XmlPullParserException e) {
--            Log.e(TAG, "XML parse exception for " + configFilename, e);
-+            Log.e(TAG, "XML parse exception for " + configFile, e);
-         }
-     }
-+    /**
-+     * Clears caches in java and skia.
-+     * Skia will then reparse font config
-+     * @hide
-+     */
-+    public static void recreateDefaults() {
-+        sTypefaceCache.clear();
-+        sSystemFontMap.clear();
-+        init();
-+
-+        DEFAULT_INTERNAL = create((String) null, 0);
-+        DEFAULT_BOLD_INTERNAL = create((String) null, Typeface.BOLD);
-+        SANS_SERIF_INTERNAL = create("sans-serif", 0);
-+        SERIF_INTERNAL = create("serif", 0);
-+        MONOSPACE_INTERNAL = create("monospace", 0);
-+
-+        DEFAULT.native_instance = DEFAULT_INTERNAL.native_instance;
-+        DEFAULT_BOLD.native_instance = DEFAULT_BOLD_INTERNAL.native_instance;
-+        SANS_SERIF.native_instance = SANS_SERIF_INTERNAL.native_instance;
-+        SERIF.native_instance = SERIF_INTERNAL.native_instance;
-+        MONOSPACE.native_instance = MONOSPACE_INTERNAL.native_instance;
-+        sDefaults[2] = create((String) null, Typeface.ITALIC);
-+        sDefaults[3] = create((String) null, Typeface.BOLD_ITALIC);
-+    }
-+
-     static {
-         init();
-         // Set up defaults and typefaces exposed in public API
--        DEFAULT         = create((String) null, 0);
--        DEFAULT_BOLD    = create((String) null, Typeface.BOLD);
--        SANS_SERIF      = create("sans-serif", 0);
--        SERIF           = create("serif", 0);
--        MONOSPACE       = create("monospace", 0);
-+        DEFAULT_INTERNAL         = create((String) null, 0);
-+        DEFAULT_BOLD_INTERNAL    = create((String) null, Typeface.BOLD);
-+        SANS_SERIF_INTERNAL      = create("sans-serif", 0);
-+        SERIF_INTERNAL           = create("serif", 0);
-+        MONOSPACE_INTERNAL       = create("monospace", 0);
-+
-+        DEFAULT         = new Typeface(DEFAULT_INTERNAL.native_instance);
-+        DEFAULT_BOLD    = new Typeface(DEFAULT_BOLD_INTERNAL.native_instance);
-+        SANS_SERIF      = new Typeface(SANS_SERIF_INTERNAL.native_instance);
-+        SERIF           = new Typeface(SERIF_INTERNAL.native_instance);
-+        MONOSPACE       = new Typeface(MONOSPACE_INTERNAL.native_instance);
-         sDefaults = new Typeface[] {
-             DEFAULT,
-@@ -407,6 +545,18 @@ public class Typeface {
-         return new File("/system/etc/");
-     }
-+    private static File getSystemFontDirLocation() {
-+        return new File("/system/fonts/");
-+    }
-+
-+    private static File getThemeFontConfigLocation() {
-+        return new File("/data/system/theme/fonts/");
-+    }
-+
-+    private static File getThemeFontDirLocation() {
-+        return new File("/data/system/theme/fonts/");
-+    }
-+
-     @Override
-     protected void finalize() throws Throwable {
-         try {
-diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
-index f4d07aff3e6..5d8ab51d077 100644
---- a/services/core/java/com/android/server/am/ActivityManagerService.java
-+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
-@@ -513,6 +513,8 @@ public final class ActivityManagerService extends ActivityManagerNative
-     // as one line, but close enough for now.
-     static final int RESERVED_BYTES_PER_LOGCAT_LINE = 100;
-+    static final String PROP_REFRESH_THEME = "sys.refresh_theme";
-+
-     // Access modes for handleIncomingUser.
-     static final int ALLOW_NON_FULL = 0;
-     static final int ALLOW_NON_FULL_IN_PROFILE = 1;
-@@ -3948,6 +3950,13 @@ public final class ActivityManagerService extends ActivityManagerNative
-                 mNativeDebuggingApp = null;
-             }
-+            //Check if zygote should refresh its fonts
-+            boolean refreshTheme = false;
-+            if (SystemProperties.getBoolean(PROP_REFRESH_THEME, false)) {
-+                SystemProperties.set(PROP_REFRESH_THEME, "false");
-+                refreshTheme = true;
-+            }
-+
-             String requiredAbi = (abiOverride != null) ? abiOverride : app.info.primaryCpuAbi;
-             if (requiredAbi == null) {
-                 requiredAbi = Build.SUPPORTED_ABIS[0];
-@@ -3972,7 +3981,7 @@ public final class ActivityManagerService extends ActivityManagerNative
-             Process.ProcessStartResult startResult = Process.start(entryPoint,
-                     app.processName, uid, uid, gids, debugFlags, mountExternal,
-                     app.info.targetSdkVersion, app.info.seinfo, requiredAbi, instructionSet,
--                    app.info.dataDir, entryPointArgs);
-+                    app.info.dataDir, refreshTheme, entryPointArgs);
-             checkTime(startTime, "startProcess: returned from zygote!");
-             Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0025-OMS7-compatible-Ambient-notification-inversion.patch b/patches/frameworks/base/0025-OMS7-compatible-Ambient-notification-inversion.patch
new file mode 100644 (file)
index 0000000..ac77797
--- /dev/null
@@ -0,0 +1,64 @@
+From cfc039feef23fb3144a5740075d3cec73c9a6e92 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 25/47] 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
+
+// Resources.getSystem Resources are created on request and aren't tracked by
+// mResourceReferences.
+//
+// If overlays targeting "android" are to be used, we must create the system
+// resources regardless of whether they already exist, since otherwise the
+// information on what overlays to use would be lost. This is wasteful for most
+// applications, so limit this operation to the system user only. (This means
+// Resources.getSystem() will *not* use overlays for applications.)
+
+Replaced deprecated Resources.getSystem() with compatible method.
+
+Change-Id: I80ad5d037004f0dc63d9eb746c3af05e59a8834e
+---
+ packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java b/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
+index 65fd1158b95..605f381e9e2 100644
+--- a/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
++++ b/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
+@@ -20,7 +20,6 @@ import android.animation.Animator;
+ import android.animation.AnimatorListenerAdapter;
+ import android.animation.ValueAnimator;
+ import android.content.Context;
+-import android.content.res.Resources;
+ import android.graphics.ColorMatrix;
+ import android.graphics.ColorMatrixColorFilter;
+ import android.graphics.Paint;
+@@ -37,6 +36,7 @@ public class ViewInvertHelper {
+     private final ColorMatrix mMatrix = new ColorMatrix();
+     private final ColorMatrix mGrayscaleMatrix = new ColorMatrix();
+     private final long mFadeDuration;
++    private final boolean mThemeInvert;
+     private final ArrayList<View> mTargets = new ArrayList<>();
+     public ViewInvertHelper(View v, long fadeDuration) {
+@@ -45,6 +45,7 @@ public class ViewInvertHelper {
+     }
+     public ViewInvertHelper(Context context, long fadeDuration) {
+         mFadeDuration = fadeDuration;
++        mThemeInvert = context.getResources().getBoolean(com.android.internal.R.bool.config_invert_colors_on_doze);
+     }
+     private static ArrayList<View> constructArray(View target) {
+@@ -91,8 +92,7 @@ public class ViewInvertHelper {
+     }
+     public void update(boolean invert) {
+-        if (invert && Resources.getSystem().getBoolean(
+-                com.android.internal.R.bool.config_invert_colors_on_doze)) {
++        if (invert && mThemeInvert) {
+             updateInvertPaint(1f);
+             for (int i = 0; i < mTargets.size(); i++) {
+                 mTargets.get(i).setLayerType(View.LAYER_TYPE_HARDWARE, mDarkPaint);
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0026-N-Extras-AudioService-Allow-system-effect-sounds-to-.patch b/patches/frameworks/base/0026-N-Extras-AudioService-Allow-system-effect-sounds-to-.patch
deleted file mode 100644 (file)
index 0d28c0d..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-From cfc3eb11fa4e993884a183926d702ad644e9d1d5 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/44] N-Extras: AudioService: Allow system effect sounds to
- be themed
-
-This commit checks whether there is a preexisting file in the themed
-directory "/data/system/theme/audio/ui/" and if so, change the base
-file paths for the sound. If the file does not exist in the theme
-directory, then use the default sounds.
-
-At the current moment, this will require a soft reboot to work.
-
-Change-Id: I7666c2bd259443ccec442bf6059786bea3dc069e
----
- .../com/android/server/audio/AudioService.java     | 26 +++++++++++++++++-----
- 1 file changed, 21 insertions(+), 5 deletions(-)
-
-diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
-index f5db48806de..c6144d0b0b9 100644
---- a/services/core/java/com/android/server/audio/AudioService.java
-+++ b/services/core/java/com/android/server/audio/AudioService.java
-@@ -123,6 +123,7 @@ import com.android.server.pm.UserManagerService;
- import org.xmlpull.v1.XmlPullParserException;
-+import java.io.File;
- import java.io.FileDescriptor;
- import java.io.IOException;
- import java.io.PrintWriter;
-@@ -281,6 +282,7 @@ public class AudioService extends IAudioService.Stub {
-     /* Sound effect file names  */
-     private static final String SOUND_EFFECTS_PATH = "/media/audio/ui/";
-+    private static final String SOUND_EFFECTS_THEMED_PATH = "/data/system/theme/audio/ui/";
-     private static final List<String> SOUND_EFFECT_FILES = new ArrayList<String>();
-     /* Sound effect file name mapping sound effect id (AudioManager.FX_xxx) to
-@@ -4679,9 +4681,16 @@ public class AudioService extends IAudioService.Stub {
-                         continue;
-                     }
-                     if (poolId[SOUND_EFFECT_FILES_MAP[effect][0]] == -1) {
--                        String filePath = Environment.getRootDirectory()
--                                + SOUND_EFFECTS_PATH
--                                + SOUND_EFFECT_FILES.get(SOUND_EFFECT_FILES_MAP[effect][0]);
-+                        String filePath = "";
-+                        File theme_file = new File(SOUND_EFFECTS_THEMED_PATH +
-+                            SOUND_EFFECT_FILES.get(SOUND_EFFECT_FILES_MAP[effect][0]));
-+                        if (theme_file.exists()) {
-+                            filePath = theme_file.getAbsolutePath();
-+                        } else {
-+                            filePath = Environment.getRootDirectory()
-+                                    + SOUND_EFFECTS_PATH
-+                                    + SOUND_EFFECT_FILES.get(SOUND_EFFECT_FILES_MAP[effect][0]);
-+                        }
-                         int sampleId = mSoundPool.load(filePath, 0);
-                         if (sampleId <= 0) {
-                             Log.w(TAG, "Soundpool could not load file: "+filePath);
-@@ -4787,8 +4796,15 @@ public class AudioService extends IAudioService.Stub {
-                 } else {
-                     MediaPlayer mediaPlayer = new MediaPlayer();
-                     try {
--                        String filePath = Environment.getRootDirectory() + SOUND_EFFECTS_PATH +
--                                    SOUND_EFFECT_FILES.get(SOUND_EFFECT_FILES_MAP[effectType][0]);
-+                        String filePath = "";
-+                        File theme_file = new File(SOUND_EFFECTS_THEMED_PATH +
-+                                    SOUND_EFFECT_FILES.get(SOUND_EFFECT_FILES_MAP[effectType][0]));
-+                        if (theme_file.exists()) {
-+                            filePath = theme_file.getAbsolutePath();
-+                        } else {
-+                            filePath = Environment.getRootDirectory() + SOUND_EFFECTS_PATH +
-+                                        SOUND_EFFECT_FILES.get(SOUND_EFFECT_FILES_MAP[effectType][0]);
-+                        }
-                         mediaPlayer.setDataSource(filePath);
-                         mediaPlayer.setAudioStreamType(AudioSystem.STREAM_SYSTEM);
-                         mediaPlayer.prepare();
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0026-doze-allow-grayscale-even-if-invert-boolean-is-false.patch b/patches/frameworks/base/0026-doze-allow-grayscale-even-if-invert-boolean-is-false.patch
new file mode 100644 (file)
index 0000000..a9f8ccc
--- /dev/null
@@ -0,0 +1,45 @@
+From b48b7e7feb3b89d193818882291476a4bf97921a Mon Sep 17 00:00:00 2001
+From: Daniel Koman <dankoman30@gmail.com>
+Date: Wed, 28 Sep 2016 15:28:26 +0200
+Subject: [PATCH 26/47] 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
+    color inversion, this was also preventing the notification
+    from grayscaling.  as a result, on dark themes (boolean false), we
+    were seeing color icons on doze notifications.  this commit fixes
+    the grayscaling, and brings back the very aesthetically pleasing
+    (imo) grayscale-to-color fade-in for the notifications' app icons.
+
+Change-Id: Ifc5efbccbeb02910684b76793721b10f1d64f870
+---
+ packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java b/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
+index 605f381e9e2..16d46c0362e 100644
+--- a/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
++++ b/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
+@@ -92,7 +92,7 @@ public class ViewInvertHelper {
+     }
+     public void update(boolean invert) {
+-        if (invert && mThemeInvert) {
++        if (invert) {
+             updateInvertPaint(1f);
+             for (int i = 0; i < mTargets.size(); i++) {
+                 mTargets.get(i).setLayerType(View.LAYER_TYPE_HARDWARE, mDarkPaint);
+@@ -115,7 +115,9 @@ public class ViewInvertHelper {
+         mMatrix.set(invert);
+         mGrayscaleMatrix.setSaturation(1 - intensity);
+         mMatrix.preConcat(mGrayscaleMatrix);
+-        mDarkPaint.setColorFilter(new ColorMatrixColorFilter(mMatrix));
++        mDarkPaint.setColorFilter(new ColorMatrixColorFilter(
++                mThemeInvert ? mMatrix : mGrayscaleMatrix));
++
+     }
+     public void setInverted(boolean invert, boolean fade, long delay) {
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0027-OMS7-N-ApplicationsState-add-filter-for-Substratum-o.patch b/patches/frameworks/base/0027-OMS7-N-ApplicationsState-add-filter-for-Substratum-o.patch
deleted file mode 100644 (file)
index d8e9095..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-From 961cedcdae7521015ed2cb12b1f143781348b6ba 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/44] OMS7-N: ApplicationsState: add filter for Substratum
- overlays [1/2]
-
-This commit allows the framework to handle the filtering of the
-overlays found for OMS.
-
-Change-Id: I7646115e8f73494d726728fac58cc47aafd69d5d
----
- .../settingslib/applications/ApplicationsState.java     | 17 +++++++++++++++--
- 1 file changed, 15 insertions(+), 2 deletions(-)
-
-diff --git a/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java b/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
-index f0ec1078650..6fecd4044ca 100644
---- a/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
-+++ b/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
-@@ -137,9 +137,11 @@ public class ApplicationsState {
-         // Only the owner can see all apps.
-         mAdminRetrieveFlags = PackageManager.GET_UNINSTALLED_PACKAGES |
-                 PackageManager.GET_DISABLED_COMPONENTS |
--                PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS;
-+                PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS |
-+                PackageManager.GET_META_DATA;
-         mRetrieveFlags = PackageManager.GET_DISABLED_COMPONENTS |
--                PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS;
-+                PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS |
-+                PackageManager.GET_META_DATA;
-         /**
-          * This is a trick to prevent the foreground thread from being delayed.
-@@ -1312,6 +1314,17 @@ public class ApplicationsState {
-         }
-     };
-+    public static final AppFilter FILTER_SUBSTRATUM = new AppFilter() {
-+        public void init() {
-+        }
-+
-+        @Override
-+        public boolean filterApp(AppEntry entry) {
-+            return !((entry.info.metaData != null) &&
-+                    (entry.info.metaData.getString("Substratum_Parent") != null));
-+        }
-+    };
-+
-     public static final AppFilter FILTER_WORK = new AppFilter() {
-         private int mCurrentUser;
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0027-SystemUI-Use-own-drawables-for-QS-expand-icon.patch b/patches/frameworks/base/0027-SystemUI-Use-own-drawables-for-QS-expand-icon.patch
new file mode 100644 (file)
index 0000000..8d81dab
--- /dev/null
@@ -0,0 +1,505 @@
+From 097b30f87e8e9f3bdadd77ba0d197699175ce37c Mon Sep 17 00:00:00 2001
+From: Ivan Iskandar <iiiiskandar14@gmail.com>
+Date: Mon, 5 Dec 2016 19:00:04 +0700
+Subject: [PATCH 27/47] 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
+and volume panel expand icon.
+
+Change-Id: Ice8d8a520b9b22ba773cceb885e11c8a4bbf6d5f
+---
+ .../anim/ic_qs_collapse_chevron_02_animation.xml   | 25 +++++++++
+ .../anim/ic_qs_collapse_rectangle_1_animation.xml  | 26 +++++++++
+ .../anim/ic_qs_collapse_rectangle_2_animation.xml  | 26 +++++++++
+ .../res/anim/ic_qs_expand_chevron_01_animation.xml | 25 +++++++++
+ .../anim/ic_qs_expand_rectangle_3_animation.xml    | 26 +++++++++
+ .../anim/ic_qs_expand_rectangle_4_animation.xml    | 26 +++++++++
+ packages/SystemUI/res/drawable/ic_qs_collapse.xml  | 62 ++++++++++++++++++++++
+ .../res/drawable/ic_qs_collapse_animation.xml      | 29 ++++++++++
+ packages/SystemUI/res/drawable/ic_qs_expand.xml    | 62 ++++++++++++++++++++++
+ .../res/drawable/ic_qs_expand_animation.xml        | 29 ++++++++++
+ .../ic_qs_collapse_animation_interpolator_0.xml    | 17 ++++++
+ .../ic_qs_expand_animation_interpolator_0.xml      | 17 ++++++
+ .../statusbar/phone/ExpandableIndicator.java       |  8 +--
+ 13 files changed, 374 insertions(+), 4 deletions(-)
+ create mode 100644 packages/SystemUI/res/anim/ic_qs_collapse_chevron_02_animation.xml
+ create mode 100644 packages/SystemUI/res/anim/ic_qs_collapse_rectangle_1_animation.xml
+ create mode 100644 packages/SystemUI/res/anim/ic_qs_collapse_rectangle_2_animation.xml
+ create mode 100644 packages/SystemUI/res/anim/ic_qs_expand_chevron_01_animation.xml
+ create mode 100644 packages/SystemUI/res/anim/ic_qs_expand_rectangle_3_animation.xml
+ create mode 100644 packages/SystemUI/res/anim/ic_qs_expand_rectangle_4_animation.xml
+ create mode 100644 packages/SystemUI/res/drawable/ic_qs_collapse.xml
+ create mode 100644 packages/SystemUI/res/drawable/ic_qs_collapse_animation.xml
+ create mode 100644 packages/SystemUI/res/drawable/ic_qs_expand.xml
+ create mode 100644 packages/SystemUI/res/drawable/ic_qs_expand_animation.xml
+ create mode 100644 packages/SystemUI/res/interpolator/ic_qs_collapse_animation_interpolator_0.xml
+ create mode 100644 packages/SystemUI/res/interpolator/ic_qs_expand_animation_interpolator_0.xml
+
+diff --git a/packages/SystemUI/res/anim/ic_qs_collapse_chevron_02_animation.xml b/packages/SystemUI/res/anim/ic_qs_collapse_chevron_02_animation.xml
+new file mode 100644
+index 00000000000..443f2a651e5
+--- /dev/null
++++ b/packages/SystemUI/res/anim/ic_qs_collapse_chevron_02_animation.xml
+@@ -0,0 +1,25 @@
++<!--
++     Copyright (C) 2015 The Android Open Source Project
++
++     Licensed under the Apache License, Version 2.0 (the "License");
++     you may not use this file except in compliance with the License.
++     You may obtain a copy of the License at
++
++          http://www.apache.org/licenses/LICENSE-2.0
++
++     Unless required by applicable law or agreed to in writing, software
++     distributed under the License is distributed on an "AS IS" BASIS,
++     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++     See the License for the specific language governing permissions and
++     limitations under the License.
++-->
++<set xmlns:android="http://schemas.android.com/apk/res/android" >
++
++    <objectAnimator
++        android:duration="250"
++        android:interpolator="@android:interpolator/fast_out_slow_in"
++        android:pathData="M 12.0,9.0 c 0.0,0.66667 0.0,5.0 0.0,6.0"
++        android:propertyXName="translateX"
++        android:propertyYName="translateY" />
++
++</set>
+\ No newline at end of file
+diff --git a/packages/SystemUI/res/anim/ic_qs_collapse_rectangle_1_animation.xml b/packages/SystemUI/res/anim/ic_qs_collapse_rectangle_1_animation.xml
+new file mode 100644
+index 00000000000..b73cdcad154
+--- /dev/null
++++ b/packages/SystemUI/res/anim/ic_qs_collapse_rectangle_1_animation.xml
+@@ -0,0 +1,26 @@
++<!--
++     Copyright (C) 2015 The Android Open Source Project
++
++     Licensed under the Apache License, Version 2.0 (the "License");
++     you may not use this file except in compliance with the License.
++     You may obtain a copy of the License at
++
++          http://www.apache.org/licenses/LICENSE-2.0
++
++     Unless required by applicable law or agreed to in writing, software
++     distributed under the License is distributed on an "AS IS" BASIS,
++     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++     See the License for the specific language governing permissions and
++     limitations under the License.
++-->
++<set xmlns:android="http://schemas.android.com/apk/res/android" >
++
++    <objectAnimator
++        android:duration="200"
++        android:interpolator="@interpolator/ic_qs_collapse_animation_interpolator_0"
++        android:propertyName="rotation"
++        android:valueFrom="45.0"
++        android:valueTo="-45.0"
++        android:valueType="floatType" />
++
++</set>
+diff --git a/packages/SystemUI/res/anim/ic_qs_collapse_rectangle_2_animation.xml b/packages/SystemUI/res/anim/ic_qs_collapse_rectangle_2_animation.xml
+new file mode 100644
+index 00000000000..91c83fc5eff
+--- /dev/null
++++ b/packages/SystemUI/res/anim/ic_qs_collapse_rectangle_2_animation.xml
+@@ -0,0 +1,26 @@
++<!--
++     Copyright (C) 2015 The Android Open Source Project
++
++     Licensed under the Apache License, Version 2.0 (the "License");
++     you may not use this file except in compliance with the License.
++     You may obtain a copy of the License at
++
++          http://www.apache.org/licenses/LICENSE-2.0
++
++     Unless required by applicable law or agreed to in writing, software
++     distributed under the License is distributed on an "AS IS" BASIS,
++     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++     See the License for the specific language governing permissions and
++     limitations under the License.
++-->
++<set xmlns:android="http://schemas.android.com/apk/res/android" >
++
++    <objectAnimator
++        android:duration="200"
++        android:interpolator="@interpolator/ic_qs_collapse_animation_interpolator_0"
++        android:propertyName="rotation"
++        android:valueFrom="-45.0"
++        android:valueTo="45.0"
++        android:valueType="floatType" />
++
++</set>
+diff --git a/packages/SystemUI/res/anim/ic_qs_expand_chevron_01_animation.xml b/packages/SystemUI/res/anim/ic_qs_expand_chevron_01_animation.xml
+new file mode 100644
+index 00000000000..e43e6453d82
+--- /dev/null
++++ b/packages/SystemUI/res/anim/ic_qs_expand_chevron_01_animation.xml
+@@ -0,0 +1,25 @@
++<!--
++     Copyright (C) 2015 The Android Open Source Project
++
++     Licensed under the Apache License, Version 2.0 (the "License");
++     you may not use this file except in compliance with the License.
++     You may obtain a copy of the License at
++
++          http://www.apache.org/licenses/LICENSE-2.0
++
++     Unless required by applicable law or agreed to in writing, software
++     distributed under the License is distributed on an "AS IS" BASIS,
++     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++     See the License for the specific language governing permissions and
++     limitations under the License.
++-->
++<set xmlns:android="http://schemas.android.com/apk/res/android" >
++
++    <objectAnimator
++        android:duration="250"
++        android:interpolator="@android:interpolator/fast_out_slow_in"
++        android:pathData="M 12.0,15.0 c 0.0,-1.0 0.0,-5.33333 0.0,-6.0"
++        android:propertyXName="translateX"
++        android:propertyYName="translateY" />
++
++</set>
+\ No newline at end of file
+diff --git a/packages/SystemUI/res/anim/ic_qs_expand_rectangle_3_animation.xml b/packages/SystemUI/res/anim/ic_qs_expand_rectangle_3_animation.xml
+new file mode 100644
+index 00000000000..493bdae7900
+--- /dev/null
++++ b/packages/SystemUI/res/anim/ic_qs_expand_rectangle_3_animation.xml
+@@ -0,0 +1,26 @@
++<!--
++     Copyright (C) 2015 The Android Open Source Project
++
++     Licensed under the Apache License, Version 2.0 (the "License");
++     you may not use this file except in compliance with the License.
++     You may obtain a copy of the License at
++
++          http://www.apache.org/licenses/LICENSE-2.0
++
++     Unless required by applicable law or agreed to in writing, software
++     distributed under the License is distributed on an "AS IS" BASIS,
++     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++     See the License for the specific language governing permissions and
++     limitations under the License.
++-->
++<set xmlns:android="http://schemas.android.com/apk/res/android" >
++
++    <objectAnimator
++        android:duration="200"
++        android:interpolator="@interpolator/ic_qs_expand_animation_interpolator_0"
++        android:propertyName="rotation"
++        android:valueFrom="45.0"
++        android:valueTo="-45.0"
++        android:valueType="floatType" />
++
++</set>
+diff --git a/packages/SystemUI/res/anim/ic_qs_expand_rectangle_4_animation.xml b/packages/SystemUI/res/anim/ic_qs_expand_rectangle_4_animation.xml
+new file mode 100644
+index 00000000000..58e485c9c74
+--- /dev/null
++++ b/packages/SystemUI/res/anim/ic_qs_expand_rectangle_4_animation.xml
+@@ -0,0 +1,26 @@
++<!--
++     Copyright (C) 2015 The Android Open Source Project
++
++     Licensed under the Apache License, Version 2.0 (the "License");
++     you may not use this file except in compliance with the License.
++     You may obtain a copy of the License at
++
++          http://www.apache.org/licenses/LICENSE-2.0
++
++     Unless required by applicable law or agreed to in writing, software
++     distributed under the License is distributed on an "AS IS" BASIS,
++     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++     See the License for the specific language governing permissions and
++     limitations under the License.
++-->
++<set xmlns:android="http://schemas.android.com/apk/res/android" >
++
++    <objectAnimator
++        android:duration="200"
++        android:interpolator="@interpolator/ic_qs_expand_animation_interpolator_0"
++        android:propertyName="rotation"
++        android:valueFrom="-45.0"
++        android:valueTo="45.0"
++        android:valueType="floatType" />
++
++</set>
+diff --git a/packages/SystemUI/res/drawable/ic_qs_collapse.xml b/packages/SystemUI/res/drawable/ic_qs_collapse.xml
+new file mode 100644
+index 00000000000..bba6b7f1341
+--- /dev/null
++++ b/packages/SystemUI/res/drawable/ic_qs_collapse.xml
+@@ -0,0 +1,62 @@
++<!--
++     Copyright (C) 2015 The Android Open Source Project
++
++     Licensed under the Apache License, Version 2.0 (the "License");
++     you may not use this file except in compliance with the License.
++     You may obtain a copy of the License at
++
++          http://www.apache.org/licenses/LICENSE-2.0
++
++     Unless required by applicable law or agreed to in writing, software
++     distributed under the License is distributed on an "AS IS" BASIS,
++     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++     See the License for the specific language governing permissions and
++     limitations under the License.
++-->
++<vector xmlns:android="http://schemas.android.com/apk/res/android"
++    android:name="ic_qs_collapse"
++    android:height="24dp"
++    android:viewportHeight="24"
++    android:viewportWidth="24"
++    android:width="24dp" >
++
++    <group
++        android:name="chevron_02"
++        android:rotation="90"
++        android:translateX="12"
++        android:translateY="9" >
++        <group
++            android:name="rectangle_2"
++            android:rotation="-45" >
++            <group
++                android:name="rectangle_2_pivot"
++                android:translateY="4" >
++                <group
++                    android:name="rectangle_path_2_position"
++                    android:translateY="-1" >
++                    <path
++                        android:name="rectangle_path_2"
++                        android:fillColor="#FFFFFFFF"
++                        android:pathData="M -1.0,-4.0 l 2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l -2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,-8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" />
++                </group>
++            </group>
++        </group>
++        <group
++            android:name="rectangle_1"
++            android:rotation="45" >
++            <group
++                android:name="rectangle_1_pivot"
++                android:translateY="-4" >
++                <group
++                    android:name="rectangle_path_1_position"
++                    android:translateY="1" >
++                    <path
++                        android:name="rectangle_path_1"
++                        android:fillColor="#FFFFFFFF"
++                        android:pathData="M -1.0,-4.0 l 2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l -2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,-8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" />
++                </group>
++            </group>
++        </group>
++    </group>
++
++</vector>
+diff --git a/packages/SystemUI/res/drawable/ic_qs_collapse_animation.xml b/packages/SystemUI/res/drawable/ic_qs_collapse_animation.xml
+new file mode 100644
+index 00000000000..8138b2e9cff
+--- /dev/null
++++ b/packages/SystemUI/res/drawable/ic_qs_collapse_animation.xml
+@@ -0,0 +1,29 @@
++<!--
++     Copyright (C) 2015 The Android Open Source Project
++
++     Licensed under the Apache License, Version 2.0 (the "License");
++     you may not use this file except in compliance with the License.
++     You may obtain a copy of the License at
++
++          http://www.apache.org/licenses/LICENSE-2.0
++
++     Unless required by applicable law or agreed to in writing, software
++     distributed under the License is distributed on an "AS IS" BASIS,
++     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++     See the License for the specific language governing permissions and
++     limitations under the License.
++-->
++<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
++    android:drawable="@drawable/ic_qs_collapse" >
++
++    <target
++        android:name="chevron_02"
++        android:animation="@anim/ic_qs_collapse_chevron_02_animation" />
++    <target
++        android:name="rectangle_2"
++        android:animation="@anim/ic_qs_collapse_rectangle_2_animation" />
++    <target
++        android:name="rectangle_1"
++        android:animation="@anim/ic_qs_collapse_rectangle_1_animation" />
++
++</animated-vector>
+diff --git a/packages/SystemUI/res/drawable/ic_qs_expand.xml b/packages/SystemUI/res/drawable/ic_qs_expand.xml
+new file mode 100644
+index 00000000000..bb220641e81
+--- /dev/null
++++ b/packages/SystemUI/res/drawable/ic_qs_expand.xml
+@@ -0,0 +1,62 @@
++<!--
++     Copyright (C) 2015 The Android Open Source Project
++
++     Licensed under the Apache License, Version 2.0 (the "License");
++     you may not use this file except in compliance with the License.
++     You may obtain a copy of the License at
++
++          http://www.apache.org/licenses/LICENSE-2.0
++
++     Unless required by applicable law or agreed to in writing, software
++     distributed under the License is distributed on an "AS IS" BASIS,
++     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++     See the License for the specific language governing permissions and
++     limitations under the License.
++-->
++<vector xmlns:android="http://schemas.android.com/apk/res/android"
++    android:name="ic_qs_expand"
++    android:height="24dp"
++    android:viewportHeight="24"
++    android:viewportWidth="24"
++    android:width="24dp" >
++
++    <group
++        android:name="chevron_01"
++        android:rotation="90"
++        android:translateX="12"
++        android:translateY="15" >
++        <group
++            android:name="rectangle_3"
++            android:rotation="45" >
++            <group
++                android:name="rectangle_2_pivot_0"
++                android:translateY="4" >
++                <group
++                    android:name="rectangle_path_3_position"
++                    android:translateY="-1" >
++                    <path
++                        android:name="rectangle_path_3"
++                        android:fillColor="#FFFFFFFF"
++                        android:pathData="M -1.0,-4.0 l 2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l -2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,-8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" />
++                </group>
++            </group>
++        </group>
++        <group
++            android:name="rectangle_4"
++            android:rotation="-45" >
++            <group
++                android:name="rectangle_1_pivot_0"
++                android:translateY="-4" >
++                <group
++                    android:name="rectangle_path_4_position"
++                    android:translateY="1" >
++                    <path
++                        android:name="rectangle_path_4"
++                        android:fillColor="#FFFFFFFF"
++                        android:pathData="M -1.0,-4.0 l 2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l -2.0,0.0 c 0.0,0.0 0.0,0.0 0.0,0.0 l 0.0,-8.0 c 0.0,0.0 0.0,0.0 0.0,0.0 Z" />
++                </group>
++            </group>
++        </group>
++    </group>
++
++</vector>
+diff --git a/packages/SystemUI/res/drawable/ic_qs_expand_animation.xml b/packages/SystemUI/res/drawable/ic_qs_expand_animation.xml
+new file mode 100644
+index 00000000000..b561ee06ad8
+--- /dev/null
++++ b/packages/SystemUI/res/drawable/ic_qs_expand_animation.xml
+@@ -0,0 +1,29 @@
++<!--
++     Copyright (C) 2015 The Android Open Source Project
++
++     Licensed under the Apache License, Version 2.0 (the "License");
++     you may not use this file except in compliance with the License.
++     You may obtain a copy of the License at
++
++          http://www.apache.org/licenses/LICENSE-2.0
++
++     Unless required by applicable law or agreed to in writing, software
++     distributed under the License is distributed on an "AS IS" BASIS,
++     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++     See the License for the specific language governing permissions and
++     limitations under the License.
++-->
++<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
++    android:drawable="@drawable/ic_qs_expand" >
++
++    <target
++        android:name="chevron_01"
++        android:animation="@anim/ic_qs_expand_chevron_01_animation" />
++    <target
++        android:name="rectangle_3"
++        android:animation="@anim/ic_qs_expand_rectangle_3_animation" />
++    <target
++        android:name="rectangle_4"
++        android:animation="@anim/ic_qs_expand_rectangle_4_animation" />
++
++</animated-vector>
+diff --git a/packages/SystemUI/res/interpolator/ic_qs_collapse_animation_interpolator_0.xml b/packages/SystemUI/res/interpolator/ic_qs_collapse_animation_interpolator_0.xml
+new file mode 100644
+index 00000000000..c3930e42cda
+--- /dev/null
++++ b/packages/SystemUI/res/interpolator/ic_qs_collapse_animation_interpolator_0.xml
+@@ -0,0 +1,17 @@
++<!--
++     Copyright (C) 2015 The Android Open Source Project
++
++     Licensed under the Apache License, Version 2.0 (the "License");
++     you may not use this file except in compliance with the License.
++     You may obtain a copy of the License at
++
++          http://www.apache.org/licenses/LICENSE-2.0
++
++     Unless required by applicable law or agreed to in writing, software
++     distributed under the License is distributed on an "AS IS" BASIS,
++     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++     See the License for the specific language governing permissions and
++     limitations under the License.
++-->
++<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
++    android:pathData="M 0.0,0.0 c 0.0001,0.0 0.0,1.0 1.0,1.0" />
+diff --git a/packages/SystemUI/res/interpolator/ic_qs_expand_animation_interpolator_0.xml b/packages/SystemUI/res/interpolator/ic_qs_expand_animation_interpolator_0.xml
+new file mode 100644
+index 00000000000..c3930e42cda
+--- /dev/null
++++ b/packages/SystemUI/res/interpolator/ic_qs_expand_animation_interpolator_0.xml
+@@ -0,0 +1,17 @@
++<!--
++     Copyright (C) 2015 The Android Open Source Project
++
++     Licensed under the Apache License, Version 2.0 (the "License");
++     you may not use this file except in compliance with the License.
++     You may obtain a copy of the License at
++
++          http://www.apache.org/licenses/LICENSE-2.0
++
++     Unless required by applicable law or agreed to in writing, software
++     distributed under the License is distributed on an "AS IS" BASIS,
++     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++     See the License for the specific language governing permissions and
++     limitations under the License.
++-->
++<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
++    android:pathData="M 0.0,0.0 c 0.0001,0.0 0.0,1.0 1.0,1.0" />
+diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandableIndicator.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandableIndicator.java
+index a295cfacbbc..0f04c28b98c 100644
+--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandableIndicator.java
++++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandableIndicator.java
+@@ -57,11 +57,11 @@ public class ExpandableIndicator extends ImageView {
+     private int getDrawableResourceId(boolean expanded) {
+         if (mIsDefaultDirection) {
+-            return expanded ? R.drawable.ic_volume_collapse_animation
+-                    : R.drawable.ic_volume_expand_animation;
++            return expanded ? R.drawable.ic_qs_collapse_animation
++                    : R.drawable.ic_qs_expand_animation;
+         } else {
+-            return expanded ? R.drawable.ic_volume_expand_animation
+-                    : R.drawable.ic_volume_collapse_animation;
++            return expanded ? R.drawable.ic_qs_expand_animation
++                    : R.drawable.ic_qs_collapse_animation;
+         }
+     }
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0028-OMS7-N-ApplicationsState-add-filter-for-Substratum-i.patch b/patches/frameworks/base/0028-OMS7-N-ApplicationsState-add-filter-for-Substratum-i.patch
deleted file mode 100644 (file)
index 4df3016..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-From 7f1b9cd639a2dfeb3171c42e35e569687e964923 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/44] 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.
-
-Base this off the work from @KreAch3R
-
-Change-Id: I594c993977733e67f566ac65df50ad2e1bbdbdd3
-(cherry picked from commit 4d682464550f71e72e491934c78b8a42fdfc0348)
----
- .../android/settingslib/applications/ApplicationsState.java   | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java b/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
-index 6fecd4044ca..d3a6e217735 100644
---- a/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
-+++ b/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
-@@ -1325,6 +1325,17 @@ public class ApplicationsState {
-         }
-     };
-+    public static final AppFilter FILTER_SUBSTRATUM_ICONS = new AppFilter() {
-+        public void init() {
-+        }
-+
-+        @Override
-+        public boolean filterApp(AppEntry entry) {
-+            return !((entry.info.metaData != null) &&
-+                    (entry.info.metaData.getString("Substratum_IconPack") != null));
-+        }
-+    };
-+
-     public static final AppFilter FILTER_WORK = new AppFilter() {
-         private int mCurrentUser;
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0028-OMS7-N-ApplicationsState-add-filter-for-Substratum-o.patch b/patches/frameworks/base/0028-OMS7-N-ApplicationsState-add-filter-for-Substratum-o.patch
new file mode 100644 (file)
index 0000000..69816a4
--- /dev/null
@@ -0,0 +1,53 @@
+From 2df6686a1a9db81489b5a4057f62b16f480b8ee3 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 28/47] OMS7-N: ApplicationsState: add filter for Substratum
+ overlays [1/2]
+
+This commit allows the framework to handle the filtering of the
+overlays found for OMS.
+
+Change-Id: I7646115e8f73494d726728fac58cc47aafd69d5d
+---
+ .../settingslib/applications/ApplicationsState.java     | 17 +++++++++++++++--
+ 1 file changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java b/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
+index f0ec1078650..6fecd4044ca 100644
+--- a/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
++++ b/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
+@@ -137,9 +137,11 @@ public class ApplicationsState {
+         // Only the owner can see all apps.
+         mAdminRetrieveFlags = PackageManager.GET_UNINSTALLED_PACKAGES |
+                 PackageManager.GET_DISABLED_COMPONENTS |
+-                PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS;
++                PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS |
++                PackageManager.GET_META_DATA;
+         mRetrieveFlags = PackageManager.GET_DISABLED_COMPONENTS |
+-                PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS;
++                PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS |
++                PackageManager.GET_META_DATA;
+         /**
+          * This is a trick to prevent the foreground thread from being delayed.
+@@ -1312,6 +1314,17 @@ public class ApplicationsState {
+         }
+     };
++    public static final AppFilter FILTER_SUBSTRATUM = new AppFilter() {
++        public void init() {
++        }
++
++        @Override
++        public boolean filterApp(AppEntry entry) {
++            return !((entry.info.metaData != null) &&
++                    (entry.info.metaData.getString("Substratum_Parent") != null));
++        }
++    };
++
+     public static final AppFilter FILTER_WORK = new AppFilter() {
+         private int mCurrentUser;
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0029-OMS7-N-ApplicationsState-add-filter-for-Substratum-i.patch b/patches/frameworks/base/0029-OMS7-N-ApplicationsState-add-filter-for-Substratum-i.patch
new file mode 100644 (file)
index 0000000..61e5659
--- /dev/null
@@ -0,0 +1,41 @@
+From ff8f57248873dc3d106b6624c3ef37c1d3cf6dce Mon Sep 17 00:00:00 2001
+From: Kuba Schenk <abukcz@gmail.com>
+Date: Thu, 1 Dec 2016 21:48:26 +0100
+Subject: [PATCH 29/47] 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.
+
+Base this off the work from @KreAch3R
+
+Change-Id: I594c993977733e67f566ac65df50ad2e1bbdbdd3
+(cherry picked from commit 4d682464550f71e72e491934c78b8a42fdfc0348)
+---
+ .../android/settingslib/applications/ApplicationsState.java   | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java b/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
+index 6fecd4044ca..d3a6e217735 100644
+--- a/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
++++ b/packages/SettingsLib/src/com/android/settingslib/applications/ApplicationsState.java
+@@ -1325,6 +1325,17 @@ public class ApplicationsState {
+         }
+     };
++    public static final AppFilter FILTER_SUBSTRATUM_ICONS = new AppFilter() {
++        public void init() {
++        }
++
++        @Override
++        public boolean filterApp(AppEntry entry) {
++            return !((entry.info.metaData != null) &&
++                    (entry.info.metaData.getString("Substratum_IconPack") != null));
++        }
++    };
++
+     public static final AppFilter FILTER_WORK = new AppFilter() {
+         private int mCurrentUser;
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0029-Themes-Expose-QS-battery.patch b/patches/frameworks/base/0029-Themes-Expose-QS-battery.patch
deleted file mode 100644 (file)
index 49f5716..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-From 4b6718b1d817e67849e600c648feca802f7e2d7c 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/44] Themes: Expose QS battery
-
-This is needed for white themes like Belo. Should function the same with dark themes as well.
-
-Change-Id: I65e3f777a2a2605a06260705f92f8617407d9005
----
- packages/SystemUI/res/layout/battery_detail.xml | 6 +++---
- packages/SystemUI/res/values/projekt_colors.xml | 6 ++++++
- 2 files changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/packages/SystemUI/res/layout/battery_detail.xml b/packages/SystemUI/res/layout/battery_detail.xml
-index 8abfcf6057a..af3acdc5c53 100644
---- a/packages/SystemUI/res/layout/battery_detail.xml
-+++ b/packages/SystemUI/res/layout/battery_detail.xml
-@@ -27,7 +27,7 @@
-         android:layout_height="wrap_content"
-         android:paddingStart="16dp"
-         android:textAppearance="?android:attr/textAppearanceSmall"
--        android:textColor="?android:attr/colorAccent" />
-+        android:textColor="@color/qs_battery_text_color" />
-     <com.android.systemui.ResizingSpace
-         android:layout_width="match_parent"
-@@ -40,8 +40,8 @@
-         android:layout_marginStart="16dp"
-         android:layout_marginEnd="24dp"
-         systemui:sideLabels="@array/battery_labels"
--        android:colorAccent="?android:attr/colorAccent"
--        systemui:textColor="#66FFFFFF" />
-+        android:colorAccent="@color/qs_battery_accent"
-+        systemui:textColor="@color/qs_battery_graph_text_color" />
-     <com.android.systemui.ResizingSpace
-         android:layout_width="match_parent"
-diff --git a/packages/SystemUI/res/values/projekt_colors.xml b/packages/SystemUI/res/values/projekt_colors.xml
-index 0f891994c9d..83b852416e1 100644
---- a/packages/SystemUI/res/values/projekt_colors.xml
-+++ b/packages/SystemUI/res/values/projekt_colors.xml
-@@ -24,4 +24,10 @@
-     <color name="qs_alarm_status_text_color">#64ffffff</color>
-     <!-- QS edit page toolbar text color -->
-     <color name="qs_edit_toolbar_text_color">#FFFFFF</color>
-+    <!-- QS battery % text color -->
-+    <color name="qs_battery_text_color">@*android:color/accent_device_default_light</color>
-+    <!-- QS battery graph text color -->
-+    <color name="qs_battery_graph_text_color">#66FFFFFF</color>
-+    <!-- QS battery accent color -->
-+    <color name="qs_battery_accent">@*android:color/accent_device_default_light</color>
- </resources>
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0030-OMS-Introduce-MODIFY_OVERLAYS-permission-for-user-ap.patch b/patches/frameworks/base/0030-OMS-Introduce-MODIFY_OVERLAYS-permission-for-user-ap.patch
deleted file mode 100644 (file)
index 4b89766..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-From a52d42aabfef0bb6460c0e2f23d848e0e7b17205 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/44] 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
-this permissions, OMS falls back to default permission checks
-
-Change-Id: Ib6b10b516577f338aee31e759bfd16278f902c20
-(cherry picked from commit 8e59c96513c573a4912492c005b076cb2a972332)
----
- core/res/AndroidManifest.xml                       |  6 +++++
- core/res/res/values/strings.xml                    |  5 +++++
- .../android/server/om/OverlayManagerService.java   | 26 +++++++++++++++-------
- 3 files changed, 29 insertions(+), 8 deletions(-)
-
-diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
-index 6a5bd3946db..3ceb17ba568 100644
---- a/core/res/AndroidManifest.xml
-+++ b/core/res/AndroidManifest.xml
-@@ -3162,6 +3162,12 @@
-     <permission android:name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME"
-                 android:protectionLevel="signature|privileged" />
-+    <!-- Allows an application to make calls to OverlayManagerService.-->
-+    <permission android:name="android.permission.MODIFY_OVERLAYS"
-+        android:label="@string/permlab_modifyOverlays"
-+        android:description="@string/permdesc_modifyOverlays"
-+        android:protectionLevel="normal" />
-+
-     <application android:process="system"
-                  android:persistent="true"
-                  android:hasCode="false"
-diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
-index 8f5f8cfa0de..8313d5d0b9c 100755
---- a/core/res/res/values/strings.xml
-+++ b/core/res/res/values/strings.xml
-@@ -1411,6 +1411,11 @@
-     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-     <string name="permdesc_access_notification_policy">Allows the app to read and write Do Not Disturb configuration.</string>
-+    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-+    <string name="permlab_modifyOverlays">modify theme overlays</string>
-+    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-+    <string name="permdesc_modifyOverlays">Allows the app to make modifications to theme overlays using OverlayManagerService</string>
-+
-     <!-- Policy administration -->
-     <!-- Title of policy access to limiting the user's password choices -->
-diff --git a/services/core/java/com/android/server/om/OverlayManagerService.java b/services/core/java/com/android/server/om/OverlayManagerService.java
-index deb9046a2d4..e205ce1d030 100644
---- a/services/core/java/com/android/server/om/OverlayManagerService.java
-+++ b/services/core/java/com/android/server/om/OverlayManagerService.java
-@@ -36,6 +36,7 @@ import android.content.om.IOverlayManager;
- import android.content.om.OverlayInfo;
- import android.content.pm.IPackageManager;
- import android.content.pm.PackageInfo;
-+import android.content.pm.PackageManager;
- import android.content.pm.PackageManagerInternal;
- import android.content.pm.UserInfo;
- import android.net.Uri;
-@@ -114,7 +115,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
-  *     the caller runs as, or if the caller holds the
-  *     INTERACT_ACROSS_USERS_FULL permission. Write-access is granted if the
-  *     caller is granted read-access and additionaly holds the
-- *     CHANGE_CONFIGURATION permission.</li>
-+ *     CHANGE_CONFIGURATION permission. Additionally, read and write access
-+ *     is granted by the MODIFY_OVERLAYS permission.</li>
-  * </ul>
-  *
-  * <p>The AIDL interface works with String package names, int user IDs, and
-@@ -549,19 +551,24 @@ public final class OverlayManagerService extends SystemService {
-         /**
-          * Ensure that the caller has permission to interact with the given userId.
-          * If the calling user is not the same as the provided user, the caller needs
--         * to hold the INTERACT_ACROSS_USERS_FULL permission (or be system uid or
-+         * to hold the INTERACT_ACROSS_USERS_FULL permission or MODIFY_OVERLAYS permission (or be system uid or
-          * root).
-          *
-          * @param userId the user to interact with
-          * @param message message for any SecurityException
-          */
-         private int handleIncomingUser(final int userId, @NonNull final String message) {
--            return ActivityManager.handleIncomingUser(Binder.getCallingPid(),
--                    Binder.getCallingUid(), userId, false, true, message, null);
-+            if (getContext().checkCallingOrSelfPermission(
-+                    android.Manifest.permission.MODIFY_OVERLAYS) == PackageManager.PERMISSION_GRANTED) {
-+                return userId;
-+            } else {
-+                return ActivityManager.handleIncomingUser(Binder.getCallingPid(),
-+                        Binder.getCallingUid(), userId, false, true, message, null);
-+            }
-         }
-         /**
--         * Enforce that the caller holds the CHANGE_CONFIGURATION permission (or is
-+         * Enforce that the caller holds the CHANGE_CONFIGURATION permission or MODIFY_OVERLAYS permission (or is
-          * system or root).
-          *
-          * @param message used as message if SecurityException is thrown
-@@ -570,9 +577,12 @@ public final class OverlayManagerService extends SystemService {
-         private void enforceChangeConfigurationPermission(@NonNull final String message) {
-             final int callingUid = Binder.getCallingUid();
--            if (callingUid != Process.SYSTEM_UID && callingUid != 0) {
--                getContext().enforceCallingOrSelfPermission(
--                        android.Manifest.permission.CHANGE_CONFIGURATION, message);
-+            if (getContext().checkCallingOrSelfPermission(
-+                    android.Manifest.permission.MODIFY_OVERLAYS) != PackageManager.PERMISSION_GRANTED) {
-+                if (callingUid != Process.SYSTEM_UID && callingUid != 0) {
-+                    getContext().enforceCallingOrSelfPermission(
-+                            android.Manifest.permission.CHANGE_CONFIGURATION, message);
-+                }
-             }
-         }
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0030-Themes-Expose-QS-battery.patch b/patches/frameworks/base/0030-Themes-Expose-QS-battery.patch
new file mode 100644 (file)
index 0000000..c67f36d
--- /dev/null
@@ -0,0 +1,55 @@
+From 71133b69ad20141d3ea63edeccc29a42d6815cf7 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 30/47] Themes: Expose QS battery
+
+This is needed for white themes like Belo. Should function the same with dark themes as well.
+
+Change-Id: I65e3f777a2a2605a06260705f92f8617407d9005
+---
+ packages/SystemUI/res/layout/battery_detail.xml | 6 +++---
+ packages/SystemUI/res/values/projekt_colors.xml | 6 ++++++
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/packages/SystemUI/res/layout/battery_detail.xml b/packages/SystemUI/res/layout/battery_detail.xml
+index 8abfcf6057a..af3acdc5c53 100644
+--- a/packages/SystemUI/res/layout/battery_detail.xml
++++ b/packages/SystemUI/res/layout/battery_detail.xml
+@@ -27,7 +27,7 @@
+         android:layout_height="wrap_content"
+         android:paddingStart="16dp"
+         android:textAppearance="?android:attr/textAppearanceSmall"
+-        android:textColor="?android:attr/colorAccent" />
++        android:textColor="@color/qs_battery_text_color" />
+     <com.android.systemui.ResizingSpace
+         android:layout_width="match_parent"
+@@ -40,8 +40,8 @@
+         android:layout_marginStart="16dp"
+         android:layout_marginEnd="24dp"
+         systemui:sideLabels="@array/battery_labels"
+-        android:colorAccent="?android:attr/colorAccent"
+-        systemui:textColor="#66FFFFFF" />
++        android:colorAccent="@color/qs_battery_accent"
++        systemui:textColor="@color/qs_battery_graph_text_color" />
+     <com.android.systemui.ResizingSpace
+         android:layout_width="match_parent"
+diff --git a/packages/SystemUI/res/values/projekt_colors.xml b/packages/SystemUI/res/values/projekt_colors.xml
+index 76cde3ed614..2e8308a26b1 100644
+--- a/packages/SystemUI/res/values/projekt_colors.xml
++++ b/packages/SystemUI/res/values/projekt_colors.xml
+@@ -24,4 +24,10 @@
+     <color name="qs_alarm_status_text_color">#64ffffff</color>
+     <!-- QS edit page toolbar text color -->
+     <color name="qs_edit_toolbar_text_color">#FFFFFF</color>
++    <!-- QS battery % text color -->
++    <color name="qs_battery_text_color">@*android:color/accent_device_default_light</color>
++    <!-- QS battery graph text color -->
++    <color name="qs_battery_graph_text_color">#66FFFFFF</color>
++    <!-- QS battery accent color -->
++    <color name="qs_battery_accent">@*android:color/accent_device_default_light</color>
+ </resources>
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0031-OMS-Introduce-MODIFY_OVERLAYS-permission-for-user-ap.patch b/patches/frameworks/base/0031-OMS-Introduce-MODIFY_OVERLAYS-permission-for-user-ap.patch
new file mode 100644 (file)
index 0000000..3007478
--- /dev/null
@@ -0,0 +1,120 @@
+From f3509121dd03604364ee4477193b6e35cfa47d95 Mon Sep 17 00:00:00 2001
+From: bigrushdog <randall.rushing@gmail.com>
+Date: Mon, 19 Dec 2016 04:33:31 -0800
+Subject: [PATCH 31/47] 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
+this permissions, OMS falls back to default permission checks
+
+Change-Id: Ib6b10b516577f338aee31e759bfd16278f902c20
+(cherry picked from commit 8e59c96513c573a4912492c005b076cb2a972332)
+---
+ core/res/AndroidManifest.xml                       |  6 +++++
+ core/res/res/values/strings.xml                    |  5 +++++
+ .../android/server/om/OverlayManagerService.java   | 26 +++++++++++++++-------
+ 3 files changed, 29 insertions(+), 8 deletions(-)
+
+diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
+index cd200e20481..fe1ef539139 100644
+--- a/core/res/AndroidManifest.xml
++++ b/core/res/AndroidManifest.xml
+@@ -3167,6 +3167,12 @@
+     <permission android:name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME"
+                 android:protectionLevel="signature|privileged" />
++    <!-- Allows an application to make calls to OverlayManagerService.-->
++    <permission android:name="android.permission.MODIFY_OVERLAYS"
++        android:label="@string/permlab_modifyOverlays"
++        android:description="@string/permdesc_modifyOverlays"
++        android:protectionLevel="normal" />
++
+     <application android:process="system"
+                  android:persistent="true"
+                  android:hasCode="false"
+diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
+index d3df61ba194..4a16df0da51 100755
+--- a/core/res/res/values/strings.xml
++++ b/core/res/res/values/strings.xml
+@@ -1426,6 +1426,11 @@
+     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+     <string name="permdesc_access_notification_policy">Allows the app to read and write Do Not Disturb configuration.</string>
++    <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
++    <string name="permlab_modifyOverlays">modify theme overlays</string>
++    <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
++    <string name="permdesc_modifyOverlays">Allows the app to make modifications to theme overlays using OverlayManagerService</string>
++
+     <!-- Policy administration -->
+     <!-- Title of policy access to limiting the user's password choices -->
+diff --git a/services/core/java/com/android/server/om/OverlayManagerService.java b/services/core/java/com/android/server/om/OverlayManagerService.java
+index deb9046a2d4..e205ce1d030 100644
+--- a/services/core/java/com/android/server/om/OverlayManagerService.java
++++ b/services/core/java/com/android/server/om/OverlayManagerService.java
+@@ -36,6 +36,7 @@ import android.content.om.IOverlayManager;
+ import android.content.om.OverlayInfo;
+ import android.content.pm.IPackageManager;
+ import android.content.pm.PackageInfo;
++import android.content.pm.PackageManager;
+ import android.content.pm.PackageManagerInternal;
+ import android.content.pm.UserInfo;
+ import android.net.Uri;
+@@ -114,7 +115,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
+  *     the caller runs as, or if the caller holds the
+  *     INTERACT_ACROSS_USERS_FULL permission. Write-access is granted if the
+  *     caller is granted read-access and additionaly holds the
+- *     CHANGE_CONFIGURATION permission.</li>
++ *     CHANGE_CONFIGURATION permission. Additionally, read and write access
++ *     is granted by the MODIFY_OVERLAYS permission.</li>
+  * </ul>
+  *
+  * <p>The AIDL interface works with String package names, int user IDs, and
+@@ -549,19 +551,24 @@ public final class OverlayManagerService extends SystemService {
+         /**
+          * Ensure that the caller has permission to interact with the given userId.
+          * If the calling user is not the same as the provided user, the caller needs
+-         * to hold the INTERACT_ACROSS_USERS_FULL permission (or be system uid or
++         * to hold the INTERACT_ACROSS_USERS_FULL permission or MODIFY_OVERLAYS permission (or be system uid or
+          * root).
+          *
+          * @param userId the user to interact with
+          * @param message message for any SecurityException
+          */
+         private int handleIncomingUser(final int userId, @NonNull final String message) {
+-            return ActivityManager.handleIncomingUser(Binder.getCallingPid(),
+-                    Binder.getCallingUid(), userId, false, true, message, null);
++            if (getContext().checkCallingOrSelfPermission(
++                    android.Manifest.permission.MODIFY_OVERLAYS) == PackageManager.PERMISSION_GRANTED) {
++                return userId;
++            } else {
++                return ActivityManager.handleIncomingUser(Binder.getCallingPid(),
++                        Binder.getCallingUid(), userId, false, true, message, null);
++            }
+         }
+         /**
+-         * Enforce that the caller holds the CHANGE_CONFIGURATION permission (or is
++         * Enforce that the caller holds the CHANGE_CONFIGURATION permission or MODIFY_OVERLAYS permission (or is
+          * system or root).
+          *
+          * @param message used as message if SecurityException is thrown
+@@ -570,9 +577,12 @@ public final class OverlayManagerService extends SystemService {
+         private void enforceChangeConfigurationPermission(@NonNull final String message) {
+             final int callingUid = Binder.getCallingUid();
+-            if (callingUid != Process.SYSTEM_UID && callingUid != 0) {
+-                getContext().enforceCallingOrSelfPermission(
+-                        android.Manifest.permission.CHANGE_CONFIGURATION, message);
++            if (getContext().checkCallingOrSelfPermission(
++                    android.Manifest.permission.MODIFY_OVERLAYS) != PackageManager.PERMISSION_GRANTED) {
++                if (callingUid != Process.SYSTEM_UID && callingUid != 0) {
++                    getContext().enforceCallingOrSelfPermission(
++                            android.Manifest.permission.CHANGE_CONFIGURATION, message);
++                }
+             }
+         }
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0031-SystemUI-Expose-switch-bar-title.patch b/patches/frameworks/base/0031-SystemUI-Expose-switch-bar-title.patch
deleted file mode 100644 (file)
index a139a70..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-From e6ffc28bf3894806ccaaa694eba82e0cbe9e34e9 Mon Sep 17 00:00:00 2001
-From: daveyannihilation <daveyannihilation@hotmail.com>
-Date: Sun, 1 Jan 2017 01:47:53 -0700
-Subject: [PATCH 31/44] SystemUI: Expose switch bar title
-
-This is needed for the power notifications switchbar in SystemUI Tuner, amongst other things.
-
-Change-Id: I86f04840c2be46519509556b8d0061cefe26f631
----
- packages/SystemUI/res/layout/switch_bar.xml     |  3 +--
- packages/SystemUI/res/values/projekt_styles.xml | 24 ++++++++++++++++++++++++
- 2 files changed, 25 insertions(+), 2 deletions(-)
- create mode 100644 packages/SystemUI/res/values/projekt_styles.xml
-
-diff --git a/packages/SystemUI/res/layout/switch_bar.xml b/packages/SystemUI/res/layout/switch_bar.xml
-index 41cdb78392a..344c5aa0531 100644
---- a/packages/SystemUI/res/layout/switch_bar.xml
-+++ b/packages/SystemUI/res/layout/switch_bar.xml
-@@ -33,8 +33,7 @@
-         android:paddingStart="48dp"
-         android:maxLines="2"
-         android:ellipsize="end"
--        android:textAppearance="@android:style/TextAppearance.Material.Title"
--        android:textColor="?android:attr/textColorPrimaryInverse"
-+        android:textAppearance="@style/TextAppearance.SwitchBar"
-         android:textAlignment="viewStart"
-         android:text="@string/switch_bar_on" />
-diff --git a/packages/SystemUI/res/values/projekt_styles.xml b/packages/SystemUI/res/values/projekt_styles.xml
-new file mode 100644
-index 00000000000..f49834bc202
---- /dev/null
-+++ b/packages/SystemUI/res/values/projekt_styles.xml
-@@ -0,0 +1,24 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<!--
-+    Copyright (c) 2016 Projekt Substratum
-+
-+    Licensed under the Apache License, Version 2.0 (the "License");
-+    you may not use this file except in compliance with the License.
-+    You may obtain a copy of the License at
-+
-+        http://www.apache.org/licenses/LICENSE-2.0
-+
-+    Unless required by applicable law or agreed to in writing, software
-+    distributed under the License is distributed on an "AS IS" BASIS,
-+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+    See the License for the specific language governing permissions and
-+    limitations under the License.
-+-->
-+
-+<resources>
-+    <!-- Switch bar text appearance -->
-+    <style name="TextAppearance.SwitchBar" parent="@android:style/TextAppearance.Material.Title">
-+        <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
-+    </style>
-+</resources>
-+
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0032-SystemUI-Expose-switch-bar-title.patch b/patches/frameworks/base/0032-SystemUI-Expose-switch-bar-title.patch
new file mode 100644 (file)
index 0000000..048398a
--- /dev/null
@@ -0,0 +1,61 @@
+From 35c793d3fa2c1c909d0108a1139ff7860a400b6f Mon Sep 17 00:00:00 2001
+From: daveyannihilation <daveyannihilation@hotmail.com>
+Date: Sun, 1 Jan 2017 01:47:53 -0700
+Subject: [PATCH 32/47] SystemUI: Expose switch bar title
+
+This is needed for the power notifications switchbar in SystemUI Tuner, amongst other things.
+
+Change-Id: I86f04840c2be46519509556b8d0061cefe26f631
+---
+ packages/SystemUI/res/layout/switch_bar.xml     |  3 +--
+ packages/SystemUI/res/values/projekt_styles.xml | 24 ++++++++++++++++++++++++
+ 2 files changed, 25 insertions(+), 2 deletions(-)
+ create mode 100644 packages/SystemUI/res/values/projekt_styles.xml
+
+diff --git a/packages/SystemUI/res/layout/switch_bar.xml b/packages/SystemUI/res/layout/switch_bar.xml
+index 41cdb78392a..344c5aa0531 100644
+--- a/packages/SystemUI/res/layout/switch_bar.xml
++++ b/packages/SystemUI/res/layout/switch_bar.xml
+@@ -33,8 +33,7 @@
+         android:paddingStart="48dp"
+         android:maxLines="2"
+         android:ellipsize="end"
+-        android:textAppearance="@android:style/TextAppearance.Material.Title"
+-        android:textColor="?android:attr/textColorPrimaryInverse"
++        android:textAppearance="@style/TextAppearance.SwitchBar"
+         android:textAlignment="viewStart"
+         android:text="@string/switch_bar_on" />
+diff --git a/packages/SystemUI/res/values/projekt_styles.xml b/packages/SystemUI/res/values/projekt_styles.xml
+new file mode 100644
+index 00000000000..d0be98087e6
+--- /dev/null
++++ b/packages/SystemUI/res/values/projekt_styles.xml
+@@ -0,0 +1,24 @@
++<?xml version="1.0" encoding="utf-8"?>
++<!--
++    Copyright (c) 2016-2017 Projekt Substratum
++
++    Licensed under the Apache License, Version 2.0 (the "License");
++    you may not use this file except in compliance with the License.
++    You may obtain a copy of the License at
++
++        http://www.apache.org/licenses/LICENSE-2.0
++
++    Unless required by applicable law or agreed to in writing, software
++    distributed under the License is distributed on an "AS IS" BASIS,
++    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++    See the License for the specific language governing permissions and
++    limitations under the License.
++-->
++
++<resources>
++    <!-- Switch bar text appearance -->
++    <style name="TextAppearance.SwitchBar" parent="@android:style/TextAppearance.Material.Title">
++        <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
++    </style>
++</resources>
++
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0032-doze-allow-grayscale-even-if-invert-boolean-is-false.patch b/patches/frameworks/base/0032-doze-allow-grayscale-even-if-invert-boolean-is-false.patch
deleted file mode 100644 (file)
index 72419f2..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-From 48b30b14aa7ec1039bc07ee3ce29d17f70df0ac2 Mon Sep 17 00:00:00 2001
-From: Daniel Koman <dankoman30@gmail.com>
-Date: Wed, 28 Sep 2016 15:28:26 +0200
-Subject: [PATCH 32/44] 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
-    color inversion, this was also preventing the notification
-    from grayscaling.  as a result, on dark themes (boolean false), we
-    were seeing color icons on doze notifications.  this commit fixes
-    the grayscaling, and brings back the very aesthetically pleasing
-    (imo) grayscale-to-color fade-in for the notifications' app icons.
-
-Change-Id: Ifc5efbccbeb02910684b76793721b10f1d64f870
----
- packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java b/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
-index 605f381e9e2..16d46c0362e 100644
---- a/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
-+++ b/packages/SystemUI/src/com/android/systemui/ViewInvertHelper.java
-@@ -92,7 +92,7 @@ public class ViewInvertHelper {
-     }
-     public void update(boolean invert) {
--        if (invert && mThemeInvert) {
-+        if (invert) {
-             updateInvertPaint(1f);
-             for (int i = 0; i < mTargets.size(); i++) {
-                 mTargets.get(i).setLayerType(View.LAYER_TYPE_HARDWARE, mDarkPaint);
-@@ -115,7 +115,9 @@ public class ViewInvertHelper {
-         mMatrix.set(invert);
-         mGrayscaleMatrix.setSaturation(1 - intensity);
-         mMatrix.preConcat(mGrayscaleMatrix);
--        mDarkPaint.setColorFilter(new ColorMatrixColorFilter(mMatrix));
-+        mDarkPaint.setColorFilter(new ColorMatrixColorFilter(
-+                mThemeInvert ? mMatrix : mGrayscaleMatrix));
-+
-     }
-     public void setInverted(boolean invert, boolean fade, long delay) {
--- 
-2.11.1
-
index aab8726cfcd59acfe8573a626906b2d2f49d8bcb..e92f6aa224b161a8bdb43378d85885731261d7b7 100644 (file)
@@ -1,7 +1,7 @@
-From 1295b160f7903ffdbc6ee4c79af58375c75ae8ff Mon Sep 17 00:00:00 2001
+From ffa5e6a5cfd683386da30a78418761c2dbc3466a Mon Sep 17 00:00:00 2001
 From: Alex Cruz <mazdarider23@gmail.com>
 Date: Tue, 24 Jan 2017 11:14:46 +0100
-Subject: [PATCH 33/44] Expose external qs tile tint color
+Subject: [PATCH 33/47] Expose external qs tile tint color
 
 This should allow themers to get around issues like this (see pic below)
 
@@ -14,7 +14,7 @@ Change-Id: If6dbf9ab29f8007d85a3c45524b1cf4ba1b032fb
  2 files changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/packages/SystemUI/res/values/projekt_colors.xml b/packages/SystemUI/res/values/projekt_colors.xml
-index 83b852416e1..e31d1244ac8 100644
+index 2e8308a26b1..9bd5fed5498 100644
 --- a/packages/SystemUI/res/values/projekt_colors.xml
 +++ b/packages/SystemUI/res/values/projekt_colors.xml
 @@ -30,4 +30,6 @@
index dd23485d00d5d87f9d485ecfed8cc0007b6f7066..2995aa3cc8e70a0fcb38112606730ff6a1c0dc00 100644 (file)
@@ -1,7 +1,7 @@
-From 903c2240610f597164d4b576a53449db495938fe Mon Sep 17 00:00:00 2001
+From 0c22fa21bda110a0a365561174a8a7f2fc9a7cd5 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 34/44] graphics: ADB "N" icon compatible with OMS7
+Subject: [PATCH 34/47] 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.
index d8a3d0bb5e796b8ae2c055a2766da4fec0391063..7becb4719993d80bb04f59f55bb4653a542cb7f8 100644 (file)
@@ -1,7 +1,7 @@
-From cdcae34eca5a34ea7669eb60da3d988a5dd026a1 Mon Sep 17 00:00:00 2001
+From 8513b09f6999d9c4c23a3635370af8dd1ce656ed Mon Sep 17 00:00:00 2001
 From: Alex Cruz <mazdarider23@gmail.com>
 Date: Sat, 4 Feb 2017 14:13:26 +0100
-Subject: [PATCH 35/44] Set external QS tiles tint mode to SRC_ATOP
+Subject: [PATCH 35/47] 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
index 21e1e7562ac5c82ff3112eea4f5c0e6a470ce93a..bc8468310ee131db2c0e274fb5796825ed2d1175 100644 (file)
@@ -1,7 +1,7 @@
-From 4694acaaf4a905815d9984f2241ef28f0da505c1 Mon Sep 17 00:00:00 2001
+From 4ef465b398beeae71c855d14f26e610766fa9ebe 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 36/44] Themes: Expose Keyguard affordance circle background
+Subject: [PATCH 36/47] Themes: Expose Keyguard affordance circle background
 
 Change-Id: Id4a078cdbc944fa0c0736103045a0382d49ecb80
 ---
@@ -10,7 +10,7 @@ Change-Id: Id4a078cdbc944fa0c0736103045a0382d49ecb80
  2 files changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/packages/SystemUI/res/values/projekt_colors.xml b/packages/SystemUI/res/values/projekt_colors.xml
-index e31d1244ac8..e8f8e502845 100644
+index 9bd5fed5498..72e1f88c323 100644
 --- a/packages/SystemUI/res/values/projekt_colors.xml
 +++ b/packages/SystemUI/res/values/projekt_colors.xml
 @@ -32,4 +32,6 @@
index 432ca22e719e36521942547e6c57d9f499a50571..1d086e008a94137a3380c8f7a10409431dd7d7c9 100644 (file)
@@ -1,7 +1,7 @@
-From a9f29c6f2ff4a9123e4874a1adcd3afd68b2f1d7 Mon Sep 17 00:00:00 2001
+From c0be59e8d33c8c68fadbab2df750d6f3254173ac Mon Sep 17 00:00:00 2001
 From: SpiritCroc <spiritcroc@gmail.com>
 Date: Sun, 5 Feb 2017 12:00:54 +0100
-Subject: [PATCH 37/44] Notification tint: add optional findContrastColor
+Subject: [PATCH 37/47] Notification tint: add optional findContrastColor
  algorithm for dark backgrounds
 
 Overlay config_useDarkBgNotificationIconTextTinting to enable dark bg tinting
@@ -117,7 +117,7 @@ index 4748e6fb19f..bbc9a24b1ed 100644
          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
+index c180166a16b..d74b683be9d 100644
 --- a/core/res/res/values/projekt_config.xml
 +++ b/core/res/res/values/projekt_config.xml
 @@ -27,4 +27,8 @@
@@ -130,7 +130,7 @@ index 5234959fc9e..8cf5666a7e4 100644
 +
  </resources>
 diff --git a/core/res/res/values/projekt_symbols.xml b/core/res/res/values/projekt_symbols.xml
-index 16a5728e6c9..faa71e064e6 100644
+index 9c2dc35dbcd..94193ca4df9 100644
 --- a/core/res/res/values/projekt_symbols.xml
 +++ b/core/res/res/values/projekt_symbols.xml
 @@ -19,6 +19,7 @@
diff --git a/patches/frameworks/base/0038-Add-a-protected-broadcast-for-Masquerade-events.patch b/patches/frameworks/base/0038-Add-a-protected-broadcast-for-Masquerade-events.patch
new file mode 100644 (file)
index 0000000..490abc2
--- /dev/null
@@ -0,0 +1,44 @@
+From 81a8710a8cf532eaf31a6cf938802572d82bae47 Mon Sep 17 00:00:00 2001
+From: bigrushdog <randall.rushing@gmail.com>
+Date: Sat, 14 Jan 2017 23:33:38 -0800
+Subject: [PATCH 38/47] 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 fe1ef539139..d4a23a69924 100644
+--- a/core/res/AndroidManifest.xml
++++ b/core/res/AndroidManifest.xml
+@@ -524,6 +524,8 @@
+     <!-- ====================================================================== -->
+     <eat-comment />
++    <protected-broadcast android:name="masquerade.substratum.STATUS_CHANGED" />
++
+     <!-- ====================================================================== -->
+     <!-- Permissions for accessing user's contacts including personal profile   -->
+     <!-- ====================================================================== -->
+diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
+index 6c89c2e2129..4d983571622 100644
+--- a/services/core/java/com/android/server/pm/PackageManagerService.java
++++ b/services/core/java/com/android/server/pm/PackageManagerService.java
+@@ -4550,7 +4550,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
+
diff --git a/patches/frameworks/base/0038-OMS7-Rootless-Security-Update-Preparation-for-March-.patch b/patches/frameworks/base/0038-OMS7-Rootless-Security-Update-Preparation-for-March-.patch
deleted file mode 100644 (file)
index 9a87cf7..0000000
+++ /dev/null
@@ -1,310 +0,0 @@
-From cbba5cade6c741883cfe912012e98661684499df Mon Sep 17 00:00:00 2001
-From: Nicholas Chum <nicholaschum@gmail.com>
-Date: Wed, 22 Feb 2017 22:55:15 -0500
-Subject: [PATCH 38/44] OMS7: Rootless Security Update Preparation for March
- 2017
-
-Change-Id: I93f7917eebf9f86590eb9c00841460d236702cb3
----
- .../android/server/om/OverlayManagerService.java   |   8 -
- .../server/om/OverlayManagerShellCommand.java      | 269 ---------------------
- 2 files changed, 277 deletions(-)
- delete mode 100644 services/core/java/com/android/server/om/OverlayManagerShellCommand.java
-
-diff --git a/services/core/java/com/android/server/om/OverlayManagerService.java b/services/core/java/com/android/server/om/OverlayManagerService.java
-index e205ce1d030..ac56985ce54 100644
---- a/services/core/java/com/android/server/om/OverlayManagerService.java
-+++ b/services/core/java/com/android/server/om/OverlayManagerService.java
-@@ -528,14 +528,6 @@ public final class OverlayManagerService extends SystemService {
-         }
-         @Override
--        public void onShellCommand(@NonNull final FileDescriptor in,
--                @NonNull final FileDescriptor out, @NonNull final FileDescriptor err,
--                @NonNull final String[] args, @NonNull final ResultReceiver resultReceiver) {
--            (new OverlayManagerShellCommand(this)).exec(
--                    this, in, out, err, args, resultReceiver);
--        }
--
--        @Override
-         protected void dump(@NonNull final FileDescriptor fd, @NonNull final PrintWriter pw,
-                 @NonNull final String[] argv) {
-             enforceDumpPermission("dump");
-diff --git a/services/core/java/com/android/server/om/OverlayManagerShellCommand.java b/services/core/java/com/android/server/om/OverlayManagerShellCommand.java
-deleted file mode 100644
-index 44004c140a4..00000000000
---- a/services/core/java/com/android/server/om/OverlayManagerShellCommand.java
-+++ /dev/null
-@@ -1,269 +0,0 @@
--/*
-- * Copyright (C) 2016 The Android Open Source Project
-- *
-- * Licensed under the Apache License, Version 2.0 (the "License");
-- * you may not use this file except in compliance with the License.
-- * You may obtain a copy of the License at
-- *
-- *      http://www.apache.org/licenses/LICENSE-2.0
-- *
-- * Unless required by applicable law or agreed to in writing, software
-- * distributed under the License is distributed on an "AS IS" BASIS,
-- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- * See the License for the specific language governing permissions and
-- * limitations under the License.
-- */
--
--package com.android.server.om;
--
--import android.annotation.NonNull;
--import android.annotation.Nullable;
--import android.content.om.IOverlayManager;
--import android.content.om.OverlayInfo;
--import android.os.RemoteException;
--import android.os.ShellCommand;
--import android.os.UserHandle;
--
--import java.io.PrintWriter;
--import java.util.ArrayList;
--import java.util.List;
--import java.util.Map;
--import java.util.Map.Entry;
--
--/**
-- * Implementation of 'cmd overlay' commands.
-- *
-- * This class provides an interface to the OverlayManagerService via adb.
-- * Intended only for manual debugging. Execute 'adb exec-out cmd overlay help'
-- * for a list of available commands.
-- */
--final class OverlayManagerShellCommand extends ShellCommand {
--    private final IOverlayManager mInterface;
--
--    OverlayManagerShellCommand(@NonNull final IOverlayManager iom) {
--        mInterface = iom;
--    }
--
--    @Override
--    public int onCommand(@Nullable final String cmd) {
--        if (cmd == null) {
--            final PrintWriter out = getOutPrintWriter();
--            out.println("The overlay manager has already been initialized.");
--            return -1;
--        }
--        final PrintWriter err = getErrPrintWriter();
--        try {
--            switch (cmd) {
--                case "list":
--                    return runList();
--                case "enable":
--                    return runEnableDisable(true);
--                case "disable":
--                    return runEnableDisable(false);
--                case "disable-all":
--                      return runDisableAll();
--                case "set-priority":
--                    return runSetPriority();
--                default:
--                    return handleDefaultCommands(cmd);
--            }
--        } catch (IllegalArgumentException e) {
--            err.println("Error: " + e.getMessage());
--        } catch (RemoteException e) {
--            err.println("Remote exception: " + e);
--        }
--        return -1;
--    }
--
--    @Override
--    public void onHelp() {
--        final PrintWriter out = getOutPrintWriter();
--        out.println("Overlay manager (overlay) commands:");
--        out.println("  help");
--        out.println("    Print this help text.");
--        out.println("  dump [--verbose] [--user USER_ID] [PACKAGE [PACKAGE [...]]]");
--        out.println("    Print debugging information about the overlay manager.");
--        out.println("  list [--user USER_ID] [PACKAGE [PACKAGE [...]]]");
--        out.println("    Print information about target and overlay packages.");
--        out.println("    Overlay packages are printed in priority order. With optional");
--        out.println("    parameters PACKAGEs, limit output to the specified packages");
--        out.println("    but include more information about each package.");
--        out.println("  enable [--user USER_ID] [PACKAGE [PACKAGE [...]]]");
--        out.println("    Enable overlay package PACKAGE or subsequent counts of PACKAGE.");
--        out.println("  disable [--user USER_ID] [PACKAGE [PACKAGE [...]]]");
--        out.println("    Disable overlay package PACKAGE or subsequent counts of PACKAGE.");
--        out.println("  disable-all [--user USER_ID]");
--        out.println("    Disable all overlay packages.");
--        out.println("  set-priority [--user USER_ID] PACKAGE PARENT|lowest|highest");
--        out.println("    Change the priority of the overlay PACKAGE to be just higher than");
--        out.println("    the priority of PACKAGE_PARENT If PARENT is the special keyword");
--        out.println("    'lowest', change priority of PACKAGE to the lowest priority.");
--        out.println("    If PARENT is the special keyword 'highest', change priority of");
--        out.println("    PACKAGE to the highest priority.");
--    }
--
--    private int runList() throws RemoteException {
--        final PrintWriter out = getOutPrintWriter();
--        final PrintWriter err = getErrPrintWriter();
--
--        int userId = UserHandle.USER_SYSTEM;
--        String opt;
--        while ((opt = getNextOption()) != null) {
--            switch (opt) {
--                case "--user":
--                    userId = UserHandle.parseUserArg(getNextArgRequired());
--                    break;
--                default:
--                    err.println("Error: Unknown option: " + opt);
--                    return 1;
--            }
--        }
--
--        final Map<String, List<OverlayInfo>> allOverlays = mInterface.getAllOverlays(userId);
--        for (final String targetPackageName : allOverlays.keySet()) {
--            out.println(targetPackageName);
--            for (final OverlayInfo oi : allOverlays.get(targetPackageName)) {
--                String status = "---";
--                if (oi.isApproved()) {
--                    status = "[ ]";
--                }
--                if (oi.isEnabled()) {
--                    status = "[x]";
--                }
--                out.println(String.format("%s %s", status, oi.packageName));
--            }
--            out.println();
--        }
--        return 0;
--    }
--
--    private int runEnableDisable(final boolean enable) throws RemoteException {
--        final PrintWriter err = getErrPrintWriter();
--
--        int userId = UserHandle.USER_SYSTEM;
--        String opt;
--        while ((opt = getNextOption()) != null) {
--            switch (opt) {
--                case "--user":
--                    userId = UserHandle.parseUserArg(getNextArgRequired());
--                    break;
--                default:
--                    err.println("Error: Unknown option: " + opt);
--                    return 1;
--            }
--        }
--
--        int argc = 0;
--        String packageName = getNextArgRequired();
--        ArrayList<String> packages = new ArrayList<>();
--        if (packageName == null) {
--            System.err.println("Error: no packages specified");
--            return 1;
--        }
--        while (packageName != null) {
--            argc++;
--            packages.add(packageName);
--            packageName = getNextArg();
--        }
--        if (argc > 1) {
--            for (String pkg : packages) {
--                boolean ret = mInterface.setEnabled(pkg, enable, userId, false);
--                if (!ret) {
--                    System.err.println("Error: Failed to " + ((enable) ? "enable ": "disable ") + pkg);
--                }
--            }
--            return 0;
--        } else if (argc == 1) {
--            return mInterface.setEnabled(packages.get(0), enable, userId, false) ? 0 : 1;
--        } else {
--            System.err.println("Error: A fatal exception has occurred.");
--            return 1;
--        }
--    }
--
--    private int runDisableAll() {
--        int userId = UserHandle.USER_OWNER;
--        String opt;
--        while ((opt = getNextOption()) != null) {
--            switch (opt) {
--                case "--user":
--                    userId = UserHandle.parseUserArg(getNextArgRequired());
--                      break;
--                default:
--                    System.err.println("Error: Unknown option: " + opt);
--                    return 1;
--            }
--        }
--
--        try {
--            Map<String, List<OverlayInfo>> targetsAndOverlays = mInterface.getAllOverlays(userId);
--            int iterator = 0;
--            int overlaySize = targetsAndOverlays.entrySet().size();
--            for (Entry<String, List<OverlayInfo>> targetEntry : targetsAndOverlays.entrySet()) {
--                int iterator_nested = 0;
--                int targetSize_nested = targetEntry.getValue().size();
--                iterator++;
--                for (OverlayInfo oi : targetEntry.getValue()) {
--                    if (iterator_nested < targetSize_nested) {
--                        if (oi.isEnabled()) {
--                            boolean worked = mInterface.setEnabled(oi.packageName, false, userId, true);
--                            if (!worked) {
--                                System.err.println("Failed to disable " + oi.packageName);
--                            }
--                        }
--                    } else {
--                        if (iterator == overlaySize) {
--                            if (oi.isEnabled()) {
--                                boolean worked = mInterface.setEnabled(oi.packageName, false, userId, false);
--                                if (!worked) {
--                                    System.err.println("Failed to disable " + oi.packageName);
--                                }
--                            }
--                        } else {
--                            if (oi.isEnabled()) {
--                                boolean worked = mInterface.setEnabled(oi.packageName, false, userId, true);
--                                if (!worked) {
--                                    System.err.println("Failed to disable " + oi.packageName);
--                                }
--                            }
--                        }
--                    }
--                    iterator_nested++;
--                }
--            }
--            mInterface.refresh(userId);
--        } catch (RemoteException re) {
--            System.err.println(re.toString());
--            System.err.println("Error: A fatal exception has occurred.");
--        }
--        return 0;
--    }
--
--    private int runSetPriority() throws RemoteException {
--        final PrintWriter err = getErrPrintWriter();
--
--        int userId = UserHandle.USER_SYSTEM;
--        String opt;
--        while ((opt = getNextOption()) != null) {
--            switch (opt) {
--                case "--user":
--                    userId = UserHandle.parseUserArg(getNextArgRequired());
--                    break;
--                default:
--                    err.println("Error: Unknown option: " + opt);
--                    return 1;
--            }
--        }
--
--        final String packageName = getNextArgRequired();
--        final String newParentPackageName = getNextArgRequired();
--
--        if ("highest".equals(newParentPackageName)) {
--            return mInterface.setHighestPriority(packageName, userId) ? 0 : 1;
--        } else if ("lowest".equals(newParentPackageName)) {
--            return mInterface.setLowestPriority(packageName, userId) ? 0 : 1;
--        } else {
--            return mInterface.setPriority(packageName, newParentPackageName, userId) ? 0 : 1;
--        }
--    }
--}
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0039-OMS-Add-hide-annotation-to-MODIFY_OVERLAYS-permissio.patch b/patches/frameworks/base/0039-OMS-Add-hide-annotation-to-MODIFY_OVERLAYS-permissio.patch
deleted file mode 100644 (file)
index 1448f58..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-From a88449305ba7f06a57890c7c188e75a0d67c01ce Mon Sep 17 00:00:00 2001
-From: Evan Anderson <evananderson@aospa.co>
-Date: Mon, 27 Feb 2017 15:16:18 -0500
-Subject: [PATCH 39/44] OMS: Add hide annotation to MODIFY_OVERLAYS permission
-
-* Modifications in this file affect the public API, so we must hide our
-  additions to build in release mode
-
-Change-Id: I03c73f3d6a420ceda42c3241858427938d0a5fad
-Signed-off-by: Evan Anderson <evananderson@aospa.co>
----
- core/res/AndroidManifest.xml | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
-index 3ceb17ba568..4a7dd780c15 100644
---- a/core/res/AndroidManifest.xml
-+++ b/core/res/AndroidManifest.xml
-@@ -3162,7 +3162,8 @@
-     <permission android:name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME"
-                 android:protectionLevel="signature|privileged" />
--    <!-- Allows an application to make calls to OverlayManagerService.-->
-+    <!-- Allows an application to make calls to OverlayManagerService.
-+         @hide -->
-     <permission android:name="android.permission.MODIFY_OVERLAYS"
-         android:label="@string/permlab_modifyOverlays"
-         android:description="@string/permdesc_modifyOverlays"
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0039-OMS7-Rootless-Security-Update-Preparation-for-March-.patch b/patches/frameworks/base/0039-OMS7-Rootless-Security-Update-Preparation-for-March-.patch
new file mode 100644 (file)
index 0000000..3b1d1ad
--- /dev/null
@@ -0,0 +1,310 @@
+From e3df03d2bffa02bf94632d0c1070a0d0d9d5caad Mon Sep 17 00:00:00 2001
+From: Nicholas Chum <nicholaschum@gmail.com>
+Date: Wed, 22 Feb 2017 22:55:15 -0500
+Subject: [PATCH 39/47] OMS7: Rootless Security Update Preparation for March
+ 2017
+
+Change-Id: I93f7917eebf9f86590eb9c00841460d236702cb3
+---
+ .../android/server/om/OverlayManagerService.java   |   8 -
+ .../server/om/OverlayManagerShellCommand.java      | 269 ---------------------
+ 2 files changed, 277 deletions(-)
+ delete mode 100644 services/core/java/com/android/server/om/OverlayManagerShellCommand.java
+
+diff --git a/services/core/java/com/android/server/om/OverlayManagerService.java b/services/core/java/com/android/server/om/OverlayManagerService.java
+index e205ce1d030..ac56985ce54 100644
+--- a/services/core/java/com/android/server/om/OverlayManagerService.java
++++ b/services/core/java/com/android/server/om/OverlayManagerService.java
+@@ -528,14 +528,6 @@ public final class OverlayManagerService extends SystemService {
+         }
+         @Override
+-        public void onShellCommand(@NonNull final FileDescriptor in,
+-                @NonNull final FileDescriptor out, @NonNull final FileDescriptor err,
+-                @NonNull final String[] args, @NonNull final ResultReceiver resultReceiver) {
+-            (new OverlayManagerShellCommand(this)).exec(
+-                    this, in, out, err, args, resultReceiver);
+-        }
+-
+-        @Override
+         protected void dump(@NonNull final FileDescriptor fd, @NonNull final PrintWriter pw,
+                 @NonNull final String[] argv) {
+             enforceDumpPermission("dump");
+diff --git a/services/core/java/com/android/server/om/OverlayManagerShellCommand.java b/services/core/java/com/android/server/om/OverlayManagerShellCommand.java
+deleted file mode 100644
+index 44004c140a4..00000000000
+--- a/services/core/java/com/android/server/om/OverlayManagerShellCommand.java
++++ /dev/null
+@@ -1,269 +0,0 @@
+-/*
+- * Copyright (C) 2016 The Android Open Source Project
+- *
+- * Licensed under the Apache License, Version 2.0 (the "License");
+- * you may not use this file except in compliance with the License.
+- * You may obtain a copy of the License at
+- *
+- *      http://www.apache.org/licenses/LICENSE-2.0
+- *
+- * Unless required by applicable law or agreed to in writing, software
+- * distributed under the License is distributed on an "AS IS" BASIS,
+- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+- * See the License for the specific language governing permissions and
+- * limitations under the License.
+- */
+-
+-package com.android.server.om;
+-
+-import android.annotation.NonNull;
+-import android.annotation.Nullable;
+-import android.content.om.IOverlayManager;
+-import android.content.om.OverlayInfo;
+-import android.os.RemoteException;
+-import android.os.ShellCommand;
+-import android.os.UserHandle;
+-
+-import java.io.PrintWriter;
+-import java.util.ArrayList;
+-import java.util.List;
+-import java.util.Map;
+-import java.util.Map.Entry;
+-
+-/**
+- * Implementation of 'cmd overlay' commands.
+- *
+- * This class provides an interface to the OverlayManagerService via adb.
+- * Intended only for manual debugging. Execute 'adb exec-out cmd overlay help'
+- * for a list of available commands.
+- */
+-final class OverlayManagerShellCommand extends ShellCommand {
+-    private final IOverlayManager mInterface;
+-
+-    OverlayManagerShellCommand(@NonNull final IOverlayManager iom) {
+-        mInterface = iom;
+-    }
+-
+-    @Override
+-    public int onCommand(@Nullable final String cmd) {
+-        if (cmd == null) {
+-            final PrintWriter out = getOutPrintWriter();
+-            out.println("The overlay manager has already been initialized.");
+-            return -1;
+-        }
+-        final PrintWriter err = getErrPrintWriter();
+-        try {
+-            switch (cmd) {
+-                case "list":
+-                    return runList();
+-                case "enable":
+-                    return runEnableDisable(true);
+-                case "disable":
+-                    return runEnableDisable(false);
+-                case "disable-all":
+-                      return runDisableAll();
+-                case "set-priority":
+-                    return runSetPriority();
+-                default:
+-                    return handleDefaultCommands(cmd);
+-            }
+-        } catch (IllegalArgumentException e) {
+-            err.println("Error: " + e.getMessage());
+-        } catch (RemoteException e) {
+-            err.println("Remote exception: " + e);
+-        }
+-        return -1;
+-    }
+-
+-    @Override
+-    public void onHelp() {
+-        final PrintWriter out = getOutPrintWriter();
+-        out.println("Overlay manager (overlay) commands:");
+-        out.println("  help");
+-        out.println("    Print this help text.");
+-        out.println("  dump [--verbose] [--user USER_ID] [PACKAGE [PACKAGE [...]]]");
+-        out.println("    Print debugging information about the overlay manager.");
+-        out.println("  list [--user USER_ID] [PACKAGE [PACKAGE [...]]]");
+-        out.println("    Print information about target and overlay packages.");
+-        out.println("    Overlay packages are printed in priority order. With optional");
+-        out.println("    parameters PACKAGEs, limit output to the specified packages");
+-        out.println("    but include more information about each package.");
+-        out.println("  enable [--user USER_ID] [PACKAGE [PACKAGE [...]]]");
+-        out.println("    Enable overlay package PACKAGE or subsequent counts of PACKAGE.");
+-        out.println("  disable [--user USER_ID] [PACKAGE [PACKAGE [...]]]");
+-        out.println("    Disable overlay package PACKAGE or subsequent counts of PACKAGE.");
+-        out.println("  disable-all [--user USER_ID]");
+-        out.println("    Disable all overlay packages.");
+-        out.println("  set-priority [--user USER_ID] PACKAGE PARENT|lowest|highest");
+-        out.println("    Change the priority of the overlay PACKAGE to be just higher than");
+-        out.println("    the priority of PACKAGE_PARENT If PARENT is the special keyword");
+-        out.println("    'lowest', change priority of PACKAGE to the lowest priority.");
+-        out.println("    If PARENT is the special keyword 'highest', change priority of");
+-        out.println("    PACKAGE to the highest priority.");
+-    }
+-
+-    private int runList() throws RemoteException {
+-        final PrintWriter out = getOutPrintWriter();
+-        final PrintWriter err = getErrPrintWriter();
+-
+-        int userId = UserHandle.USER_SYSTEM;
+-        String opt;
+-        while ((opt = getNextOption()) != null) {
+-            switch (opt) {
+-                case "--user":
+-                    userId = UserHandle.parseUserArg(getNextArgRequired());
+-                    break;
+-                default:
+-                    err.println("Error: Unknown option: " + opt);
+-                    return 1;
+-            }
+-        }
+-
+-        final Map<String, List<OverlayInfo>> allOverlays = mInterface.getAllOverlays(userId);
+-        for (final String targetPackageName : allOverlays.keySet()) {
+-            out.println(targetPackageName);
+-            for (final OverlayInfo oi : allOverlays.get(targetPackageName)) {
+-                String status = "---";
+-                if (oi.isApproved()) {
+-                    status = "[ ]";
+-                }
+-                if (oi.isEnabled()) {
+-                    status = "[x]";
+-                }
+-                out.println(String.format("%s %s", status, oi.packageName));
+-            }
+-            out.println();
+-        }
+-        return 0;
+-    }
+-
+-    private int runEnableDisable(final boolean enable) throws RemoteException {
+-        final PrintWriter err = getErrPrintWriter();
+-
+-        int userId = UserHandle.USER_SYSTEM;
+-        String opt;
+-        while ((opt = getNextOption()) != null) {
+-            switch (opt) {
+-                case "--user":
+-                    userId = UserHandle.parseUserArg(getNextArgRequired());
+-                    break;
+-                default:
+-                    err.println("Error: Unknown option: " + opt);
+-                    return 1;
+-            }
+-        }
+-
+-        int argc = 0;
+-        String packageName = getNextArgRequired();
+-        ArrayList<String> packages = new ArrayList<>();
+-        if (packageName == null) {
+-            System.err.println("Error: no packages specified");
+-            return 1;
+-        }
+-        while (packageName != null) {
+-            argc++;
+-            packages.add(packageName);
+-            packageName = getNextArg();
+-        }
+-        if (argc > 1) {
+-            for (String pkg : packages) {
+-                boolean ret = mInterface.setEnabled(pkg, enable, userId, false);
+-                if (!ret) {
+-                    System.err.println("Error: Failed to " + ((enable) ? "enable ": "disable ") + pkg);
+-                }
+-            }
+-            return 0;
+-        } else if (argc == 1) {
+-            return mInterface.setEnabled(packages.get(0), enable, userId, false) ? 0 : 1;
+-        } else {
+-            System.err.println("Error: A fatal exception has occurred.");
+-            return 1;
+-        }
+-    }
+-
+-    private int runDisableAll() {
+-        int userId = UserHandle.USER_OWNER;
+-        String opt;
+-        while ((opt = getNextOption()) != null) {
+-            switch (opt) {
+-                case "--user":
+-                    userId = UserHandle.parseUserArg(getNextArgRequired());
+-                      break;
+-                default:
+-                    System.err.println("Error: Unknown option: " + opt);
+-                    return 1;
+-            }
+-        }
+-
+-        try {
+-            Map<String, List<OverlayInfo>> targetsAndOverlays = mInterface.getAllOverlays(userId);
+-            int iterator = 0;
+-            int overlaySize = targetsAndOverlays.entrySet().size();
+-            for (Entry<String, List<OverlayInfo>> targetEntry : targetsAndOverlays.entrySet()) {
+-                int iterator_nested = 0;
+-                int targetSize_nested = targetEntry.getValue().size();
+-                iterator++;
+-                for (OverlayInfo oi : targetEntry.getValue()) {
+-                    if (iterator_nested < targetSize_nested) {
+-                        if (oi.isEnabled()) {
+-                            boolean worked = mInterface.setEnabled(oi.packageName, false, userId, true);
+-                            if (!worked) {
+-                                System.err.println("Failed to disable " + oi.packageName);
+-                            }
+-                        }
+-                    } else {
+-                        if (iterator == overlaySize) {
+-                            if (oi.isEnabled()) {
+-                                boolean worked = mInterface.setEnabled(oi.packageName, false, userId, false);
+-                                if (!worked) {
+-                                    System.err.println("Failed to disable " + oi.packageName);
+-                                }
+-                            }
+-                        } else {
+-                            if (oi.isEnabled()) {
+-                                boolean worked = mInterface.setEnabled(oi.packageName, false, userId, true);
+-                                if (!worked) {
+-                                    System.err.println("Failed to disable " + oi.packageName);
+-                                }
+-                            }
+-                        }
+-                    }
+-                    iterator_nested++;
+-                }
+-            }
+-            mInterface.refresh(userId);
+-        } catch (RemoteException re) {
+-            System.err.println(re.toString());
+-            System.err.println("Error: A fatal exception has occurred.");
+-        }
+-        return 0;
+-    }
+-
+-    private int runSetPriority() throws RemoteException {
+-        final PrintWriter err = getErrPrintWriter();
+-
+-        int userId = UserHandle.USER_SYSTEM;
+-        String opt;
+-        while ((opt = getNextOption()) != null) {
+-            switch (opt) {
+-                case "--user":
+-                    userId = UserHandle.parseUserArg(getNextArgRequired());
+-                    break;
+-                default:
+-                    err.println("Error: Unknown option: " + opt);
+-                    return 1;
+-            }
+-        }
+-
+-        final String packageName = getNextArgRequired();
+-        final String newParentPackageName = getNextArgRequired();
+-
+-        if ("highest".equals(newParentPackageName)) {
+-            return mInterface.setHighestPriority(packageName, userId) ? 0 : 1;
+-        } else if ("lowest".equals(newParentPackageName)) {
+-            return mInterface.setLowestPriority(packageName, userId) ? 0 : 1;
+-        } else {
+-            return mInterface.setPriority(packageName, newParentPackageName, userId) ? 0 : 1;
+-        }
+-    }
+-}
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0040-FWB-Give-power-dialogs-own-set-of-volume-icons-for-t.patch b/patches/frameworks/base/0040-FWB-Give-power-dialogs-own-set-of-volume-icons-for-t.patch
deleted file mode 100644 (file)
index a5121b8..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-From 3f729adb148bbf2689823bac93fef8e292f29e4f Mon Sep 17 00:00:00 2001
-From: Bryan Owens <djbryan3540@gmail.com>
-Date: Mon, 27 Feb 2017 19:06:31 -0600
-Subject: [PATCH 40/44] FWB: Give power dialogs own set of volume icons for
- themes
-
-Change-Id: I5add336c06a83b162dfd0832dfabfb06a2827421
-Signed-off-by: Bryan Owens <djbryan3540@gmail.com>
----
- core/res/res/drawable/ic_power_audio_ring_notif.xml  | 20 ++++++++++++++++++++
- .../res/drawable/ic_power_audio_ring_notif_mute.xml  | 20 ++++++++++++++++++++
- .../drawable/ic_power_audio_ring_notif_vibrate.xml   | 20 ++++++++++++++++++++
- core/res/res/layout/global_actions_silent_mode.xml   |  6 +++---
- 4 files changed, 63 insertions(+), 3 deletions(-)
- create mode 100644 core/res/res/drawable/ic_power_audio_ring_notif.xml
- create mode 100644 core/res/res/drawable/ic_power_audio_ring_notif_mute.xml
- create mode 100644 core/res/res/drawable/ic_power_audio_ring_notif_vibrate.xml
-
-diff --git a/core/res/res/drawable/ic_power_audio_ring_notif.xml b/core/res/res/drawable/ic_power_audio_ring_notif.xml
-new file mode 100644
-index 00000000000..6b2dcc4a675
---- /dev/null
-+++ b/core/res/res/drawable/ic_power_audio_ring_notif.xml
-@@ -0,0 +1,20 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<!--
-+     Copyright (C) 2017 The Android Open Source Project
-+
-+     Licensed under the Apache License, Version 2.0 (the "License");
-+     you may not use this file except in compliance with the License.
-+     You may obtain a copy of the License at
-+
-+          http://www.apache.org/licenses/LICENSE-2.0
-+
-+     Unless required by applicable law or agreed to in writing, software
-+     distributed under the License is distributed on an "AS IS" BASIS,
-+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+     See the License for the specific language governing permissions and
-+     limitations under the License.
-+-->
-+
-+<selector xmlns:android="http://schemas.android.com/apk/res/android">
-+    <item android:drawable="@drawable/ic_audio_ring_notif" />
-+</selector>
-diff --git a/core/res/res/drawable/ic_power_audio_ring_notif_mute.xml b/core/res/res/drawable/ic_power_audio_ring_notif_mute.xml
-new file mode 100644
-index 00000000000..dab250cc2d8
---- /dev/null
-+++ b/core/res/res/drawable/ic_power_audio_ring_notif_mute.xml
-@@ -0,0 +1,20 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<!--
-+     Copyright (C) 2017 The Android Open Source Project
-+
-+     Licensed under the Apache License, Version 2.0 (the "License");
-+     you may not use this file except in compliance with the License.
-+     You may obtain a copy of the License at
-+
-+          http://www.apache.org/licenses/LICENSE-2.0
-+
-+     Unless required by applicable law or agreed to in writing, software
-+     distributed under the License is distributed on an "AS IS" BASIS,
-+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+     See the License for the specific language governing permissions and
-+     limitations under the License.
-+-->
-+
-+<selector xmlns:android="http://schemas.android.com/apk/res/android">
-+    <item android:drawable="@drawable/ic_audio_ring_notif_mute" />
-+</selector>
-diff --git a/core/res/res/drawable/ic_power_audio_ring_notif_vibrate.xml b/core/res/res/drawable/ic_power_audio_ring_notif_vibrate.xml
-new file mode 100644
-index 00000000000..f278ccbf980
---- /dev/null
-+++ b/core/res/res/drawable/ic_power_audio_ring_notif_vibrate.xml
-@@ -0,0 +1,20 @@
-+<?xml version="1.0" encoding="utf-8"?>
-+<!--
-+     Copyright (C) 2017 The Android Open Source Project
-+
-+     Licensed under the Apache License, Version 2.0 (the "License");
-+     you may not use this file except in compliance with the License.
-+     You may obtain a copy of the License at
-+
-+          http://www.apache.org/licenses/LICENSE-2.0
-+
-+     Unless required by applicable law or agreed to in writing, software
-+     distributed under the License is distributed on an "AS IS" BASIS,
-+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+     See the License for the specific language governing permissions and
-+     limitations under the License.
-+-->
-+
-+<selector xmlns:android="http://schemas.android.com/apk/res/android">
-+    <item android:drawable="@drawable/ic_audio_ring_notif_vibrate" />
-+</selector>
-diff --git a/core/res/res/layout/global_actions_silent_mode.xml b/core/res/res/layout/global_actions_silent_mode.xml
-index a3586232a15..3fe7bbec960 100644
---- a/core/res/res/layout/global_actions_silent_mode.xml
-+++ b/core/res/res/layout/global_actions_silent_mode.xml
-@@ -37,7 +37,7 @@
-             android:layout_marginEnd="8dp"
-             android:layout_marginTop="6dp"
-             android:layout_marginBottom="6dp"
--            android:src="@drawable/ic_audio_ring_notif_mute"
-+            android:src="@drawable/ic_power_audio_ring_notif_mute"
-             android:scaleType="center"
-             android:duplicateParentState="true"
-             android:background="@drawable/silent_mode_indicator"
-@@ -65,7 +65,7 @@
-             android:layout_marginEnd="8dp"
-             android:layout_marginTop="6dp"
-             android:layout_marginBottom="6dp"
--            android:src="@drawable/ic_audio_ring_notif_vibrate"
-+            android:src="@drawable/ic_power_audio_ring_notif_vibrate"
-             android:scaleType="center"
-             android:duplicateParentState="true"
-             android:background="@drawable/silent_mode_indicator"
-@@ -94,7 +94,7 @@
-             android:layout_marginEnd="8dp"
-             android:layout_marginTop="6dp"
-             android:layout_marginBottom="6dp"
--            android:src="@drawable/ic_audio_ring_notif"
-+            android:src="@drawable/ic_power_audio_ring_notif"
-             android:scaleType="center"
-             android:duplicateParentState="true"
-             android:background="@drawable/silent_mode_indicator"
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0040-OMS-Add-hide-annotation-to-MODIFY_OVERLAYS-permissio.patch b/patches/frameworks/base/0040-OMS-Add-hide-annotation-to-MODIFY_OVERLAYS-permissio.patch
new file mode 100644 (file)
index 0000000..28284e6
--- /dev/null
@@ -0,0 +1,31 @@
+From 7f63dd85b5618a0f661cf80c74afa1ae3fe9e123 Mon Sep 17 00:00:00 2001
+From: Evan Anderson <evananderson@aospa.co>
+Date: Mon, 27 Feb 2017 15:16:18 -0500
+Subject: [PATCH 40/47] OMS: Add hide annotation to MODIFY_OVERLAYS permission
+
+* Modifications in this file affect the public API, so we must hide our
+  additions to build in release mode
+
+Change-Id: I03c73f3d6a420ceda42c3241858427938d0a5fad
+Signed-off-by: Evan Anderson <evananderson@aospa.co>
+---
+ core/res/AndroidManifest.xml | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
+index d4a23a69924..12d12efb3c8 100644
+--- a/core/res/AndroidManifest.xml
++++ b/core/res/AndroidManifest.xml
+@@ -3169,7 +3169,8 @@
+     <permission android:name="android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME"
+                 android:protectionLevel="signature|privileged" />
+-    <!-- Allows an application to make calls to OverlayManagerService.-->
++    <!-- Allows an application to make calls to OverlayManagerService.
++         @hide -->
+     <permission android:name="android.permission.MODIFY_OVERLAYS"
+         android:label="@string/permlab_modifyOverlays"
+         android:description="@string/permdesc_modifyOverlays"
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0041-FWB-Give-power-dialogs-own-set-of-volume-icons-for-t.patch b/patches/frameworks/base/0041-FWB-Give-power-dialogs-own-set-of-volume-icons-for-t.patch
new file mode 100644 (file)
index 0000000..df01d23
--- /dev/null
@@ -0,0 +1,130 @@
+From 48c09423a4afaeb02f927ed2addaf29f40832d9f Mon Sep 17 00:00:00 2001
+From: Bryan Owens <djbryan3540@gmail.com>
+Date: Mon, 27 Feb 2017 19:06:31 -0600
+Subject: [PATCH 41/47] FWB: Give power dialogs own set of volume icons for
+ themes
+
+Change-Id: I5add336c06a83b162dfd0832dfabfb06a2827421
+Signed-off-by: Bryan Owens <djbryan3540@gmail.com>
+---
+ core/res/res/drawable/ic_power_audio_ring_notif.xml  | 20 ++++++++++++++++++++
+ .../res/drawable/ic_power_audio_ring_notif_mute.xml  | 20 ++++++++++++++++++++
+ .../drawable/ic_power_audio_ring_notif_vibrate.xml   | 20 ++++++++++++++++++++
+ core/res/res/layout/global_actions_silent_mode.xml   |  6 +++---
+ 4 files changed, 63 insertions(+), 3 deletions(-)
+ create mode 100644 core/res/res/drawable/ic_power_audio_ring_notif.xml
+ create mode 100644 core/res/res/drawable/ic_power_audio_ring_notif_mute.xml
+ create mode 100644 core/res/res/drawable/ic_power_audio_ring_notif_vibrate.xml
+
+diff --git a/core/res/res/drawable/ic_power_audio_ring_notif.xml b/core/res/res/drawable/ic_power_audio_ring_notif.xml
+new file mode 100644
+index 00000000000..6b2dcc4a675
+--- /dev/null
++++ b/core/res/res/drawable/ic_power_audio_ring_notif.xml
+@@ -0,0 +1,20 @@
++<?xml version="1.0" encoding="utf-8"?>
++<!--
++     Copyright (C) 2017 The Android Open Source Project
++
++     Licensed under the Apache License, Version 2.0 (the "License");
++     you may not use this file except in compliance with the License.
++     You may obtain a copy of the License at
++
++          http://www.apache.org/licenses/LICENSE-2.0
++
++     Unless required by applicable law or agreed to in writing, software
++     distributed under the License is distributed on an "AS IS" BASIS,
++     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++     See the License for the specific language governing permissions and
++     limitations under the License.
++-->
++
++<selector xmlns:android="http://schemas.android.com/apk/res/android">
++    <item android:drawable="@drawable/ic_audio_ring_notif" />
++</selector>
+diff --git a/core/res/res/drawable/ic_power_audio_ring_notif_mute.xml b/core/res/res/drawable/ic_power_audio_ring_notif_mute.xml
+new file mode 100644
+index 00000000000..dab250cc2d8
+--- /dev/null
++++ b/core/res/res/drawable/ic_power_audio_ring_notif_mute.xml
+@@ -0,0 +1,20 @@
++<?xml version="1.0" encoding="utf-8"?>
++<!--
++     Copyright (C) 2017 The Android Open Source Project
++
++     Licensed under the Apache License, Version 2.0 (the "License");
++     you may not use this file except in compliance with the License.
++     You may obtain a copy of the License at
++
++          http://www.apache.org/licenses/LICENSE-2.0
++
++     Unless required by applicable law or agreed to in writing, software
++     distributed under the License is distributed on an "AS IS" BASIS,
++     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++     See the License for the specific language governing permissions and
++     limitations under the License.
++-->
++
++<selector xmlns:android="http://schemas.android.com/apk/res/android">
++    <item android:drawable="@drawable/ic_audio_ring_notif_mute" />
++</selector>
+diff --git a/core/res/res/drawable/ic_power_audio_ring_notif_vibrate.xml b/core/res/res/drawable/ic_power_audio_ring_notif_vibrate.xml
+new file mode 100644
+index 00000000000..f278ccbf980
+--- /dev/null
++++ b/core/res/res/drawable/ic_power_audio_ring_notif_vibrate.xml
+@@ -0,0 +1,20 @@
++<?xml version="1.0" encoding="utf-8"?>
++<!--
++     Copyright (C) 2017 The Android Open Source Project
++
++     Licensed under the Apache License, Version 2.0 (the "License");
++     you may not use this file except in compliance with the License.
++     You may obtain a copy of the License at
++
++          http://www.apache.org/licenses/LICENSE-2.0
++
++     Unless required by applicable law or agreed to in writing, software
++     distributed under the License is distributed on an "AS IS" BASIS,
++     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++     See the License for the specific language governing permissions and
++     limitations under the License.
++-->
++
++<selector xmlns:android="http://schemas.android.com/apk/res/android">
++    <item android:drawable="@drawable/ic_audio_ring_notif_vibrate" />
++</selector>
+diff --git a/core/res/res/layout/global_actions_silent_mode.xml b/core/res/res/layout/global_actions_silent_mode.xml
+index a3586232a15..3fe7bbec960 100644
+--- a/core/res/res/layout/global_actions_silent_mode.xml
++++ b/core/res/res/layout/global_actions_silent_mode.xml
+@@ -37,7 +37,7 @@
+             android:layout_marginEnd="8dp"
+             android:layout_marginTop="6dp"
+             android:layout_marginBottom="6dp"
+-            android:src="@drawable/ic_audio_ring_notif_mute"
++            android:src="@drawable/ic_power_audio_ring_notif_mute"
+             android:scaleType="center"
+             android:duplicateParentState="true"
+             android:background="@drawable/silent_mode_indicator"
+@@ -65,7 +65,7 @@
+             android:layout_marginEnd="8dp"
+             android:layout_marginTop="6dp"
+             android:layout_marginBottom="6dp"
+-            android:src="@drawable/ic_audio_ring_notif_vibrate"
++            android:src="@drawable/ic_power_audio_ring_notif_vibrate"
+             android:scaleType="center"
+             android:duplicateParentState="true"
+             android:background="@drawable/silent_mode_indicator"
+@@ -94,7 +94,7 @@
+             android:layout_marginEnd="8dp"
+             android:layout_marginTop="6dp"
+             android:layout_marginBottom="6dp"
+-            android:src="@drawable/ic_audio_ring_notif"
++            android:src="@drawable/ic_power_audio_ring_notif"
+             android:scaleType="center"
+             android:duplicateParentState="true"
+             android:background="@drawable/silent_mode_indicator"
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0041-base-Force-authorize-all-calling-packages-by-Masquer.patch b/patches/frameworks/base/0041-base-Force-authorize-all-calling-packages-by-Masquer.patch
deleted file mode 100644 (file)
index 854b48b..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-From 7269c14a19e2d5322e9ff7b66c9a99f8189eef1e Mon Sep 17 00:00:00 2001
-From: George G <kreach3r@users.noreply.github.com>
-Date: Sat, 25 Feb 2017 17:32:18 +0200
-Subject: [PATCH 41/44] base: Force authorize all calling packages by
- Masquerade (2/3)
-
-Change-Id: Iaf354c4d891acf9f5e19767223e4f9860a07338f
----
- core/java/android/provider/Settings.java | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
-index dd2a5dea961..a773e190113 100644
---- a/core/java/android/provider/Settings.java
-+++ b/core/java/android/provider/Settings.java
-@@ -6564,6 +6564,12 @@ public final class Settings {
-         public static final String VOLUME_LINK_NOTIFICATION = "volume_link_notification";
-         /**
-+         * Force authorize Substratum (or equivalent) frontend calling packages by Masquerade
-+         * @hide
-+         */
-+        public static final String FORCE_AUTHORIZE_SUBSTRATUM_PACKAGES = "force_authorize_substratum_packages";
-+
-+        /**
-          * This are the settings to be backed up.
-          *
-          * NOTE: Settings are backed up and restored in the order they appear
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0042-ThemeSafety-Introduce-App-Crash-Intent.patch b/patches/frameworks/base/0042-ThemeSafety-Introduce-App-Crash-Intent.patch
deleted file mode 100644 (file)
index b05149c..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-From aabad857d74935eaebc590ec3b105f96cec93e25 Mon Sep 17 00:00:00 2001
-From: Ivan Iskandar <iiiiskandar14@gmail.com>
-Date: Thu, 9 Mar 2017 13:28:22 +0100
-Subject: [PATCH 42/44] ThemeSafety: Introduce App Crash Intent
-
-The intent received by substratum and it will disable all enabled
-overlays.
-
-Change-Id: Ifabd57c2ea71ca93ecc2959ce09ccde3e91782dd
----
- services/core/java/com/android/server/am/AppErrors.java | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/services/core/java/com/android/server/am/AppErrors.java b/services/core/java/com/android/server/am/AppErrors.java
-index 0e2fa23f95f..1ff1cdc0081 100644
---- a/services/core/java/com/android/server/am/AppErrors.java
-+++ b/services/core/java/com/android/server/am/AppErrors.java
-@@ -365,6 +365,14 @@ class AppErrors {
-             task = data.task;
-             msg.obj = data;
-             mService.mUiHandler.sendMessage(msg);
-+
-+            // Send broadcast intent to alert Substratum
-+            Intent intent = new Intent("projekt.substratum.APP_CRASHED");
-+            intent.putExtra("projekt.substratum.EXTRA_PACKAGE_NAME", r.info.packageName);
-+            intent.putExtra("projekt.substratum.EXTRA_CRASH_REPEATING", data.repeating);
-+            intent.putExtra("projekt.substratum.EXTRA_EXCEPTION_CLASS_NAME",
-+                            crashInfo.exceptionClassName);
-+            mContext.sendBroadcast(intent);
-         }
-         int res = result.get();
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0042-base-Force-authorize-all-calling-packages-by-Masquer.patch b/patches/frameworks/base/0042-base-Force-authorize-all-calling-packages-by-Masquer.patch
new file mode 100644 (file)
index 0000000..2827f4c
--- /dev/null
@@ -0,0 +1,31 @@
+From 0424a244564b745ee5185346363fe363cb353f86 Mon Sep 17 00:00:00 2001
+From: George G <kreach3r@users.noreply.github.com>
+Date: Sat, 25 Feb 2017 17:32:18 +0200
+Subject: [PATCH 42/47] base: Force authorize all calling packages by
+ Masquerade (2/3)
+
+Change-Id: Iaf354c4d891acf9f5e19767223e4f9860a07338f
+---
+ core/java/android/provider/Settings.java | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
+index c83bd3e78e9..4c778fbdee8 100644
+--- a/core/java/android/provider/Settings.java
++++ b/core/java/android/provider/Settings.java
+@@ -6619,6 +6619,12 @@ public final class Settings {
+         public static final String VOLUME_LINK_NOTIFICATION = "volume_link_notification";
+         /**
++         * Force authorize Substratum (or equivalent) frontend calling packages by Masquerade
++         * @hide
++         */
++        public static final String FORCE_AUTHORIZE_SUBSTRATUM_PACKAGES = "force_authorize_substratum_packages";
++
++        /**
+          * This are the settings to be backed up.
+          *
+          * NOTE: Settings are backed up and restored in the order they appear
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0043-Expose-Screenshot-flash-and-background-colors.patch b/patches/frameworks/base/0043-Expose-Screenshot-flash-and-background-colors.patch
deleted file mode 100644 (file)
index fd23e41..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-From 1b5826792b4a0b94d40e280d6e3113e61d8547a7 Mon Sep 17 00:00:00 2001
-From: Ezio Lacandia Bijelkic <account-1000215@substratum.review>
-Date: Tue, 7 Mar 2017 23:33:40 +0100
-Subject: [PATCH 43/44] Expose Screenshot flash and background colors
-
-Keep in mind that Background color already gets 0.5f opacity in the
-GlobalScreenshot class (BACKGROUND_ALPHA with some math).
-For the flash you can use any color value instead (full opacity or not).
-
-Change-Id: I6ac51358f7f5278d742849ebc49f580554f069cd
----
- packages/SystemUI/res/layout/global_screenshot.xml | 4 ++--
- packages/SystemUI/res/values/projekt_colors.xml    | 3 +++
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/packages/SystemUI/res/layout/global_screenshot.xml b/packages/SystemUI/res/layout/global_screenshot.xml
-index 59952e09555..c74c69ba8e9 100644
---- a/packages/SystemUI/res/layout/global_screenshot.xml
-+++ b/packages/SystemUI/res/layout/global_screenshot.xml
-@@ -19,7 +19,7 @@
-     <ImageView android:id="@+id/global_screenshot_background"
-         android:layout_width="match_parent"
-         android:layout_height="match_parent"
--        android:src="@android:color/black"
-+        android:src="@color/screenshot_background_color"
-         android:visibility="gone" />
-     <ImageView android:id="@+id/global_screenshot"
-         android:layout_width="wrap_content"
-@@ -31,7 +31,7 @@
-     <ImageView android:id="@+id/global_screenshot_flash"
-         android:layout_width="match_parent"
-         android:layout_height="match_parent"
--        android:src="@android:color/white"
-+        android:src="@color/screenshot_flash_color"
-         android:visibility="gone" />
-     <com.android.systemui.screenshot.ScreenshotSelectorView
-         android:id="@+id/global_screenshot_selector"
-diff --git a/packages/SystemUI/res/values/projekt_colors.xml b/packages/SystemUI/res/values/projekt_colors.xml
-index e8f8e502845..48c5e77d040 100644
---- a/packages/SystemUI/res/values/projekt_colors.xml
-+++ b/packages/SystemUI/res/values/projekt_colors.xml
-@@ -34,4 +34,7 @@
-     <color name="external_qs_tile_tint_color">@android:color/white</color>
-     <!-- Keyguard affordance circle background -->
-     <color name="keyguard_affordance_circle_background">@android:color/white</color>
-+    <!-- Screenshot action colors -->
-+    <color name="screenshot_flash_color">@android:color/white</color>
-+    <color name="screenshot_background_color">@android:color/black</color>
- </resources>
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0043-Revert-Add-a-protected-broadcast-for-Masquerade-even.patch b/patches/frameworks/base/0043-Revert-Add-a-protected-broadcast-for-Masquerade-even.patch
new file mode 100644 (file)
index 0000000..a3614b0
--- /dev/null
@@ -0,0 +1,46 @@
+From 04ec5440cac206bc1b4c2b5f2ca513d802055a6e Mon Sep 17 00:00:00 2001
+From: Nathan Chancellor <natechancellor@gmail.com>
+Date: Sat, 4 Mar 2017 00:35:08 +0100
+Subject: [PATCH 43/47] Revert "Add a protected broadcast for Masquerade
+ events"
+
+Requires https://substratum.review/#/c/374
+
+This reverts commit 4cd8990c89e79acb926f9c1ae1959661955dcbe2.
+
+Change-Id: Ida416c3949379a3d6a24a104667c74eef1f56630
+---
+ core/res/AndroidManifest.xml                                        | 2 --
+ services/core/java/com/android/server/pm/PackageManagerService.java | 3 +--
+ 2 files changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
+index 12d12efb3c8..58fb5f533c1 100644
+--- a/core/res/AndroidManifest.xml
++++ b/core/res/AndroidManifest.xml
+@@ -524,8 +524,6 @@
+     <!-- ====================================================================== -->
+     <eat-comment />
+-    <protected-broadcast android:name="masquerade.substratum.STATUS_CHANGED" />
+-
+     <!-- ====================================================================== -->
+     <!-- Permissions for accessing user's contacts including personal profile   -->
+     <!-- ====================================================================== -->
+diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
+index 4d983571622..6c89c2e2129 100644
+--- a/services/core/java/com/android/server/pm/PackageManagerService.java
++++ b/services/core/java/com/android/server/pm/PackageManagerService.java
+@@ -4550,8 +4550,7 @@ 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("masquerade.substratum.STATUS_CHANGED")) {
++                        || actionName.startsWith("android.net.netmon.launchCaptivePortalApp")) {
+                     return true;
+                 }
+             }
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0044-ThemeSafety-Introduce-App-Crash-Intent.patch b/patches/frameworks/base/0044-ThemeSafety-Introduce-App-Crash-Intent.patch
new file mode 100644 (file)
index 0000000..baab3cd
--- /dev/null
@@ -0,0 +1,35 @@
+From 4dcd57908d1c27b7f4590fd444373ca4e494fee5 Mon Sep 17 00:00:00 2001
+From: Ivan Iskandar <iiiiskandar14@gmail.com>
+Date: Thu, 9 Mar 2017 13:28:22 +0100
+Subject: [PATCH 44/47] ThemeSafety: Introduce App Crash Intent
+
+The intent received by substratum and it will disable all enabled
+overlays.
+
+Change-Id: Ifabd57c2ea71ca93ecc2959ce09ccde3e91782dd
+---
+ services/core/java/com/android/server/am/AppErrors.java | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/services/core/java/com/android/server/am/AppErrors.java b/services/core/java/com/android/server/am/AppErrors.java
+index 0e2fa23f95f..1ff1cdc0081 100644
+--- a/services/core/java/com/android/server/am/AppErrors.java
++++ b/services/core/java/com/android/server/am/AppErrors.java
+@@ -365,6 +365,14 @@ class AppErrors {
+             task = data.task;
+             msg.obj = data;
+             mService.mUiHandler.sendMessage(msg);
++
++            // Send broadcast intent to alert Substratum
++            Intent intent = new Intent("projekt.substratum.APP_CRASHED");
++            intent.putExtra("projekt.substratum.EXTRA_PACKAGE_NAME", r.info.packageName);
++            intent.putExtra("projekt.substratum.EXTRA_CRASH_REPEATING", data.repeating);
++            intent.putExtra("projekt.substratum.EXTRA_EXCEPTION_CLASS_NAME",
++                            crashInfo.exceptionClassName);
++            mContext.sendBroadcast(intent);
+         }
+         int res = result.get();
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0044-Themes-Expose-Keyboard-Shortcuts-Dialog.patch b/patches/frameworks/base/0044-Themes-Expose-Keyboard-Shortcuts-Dialog.patch
deleted file mode 100644 (file)
index bdea3a5..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-From 862ea3e77116f9a1ad4b2d6db6dbcd1010b41dab Mon Sep 17 00:00:00 2001
-From: Bryan Owens <djbryan3540@gmail.com>
-Date: Thu, 30 Mar 2017 13:30:04 -0500
-Subject: [PATCH 44/44] Themes: Expose Keyboard Shortcuts Dialog
-
-Change-Id: I84d3e57fe8c42d79ff6e0b6502cb6cd49aaaf91b
-Signed-off-by: Bryan Owens <djbryan3540@gmail.com>
----
- packages/SystemUI/res/values/projekt_styles.xml                        | 3 +++
- .../SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java | 2 +-
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/packages/SystemUI/res/values/projekt_styles.xml b/packages/SystemUI/res/values/projekt_styles.xml
-index f49834bc202..4144151809d 100644
---- a/packages/SystemUI/res/values/projekt_styles.xml
-+++ b/packages/SystemUI/res/values/projekt_styles.xml
-@@ -20,5 +20,8 @@
-     <style name="TextAppearance.SwitchBar" parent="@android:style/TextAppearance.Material.Title">
-         <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
-     </style>
-+
-+    <!-- Phyisical Keyboard Dialog style -->
-+    <style name="KeyboardShortcutsDialog" parent="@*android:style/Theme.DeviceDefault.Light" />
- </resources>
-diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java
-index 016e1f2f5a9..c471cfe8cd4 100644
---- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java
-+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java
-@@ -118,7 +118,7 @@ public final class KeyboardShortcuts {
-     private KeyCharacterMap mKeyCharacterMap;
-     private KeyboardShortcuts(Context context) {
--        this.mContext = new ContextThemeWrapper(context, android.R.style.Theme_DeviceDefault_Light);
-+        this.mContext = new ContextThemeWrapper(context, R.style.KeyboardShortcutsDialog);
-         this.mPackageManager = AppGlobals.getPackageManager();
-         loadResources(context);
-     }
--- 
-2.11.1
-
diff --git a/patches/frameworks/base/0045-Expose-Screenshot-flash-and-background-colors.patch b/patches/frameworks/base/0045-Expose-Screenshot-flash-and-background-colors.patch
new file mode 100644 (file)
index 0000000..8255253
--- /dev/null
@@ -0,0 +1,52 @@
+From 54b0d34c2391fb034ddc0a507e216c2923febb2e Mon Sep 17 00:00:00 2001
+From: ezio84 <brabus84@gmail.com>
+Date: Tue, 7 Mar 2017 23:33:40 +0100
+Subject: [PATCH 45/47] Expose Screenshot flash and background colors
+
+Keep in mind that Background color already gets 0.5f opacity in the
+GlobalScreenshot class (BACKGROUND_ALPHA with some math).
+For the flash you can use any color value instead (full opacity or not).
+
+Change-Id: I6ac51358f7f5278d742849ebc49f580554f069cd
+---
+ packages/SystemUI/res/layout/global_screenshot.xml | 4 ++--
+ packages/SystemUI/res/values/projekt_colors.xml    | 3 +++
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/packages/SystemUI/res/layout/global_screenshot.xml b/packages/SystemUI/res/layout/global_screenshot.xml
+index 59952e09555..c74c69ba8e9 100644
+--- a/packages/SystemUI/res/layout/global_screenshot.xml
++++ b/packages/SystemUI/res/layout/global_screenshot.xml
+@@ -19,7 +19,7 @@
+     <ImageView android:id="@+id/global_screenshot_background"
+         android:layout_width="match_parent"
+         android:layout_height="match_parent"
+-        android:src="@android:color/black"
++        android:src="@color/screenshot_background_color"
+         android:visibility="gone" />
+     <ImageView android:id="@+id/global_screenshot"
+         android:layout_width="wrap_content"
+@@ -31,7 +31,7 @@
+     <ImageView android:id="@+id/global_screenshot_flash"
+         android:layout_width="match_parent"
+         android:layout_height="match_parent"
+-        android:src="@android:color/white"
++        android:src="@color/screenshot_flash_color"
+         android:visibility="gone" />
+     <com.android.systemui.screenshot.ScreenshotSelectorView
+         android:id="@+id/global_screenshot_selector"
+diff --git a/packages/SystemUI/res/values/projekt_colors.xml b/packages/SystemUI/res/values/projekt_colors.xml
+index 72e1f88c323..84e3b75505b 100644
+--- a/packages/SystemUI/res/values/projekt_colors.xml
++++ b/packages/SystemUI/res/values/projekt_colors.xml
+@@ -34,4 +34,7 @@
+     <color name="external_qs_tile_tint_color">@android:color/white</color>
+     <!-- Keyguard affordance circle background -->
+     <color name="keyguard_affordance_circle_background">@android:color/white</color>
++    <!-- Screenshot action colors -->
++    <color name="screenshot_flash_color">@android:color/white</color>
++    <color name="screenshot_background_color">@android:color/black</color>
+ </resources>
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0046-Themes-Expose-Keyboard-Shortcuts-Dialog.patch b/patches/frameworks/base/0046-Themes-Expose-Keyboard-Shortcuts-Dialog.patch
new file mode 100644 (file)
index 0000000..f5a9b4e
--- /dev/null
@@ -0,0 +1,41 @@
+From 56501aeb001e8575f9819c211eef38721d8e29a7 Mon Sep 17 00:00:00 2001
+From: Bryan Owens <djbryan3540@gmail.com>
+Date: Thu, 30 Mar 2017 13:30:04 -0500
+Subject: [PATCH 46/47] Themes: Expose Keyboard Shortcuts Dialog
+
+Change-Id: I84d3e57fe8c42d79ff6e0b6502cb6cd49aaaf91b
+Signed-off-by: Bryan Owens <djbryan3540@gmail.com>
+---
+ packages/SystemUI/res/values/projekt_styles.xml                        | 3 +++
+ .../SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java | 2 +-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/packages/SystemUI/res/values/projekt_styles.xml b/packages/SystemUI/res/values/projekt_styles.xml
+index d0be98087e6..87dd19cb97c 100644
+--- a/packages/SystemUI/res/values/projekt_styles.xml
++++ b/packages/SystemUI/res/values/projekt_styles.xml
+@@ -20,5 +20,8 @@
+     <style name="TextAppearance.SwitchBar" parent="@android:style/TextAppearance.Material.Title">
+         <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
+     </style>
++
++    <!-- Phyisical Keyboard Dialog style -->
++    <style name="KeyboardShortcutsDialog" parent="@*android:style/Theme.DeviceDefault.Light" />
+ </resources>
+diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java
+index 016e1f2f5a9..c471cfe8cd4 100644
+--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java
++++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java
+@@ -118,7 +118,7 @@ public final class KeyboardShortcuts {
+     private KeyCharacterMap mKeyCharacterMap;
+     private KeyboardShortcuts(Context context) {
+-        this.mContext = new ContextThemeWrapper(context, android.R.style.Theme_DeviceDefault_Light);
++        this.mContext = new ContextThemeWrapper(context, R.style.KeyboardShortcutsDialog);
+         this.mPackageManager = AppGlobals.getPackageManager();
+         loadResources(context);
+     }
+-- 
+2.11.1
+
diff --git a/patches/frameworks/base/0047-Hold-volume-up-during-boot-to-disable-all-overlays.patch b/patches/frameworks/base/0047-Hold-volume-up-during-boot-to-disable-all-overlays.patch
new file mode 100644 (file)
index 0000000..d20150f
--- /dev/null
@@ -0,0 +1,140 @@
+From 590ff215ebbf88799b01715d155d05e6116df082 Mon Sep 17 00:00:00 2001
+From: George G <kreach3r@users.noreply.github.com>
+Date: Sat, 11 Mar 2017 14:11:54 +0200
+Subject: [PATCH 47/47] Hold "volume up" during boot to disable all overlays
+
+Following the way "safe mode" was coded, you can now long press
+"volume up" during boot to automatically disable all overlays
+(from the current system/owner user).
+
+This should come in handy as a global "reset" mechanism.
+
+Example output:
+03-12 03:22:07.090   678   678 D TEST    : Disabling overlay android.GalaxyEvolution
+03-12 03:22:07.176   678   678 D TEST    : Disabling overlay com.android.launcher3.GalaxyEvolution
+03-12 03:22:07.267   678   678 D TEST    : Disabling overlay com.android.server.telecom.GalaxyEvolution
+
+Caveats:
+SystemServer seems to have already loaded a context based on the
+overlays by the time "disableOverlays" is finished, so SystemUI
+turns up themed, even if the overlay is correctly disabled.
+
+In the case of a user using this reset mode to "fix" a SystemUI FC,
+this means that the user will experience one more FC after boot
+(which then would trigger a SystemUI restart, loading the default
+theme this time, and thus ending the FC loop).
+
+Change-Id: I64fb769ea175d37a90a0804f916926b63e5b93ca
+---
+ .../android/server/am/ActivityManagerService.java  | 29 ++++++++++++++++++++++
+ .../android/server/wm/WindowManagerService.java    | 22 ++++++++++++++++
+ services/java/com/android/server/SystemServer.java |  6 +++++
+ 3 files changed, 57 insertions(+)
+
+diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
+index 7424f1e356f..78f6d078924 100644
+--- a/services/core/java/com/android/server/am/ActivityManagerService.java
++++ b/services/core/java/com/android/server/am/ActivityManagerService.java
+@@ -125,6 +125,8 @@ import android.content.IIntentSender;
+ import android.content.Intent;
+ import android.content.IntentFilter;
+ import android.content.IntentSender;
++import android.content.om.IOverlayManager;
++import android.content.om.OverlayInfo;
+ import android.content.pm.ActivityInfo;
+ import android.content.pm.ApplicationInfo;
+ import android.content.pm.ConfigurationInfo;
+@@ -13086,6 +13088,33 @@ public final class ActivityManagerService extends ActivityManagerNative
+                 Context.WINDOW_SERVICE)).addView(v, lp);
+     }
++    public final void disableOverlays() {
++        try {
++            IOverlayManager iom = IOverlayManager.Stub.asInterface(
++                    ServiceManager.getService("overlay"));
++            if (iom == null) {
++                return;
++            }
++            Log.d(TAG, "Contacting the Overlay Manager Service for the list of enabled overlays");
++            Map<String, List<OverlayInfo>> allOverlays = iom.getAllOverlays(UserHandle.USER_SYSTEM);
++            if (allOverlays != null) {
++                Log.d(TAG, "The Overlay Manager Service provided the list of enabled overlays");
++                Set<String> set = allOverlays.keySet();
++                for (String targetPackageName : set) {
++                    for (OverlayInfo oi : allOverlays.get(targetPackageName)) {
++                        if (oi.isEnabled()) {
++                            iom.setEnabled(oi.packageName, false, UserHandle.USER_SYSTEM, false);
++                            Log.d(TAG, "Now disabling \'" + oi.packageName + "\'");
++                        }
++                    }
++                }
++            }
++        } catch (RemoteException re) {
++            re.printStackTrace();
++            Log.d(TAG, "RemoteException while trying to contact the Overlay Manager Service!");
++        }
++    }
++
+     public void noteWakeupAlarm(IIntentSender sender, int sourceUid, String sourcePkg, String tag) {
+         if (sender != null && !(sender instanceof PendingIntentRecord)) {
+             return;
+diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
+index 3c9170e65a7..d044e4c8852 100644
+--- a/services/core/java/com/android/server/wm/WindowManagerService.java
++++ b/services/core/java/com/android/server/wm/WindowManagerService.java
+@@ -536,6 +536,7 @@ public class WindowManagerService extends IWindowManager.Stub
+     boolean mDisplayReady;
+     boolean mSafeMode;
++    boolean mDisableOverlays;
+     boolean mDisplayEnabled = false;
+     boolean mSystemBooted = false;
+     boolean mForceDisplayEnabled = false;
+@@ -8206,6 +8207,27 @@ public class WindowManagerService extends IWindowManager.Stub
+         return mSafeMode;
+     }
++    public boolean detectDisableOverlays() {
++        if (!mInputMonitor.waitForInputDevicesReady(
++                INPUT_DEVICES_READY_FOR_SAFE_MODE_DETECTION_TIMEOUT_MILLIS)) {
++            Slog.w(TAG_WM, "Devices still not ready after waiting "
++                   + INPUT_DEVICES_READY_FOR_SAFE_MODE_DETECTION_TIMEOUT_MILLIS
++                   + " milliseconds before attempting to detect safe mode.");
++        }
++
++        int volumeUpState = mInputManager.getKeyCodeState(-1, InputDevice.SOURCE_ANY,
++                KeyEvent.KEYCODE_VOLUME_UP);
++        mDisableOverlays = volumeUpState > 0;
++
++        if (mDisableOverlays) {
++            Log.i(TAG_WM, "All enabled theme overlays will now be disabled.");
++        } else {
++            Log.i(TAG_WM, "System will boot with enabled overlays intact.");
++        }
++
++        return mDisableOverlays;
++    }
++
+     public void displayReady() {
+         for (Display display : mDisplays) {
+             displayReady(display.getDisplayId());
+diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
+index 6e973b785f6..d01af54289e 100644
+--- a/services/java/com/android/server/SystemServer.java
++++ b/services/java/com/android/server/SystemServer.java
+@@ -1395,6 +1395,12 @@ public final class SystemServer {
+             mActivityManagerService.showSafeModeOverlay();
+         }
++        // Let's check whether we should disable all theme overlays
++        final boolean disableOverlays = wm.detectDisableOverlays();
++        if (disableOverlays) {
++            mActivityManagerService.disableOverlays();
++        }
++
+         // Update the configuration for this context by hand, because we're going
+         // to start using it before the config change done in wm.systemReady() will
+         // propagate to it.
+-- 
+2.11.1
+
diff --git a/patches/frameworks/native/0001-OMS-N-installd-add-command-rmidmap.patch b/patches/frameworks/native/0001-OMS-N-installd-add-command-rmidmap.patch
deleted file mode 100644 (file)
index ec1ad89..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-From 70dc365c2877d443aebb7da11f061fa3d69dd2a4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?M=C3=A5rten=20Kongstad?= <marten.kongstad@sonymobile.com>
-Date: Tue, 15 Dec 2015 14:02:30 +0100
-Subject: [PATCH] OMS-N: installd: add command 'rmidmap'
-
-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
-no longer needed because an APK was removed, etc.
-
-This commit depends on a corresponding commit in frameworks/base
-(with the same Change-Id).
-
-Bug: 31052947
-
-Change-Id: Iae19a519803f0c172b02a32faa283ef36f43863c
----
- cmds/installd/commands.cpp | 16 ++++++++++++++++
- cmds/installd/commands.h   |  1 +
- cmds/installd/installd.cpp |  6 ++++++
- 3 files changed, 23 insertions(+)
-
-diff --git a/cmds/installd/commands.cpp b/cmds/installd/commands.cpp
-index cadcd1e..0b25da1 100644
---- a/cmds/installd/commands.cpp
-+++ b/cmds/installd/commands.cpp
-@@ -2047,6 +2047,22 @@ fail:
-     return -1;
- }
-+int rm_idmap(const char *overlay_apk)
-+{
-+    char idmap_path[PATH_MAX];
-+
-+    if (flatten_path(IDMAP_PREFIX, IDMAP_SUFFIX, overlay_apk,
-+                idmap_path, sizeof(idmap_path)) == -1) {
-+        ALOGE("idmap cannot generate idmap path for overlay %s\n", overlay_apk);
-+        return -1;
-+    }
-+    if (unlink(idmap_path) < 0) {
-+        ALOGE("couldn't unlink idmap file %s\n", idmap_path);
-+        return -1;
-+    }
-+    return 0;
-+}
-+
- int restorecon_app_data(const char* uuid, const char* pkgName, userid_t userid, int flags,
-         appid_t appid, const char* seinfo) {
-     int res = 0;
-diff --git a/cmds/installd/commands.h b/cmds/installd/commands.h
-index ba27517..2da80dd 100644
---- a/cmds/installd/commands.h
-+++ b/cmds/installd/commands.h
-@@ -76,6 +76,7 @@ int dexopt(const char* const params[DEXOPT_PARAM_COUNT]);
- int mark_boot_complete(const char *instruction_set);
- int linklib(const char* uuid, const char* pkgname, const char* asecLibDir, int userId);
- int idmap(const char *target_path, const char *overlay_path, uid_t uid);
-+int rm_idmap(const char *overlay_path);
- int create_oat_dir(const char* oat_dir, const char *instruction_set);
- int rm_package_dir(const char* apk_path);
- int clear_app_profiles(const char* pkgname);
-diff --git a/cmds/installd/installd.cpp b/cmds/installd/installd.cpp
-index 8f883db..93388ce 100644
---- a/cmds/installd/installd.cpp
-+++ b/cmds/installd/installd.cpp
-@@ -383,6 +383,11 @@ static int do_idmap(char **arg, char reply[REPLY_MAX] ATTRIBUTE_UNUSED)
-     return idmap(arg[0], arg[1], atoi(arg[2]));
- }
-+static int do_rm_idmap(char **arg, char reply[REPLY_MAX] __unused)
-+{
-+    return rm_idmap(arg[0]);
-+}
-+
- static int do_create_oat_dir(char **arg, char reply[REPLY_MAX] ATTRIBUTE_UNUSED)
- {
-     /* oat_dir, instruction_set */
-@@ -450,6 +455,7 @@ struct cmdinfo cmds[] = {
-     { "freecache",            2, do_free_cache },
-     { "linklib",              4, do_linklib },
-     { "idmap",                3, do_idmap },
-+    { "rmidmap",              1, do_rm_idmap },
-     { "createoatdir",         2, do_create_oat_dir },
-     { "rmpackagedir",         1, do_rm_package_dir },
-     { "clear_app_profiles",   1, do_clear_app_profiles },
--- 
-2.9.3
-
diff --git a/patches/frameworks/native/0001-OMS7-N-installd-add-command-rmidmap.patch b/patches/frameworks/native/0001-OMS7-N-installd-add-command-rmidmap.patch
new file mode 100644 (file)
index 0000000..c17fdf3
--- /dev/null
@@ -0,0 +1,82 @@
+From 072fba04d4d8ad9598bbac24e27f2b7497378de5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?M=C3=A5rten=20Kongstad?= <marten.kongstad@sonymobile.com>
+Date: Tue, 15 Dec 2015 14:02:30 +0100
+Subject: [PATCH] OMS7-N: installd: add command 'rmidmap'
+
+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
+no longer needed because an APK was removed, etc.
+
+Change-Id: I98cb26a51d03d7babda6b7b46b6a328abb032836
+---
+ cmds/installd/commands.cpp | 16 ++++++++++++++++
+ cmds/installd/commands.h   |  1 +
+ cmds/installd/installd.cpp |  6 ++++++
+ 3 files changed, 23 insertions(+)
+
+diff --git a/cmds/installd/commands.cpp b/cmds/installd/commands.cpp
+index cadcd1ef1..0b25da1d7 100644
+--- a/cmds/installd/commands.cpp
++++ b/cmds/installd/commands.cpp
+@@ -2047,6 +2047,22 @@ fail:
+     return -1;
+ }
++int rm_idmap(const char *overlay_apk)
++{
++    char idmap_path[PATH_MAX];
++
++    if (flatten_path(IDMAP_PREFIX, IDMAP_SUFFIX, overlay_apk,
++                idmap_path, sizeof(idmap_path)) == -1) {
++        ALOGE("idmap cannot generate idmap path for overlay %s\n", overlay_apk);
++        return -1;
++    }
++    if (unlink(idmap_path) < 0) {
++        ALOGE("couldn't unlink idmap file %s\n", idmap_path);
++        return -1;
++    }
++    return 0;
++}
++
+ int restorecon_app_data(const char* uuid, const char* pkgName, userid_t userid, int flags,
+         appid_t appid, const char* seinfo) {
+     int res = 0;
+diff --git a/cmds/installd/commands.h b/cmds/installd/commands.h
+index ba275170a..2da80dd7e 100644
+--- a/cmds/installd/commands.h
++++ b/cmds/installd/commands.h
+@@ -76,6 +76,7 @@ int dexopt(const char* const params[DEXOPT_PARAM_COUNT]);
+ int mark_boot_complete(const char *instruction_set);
+ int linklib(const char* uuid, const char* pkgname, const char* asecLibDir, int userId);
+ int idmap(const char *target_path, const char *overlay_path, uid_t uid);
++int rm_idmap(const char *overlay_path);
+ int create_oat_dir(const char* oat_dir, const char *instruction_set);
+ int rm_package_dir(const char* apk_path);
+ int clear_app_profiles(const char* pkgname);
+diff --git a/cmds/installd/installd.cpp b/cmds/installd/installd.cpp
+index 8f883db05..93388cedc 100644
+--- a/cmds/installd/installd.cpp
++++ b/cmds/installd/installd.cpp
+@@ -383,6 +383,11 @@ static int do_idmap(char **arg, char reply[REPLY_MAX] ATTRIBUTE_UNUSED)
+     return idmap(arg[0], arg[1], atoi(arg[2]));
+ }
++static int do_rm_idmap(char **arg, char reply[REPLY_MAX] __unused)
++{
++    return rm_idmap(arg[0]);
++}
++
+ static int do_create_oat_dir(char **arg, char reply[REPLY_MAX] ATTRIBUTE_UNUSED)
+ {
+     /* oat_dir, instruction_set */
+@@ -450,6 +455,7 @@ struct cmdinfo cmds[] = {
+     { "freecache",            2, do_free_cache },
+     { "linklib",              4, do_linklib },
+     { "idmap",                3, do_idmap },
++    { "rmidmap",              1, do_rm_idmap },
+     { "createoatdir",         2, do_create_oat_dir },
+     { "rmpackagedir",         1, do_rm_package_dir },
+     { "clear_app_profiles",   1, do_clear_app_profiles },
+-- 
+2.11.1
+
index ecedf0ca7f96b51e25abff30bfbfe71fe9fe116f..d4326d3b706bd85125c1ec4918c4d5bb07759734 100644 (file)
@@ -1,4 +1,4 @@
-From 821a5244f3d480fc62d5b16ec9167d16a0f86ea2 Mon Sep 17 00:00:00 2001
+From 8c3f30d4a76837b5221b8b99d13237bd09b1a39f Mon Sep 17 00:00:00 2001
 From: beanstown106 <nbenis106@gmail.com>
 Date: Fri, 20 Nov 2015 17:27:43 -0500
 Subject: [PATCH] Themes: Expose hardcoded layout and styles colors
@@ -16,7 +16,7 @@ Change-Id: I4ca0347470333508e399bfae7ed5291a1a704410
  create mode 100644 res/values/projekt_colors.xml
 
 diff --git a/res/layout/confirm_add_detail_activity.xml b/res/layout/confirm_add_detail_activity.xml
-index 1fa6236..eb54b8a 100644
+index 1fa62363b..eb54b8afb 100644
 --- a/res/layout/confirm_add_detail_activity.xml
 +++ b/res/layout/confirm_add_detail_activity.xml
 @@ -55,7 +55,7 @@
@@ -47,7 +47,7 @@ index 1fa6236..eb54b8a 100644
                  android:paddingBottom="4dip"
                  android:visibility="gone" />
 diff --git a/res/layout/editor_account_header.xml b/res/layout/editor_account_header.xml
-index 59ae3b1..a7d0c62 100644
+index 59ae3b126..a7d0c6252 100644
 --- a/res/layout/editor_account_header.xml
 +++ b/res/layout/editor_account_header.xml
 @@ -20,7 +20,7 @@
@@ -61,13 +61,13 @@ index 59ae3b1..a7d0c62 100644
      android:paddingBottom="8dip"
 diff --git a/res/values/projekt_colors.xml b/res/values/projekt_colors.xml
 new file mode 100644
-index 0000000..d2ae4f8
+index 000000000..c161ef5bf
 --- /dev/null
 +++ b/res/values/projekt_colors.xml
 @@ -0,0 +1,29 @@
 +<?xml version="1.0" encoding="utf-8"?>
 +<!--
-+    Copyright (c) 2016 Projekt Substratum
++    Copyright (c) 2016-2017 Projekt Substratum
 +
 +    Licensed under the Apache License, Version 2.0 (the "License");
 +    you may not use this file except in compliance with the License.
@@ -95,7 +95,7 @@ index 0000000..d2ae4f8
 +    <color name="account_type_name_text_color">#363636</color>
 +</resources>
 diff --git a/res/values/styles.xml b/res/values/styles.xml
-index 95641e3..69d79ea 100644
+index 95641e345..69d79eab7 100644
 --- a/res/values/styles.xml
 +++ b/res/values/styles.xml
 @@ -44,7 +44,13 @@
@@ -184,5 +184,5 @@ index 95641e3..69d79ea 100644
      </style>
  </resources>
 -- 
-2.9.3
+2.11.1
 
index be78a8c45d3a4a350d6b72570e1667d3403244d5..4e58a9e47bd4ea0fea03af4ecf9457464cad0f9b 100644 (file)
@@ -1,4 +1,4 @@
-From 34f415cf87f857d4ce1426c60c784dcb417aa227 Mon Sep 17 00:00:00 2001
+From c2b6bf12c7a179f35274a2fafc91411993277c3e Mon Sep 17 00:00:00 2001
 From: bgill55 <bricam55@gmail.com>
 Date: Sat, 24 Jan 2015 18:12:39 -0700
 Subject: [PATCH 1/2] Themes: Expose hardcoded contact tile text colors
@@ -16,7 +16,7 @@ Change-Id: I85aa4349ece8a9821d9443523b13f2234edd4af7
  create mode 100644 res/values/projekt_colors.xml
 
 diff --git a/res/layout/contact_tile_frequent.xml b/res/layout/contact_tile_frequent.xml
-index b1e83ce..8c718fb 100644
+index b1e83ce0..8c718fb2 100644
 --- a/res/layout/contact_tile_frequent.xml
 +++ b/res/layout/contact_tile_frequent.xml
 @@ -38,7 +38,7 @@
@@ -29,7 +29,7 @@ index b1e83ce..8c718fb 100644
              android:singleLine="true"
              android:fadingEdge="horizontal"
 diff --git a/res/layout/contact_tile_starred.xml b/res/layout/contact_tile_starred.xml
-index 777cc05..88aa1e8 100644
+index 777cc058..88aa1e88 100644
 --- a/res/layout/contact_tile_starred.xml
 +++ b/res/layout/contact_tile_starred.xml
 @@ -43,7 +43,7 @@
@@ -42,7 +42,7 @@ index 777cc05..88aa1e8 100644
              android:singleLine="true"
              android:fadingEdge="horizontal"
 diff --git a/res/layout/contact_tile_starred_quick_contact.xml b/res/layout/contact_tile_starred_quick_contact.xml
-index ecbe583..2134ffc 100644
+index ecbe5839..2134ffcb 100644
 --- a/res/layout/contact_tile_starred_quick_contact.xml
 +++ b/res/layout/contact_tile_starred_quick_contact.xml
 @@ -47,7 +47,7 @@
@@ -56,13 +56,13 @@ index ecbe583..2134ffc 100644
                  android:fadingEdge="horizontal"
 diff --git a/res/values/projekt_colors.xml b/res/values/projekt_colors.xml
 new file mode 100644
-index 0000000..a5d6bd3
+index 00000000..b503bfb9
 --- /dev/null
 +++ b/res/values/projekt_colors.xml
 @@ -0,0 +1,22 @@
 +<?xml version="1.0" encoding="utf-8"?>
 +<!--
-+    Copyright (c) 2016 Project Substratum
++    Copyright (c) 2016-2017 Projekt Substratum
 +
 +    Licensed under the Apache License, Version 2.0 (the "License");
 +    you may not use this file except in compliance with the License.
@@ -83,5 +83,5 @@ index 0000000..a5d6bd3
 +    <color name="starred_quick_contact_name_text_color">@android:color/white</color>
 +</resources>
 -- 
-2.9.3
+2.11.1
 
index a471b86eca51077f0bb768e4daabc41e482c1bf2..35a14c6073f9b7b85d693fc145feb21639f40dc7 100644 (file)
@@ -1,4 +1,4 @@
-From 359630888f09069f9bad56dfc88102655025da6d Mon Sep 17 00:00:00 2001
+From 463eda9e55b3f417750559306e5e72c294430961 Mon Sep 17 00:00:00 2001
 From: Bryan Owens <djbryan3540@gmail.com>
 Date: Fri, 11 Dec 2015 22:04:15 -0600
 Subject: [PATCH 2/2] Themes: Define back arrow tint color for themes
@@ -13,7 +13,7 @@ Signed-off-by: Bryan Owens <djbryan3540@gmail.com>
  2 files changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/res/layout/search_bar_expanded.xml b/res/layout/search_bar_expanded.xml
-index c530299..e5e180a 100644
+index c5302994..e5e180a1 100644
 --- a/res/layout/search_bar_expanded.xml
 +++ b/res/layout/search_bar_expanded.xml
 @@ -30,7 +30,7 @@
@@ -26,7 +26,7 @@ index c530299..e5e180a 100644
      <EditText
          android:id="@+id/search_view"
 diff --git a/res/values/projekt_colors.xml b/res/values/projekt_colors.xml
-index a5d6bd3..07d6963 100644
+index b503bfb9..4c45cd9c 100644
 --- a/res/values/projekt_colors.xml
 +++ b/res/values/projekt_colors.xml
 @@ -19,4 +19,5 @@
@@ -36,5 +36,5 @@ index a5d6bd3..07d6963 100644
 +    <color name="back_arrow_icon_tint_color">@color/actionbar_background_color</color>
  </resources>
 -- 
-2.9.3
+2.11.1
 
index 7a79a6350b84457e5be8c3562e502ee621efd72d..969bb850f08b21cf0b1fb1b016cfb896740886bd 100644 (file)
@@ -1,4 +1,4 @@
-From 2d18a64b8297a4cae1e97dcab6332118b1e99d0d Mon Sep 17 00:00:00 2001
+From b9dfa05a56d9f40b001fc6adb8a29d5656c0d51a Mon Sep 17 00:00:00 2001
 From: Alex Cruz <mazdarider23@gmail.com>
 Date: Thu, 5 May 2016 11:55:05 -0500
 Subject: [PATCH 1/2] Themes: Separate background color from text color
@@ -11,7 +11,7 @@ Change-Id: I19e55b64e34cb069f1967a900fd19b118c392244
  create mode 100644 res/values/projekt_colors.xml
 
 diff --git a/res/layout/voicemail_promo_card.xml b/res/layout/voicemail_promo_card.xml
-index ba4ac59..9dc7850 100644
+index ba4ac59a7..9dc7850b8 100644
 --- a/res/layout/voicemail_promo_card.xml
 +++ b/res/layout/voicemail_promo_card.xml
 @@ -46,7 +46,7 @@
@@ -34,13 +34,13 @@ index ba4ac59..9dc7850 100644
                      android:lineSpacingExtra="@dimen/promo_card_line_spacing"
 diff --git a/res/values/projekt_colors.xml b/res/values/projekt_colors.xml
 new file mode 100644
-index 0000000..a5f4aa9
+index 000000000..4e4689433
 --- /dev/null
 +++ b/res/values/projekt_colors.xml
 @@ -0,0 +1,20 @@
 +<?xml version="1.0" encoding="utf-8"?>
 +<!--
-+     Copyright (C) 2016 Projekt Substratum
++     Copyright (C) 2016-2017 Projekt Substratum
 +
 +     Licensed under the Apache License, Version 2.0 (the "License");
 +     you may not use this file except in compliance with the License.
@@ -59,5 +59,5 @@ index 0000000..a5f4aa9
 +    <color name="promo_card_details_text_color">@color/background_dialer_white</color>
 +</resources>
 -- 
-2.9.3
+2.11.1
 
index 0de290a87121c4408fb2dc7f662f2a7f8daa7bee..39c65155951077aaf564fd360c7cb8e326ad2eba 100644 (file)
@@ -1,4 +1,4 @@
-From 377d7dc8d57e9bd58ac184ecdf3af670d7a0ac01 Mon Sep 17 00:00:00 2001
+From 27948580bec527aedb79410787e87176bd330c12 Mon Sep 17 00:00:00 2001
 From: George G <kreach3r@users.noreply.github.com>
 Date: Mon, 14 Nov 2016 16:05:32 +0200
 Subject: [PATCH 2/2] Themes: InCallUI dialpad digits color
@@ -21,7 +21,7 @@ Change-Id: I9fc18dc5068f8bab90fbe8b5cfc608f0500a09c8
  create mode 100644 res/values/projekt_config.xml
 
 diff --git a/InCallUI/src/com/android/incallui/DialpadFragment.java b/InCallUI/src/com/android/incallui/DialpadFragment.java
-index ad288bd..38e3d8f 100644
+index ad288bdc6..38e3d8f41 100644
 --- a/InCallUI/src/com/android/incallui/DialpadFragment.java
 +++ b/InCallUI/src/com/android/incallui/DialpadFragment.java
 @@ -455,6 +455,10 @@ public class DialpadFragment extends BaseFragment<DialpadPresenter, DialpadPrese
@@ -36,7 +36,7 @@ index ad288bd..38e3d8f 100644
          if (mCurrentTextColor == textColor) {
              return;
 diff --git a/res/values/projekt_colors.xml b/res/values/projekt_colors.xml
-index a5f4aa9..a894291 100644
+index 4e4689433..43e24ba6a 100644
 --- a/res/values/projekt_colors.xml
 +++ b/res/values/projekt_colors.xml
 @@ -17,4 +17,5 @@
@@ -47,13 +47,13 @@ index a5f4aa9..a894291 100644
  </resources>
 diff --git a/res/values/projekt_config.xml b/res/values/projekt_config.xml
 new file mode 100644
-index 0000000..1f61f12
+index 000000000..4325e103e
 --- /dev/null
 +++ b/res/values/projekt_config.xml
 @@ -0,0 +1,20 @@
 +<?xml version="1.0" encoding="utf-8"?>
 +<!--
-+    Copyright (c) 2016 Project Substratum
++    Copyright (c) 2016-2017 Projekt Substratum
 +
 +    Licensed under the Apache License, Version 2.0 (the "License");
 +    you may not use this file except in compliance with the License.
@@ -72,5 +72,5 @@ index 0000000..1f61f12
 +    <bool name="config_dialpadDigitsStaticColor">false</bool>
 +</resources>
 -- 
-2.9.3
+2.11.1
 
index 4113995bf10caeb01c80f3c7af02ec8c58359d63..9402acb4d3a2feea8b7509470aa0153e03b63d1e 100644 (file)
@@ -1,4 +1,4 @@
-From 86ffec60f1b9006a910eb51ff5bc46e4f3e731fc Mon Sep 17 00:00:00 2001
+From af19354356f0af1cdde634bbd2cbbf10c4d34eb9 Mon Sep 17 00:00:00 2001
 From: Bryan Owens <djbryan3540@gmail.com>
 Date: Tue, 29 Dec 2015 22:25:10 -0600
 Subject: [PATCH 1/2] Themes: Expose hard coded background in java
@@ -12,13 +12,13 @@ Change-Id: I30bade7c82f29767c6659c8a75bb402d245e49f1
 
 diff --git a/res/values/projekt_colors.xml b/res/values/projekt_colors.xml
 new file mode 100644
-index 0000000..9e15ffc
+index 0000000..b849cb3
 --- /dev/null
 +++ b/res/values/projekt_colors.xml
 @@ -0,0 +1,19 @@
 +<?xml version="1.0" encoding="utf-8"?>
 +<!--
-+     Copyright (C) 2016 Projekt Substratum
++     Copyright (C) 2016-2017 Projekt Substratum
 +
 +     Licensed under the Apache License, Version 2.0 (the "License");
 +     you may not use this file except in compliance with the License.
@@ -49,5 +49,5 @@ index d4520c5..5b02e4b 100644
          setPageTransformer(false, mPageTransformer);
          addOnPageChangeListener(mOnPageChangeListener);
 -- 
-2.9.3
+2.11.1
 
index a37fcc4beb94711abc6aaf46959e0f32a7ce2606..1a26351acbecc134490cce2aff9146b4e21dbea3 100644 (file)
@@ -1,4 +1,4 @@
-From 2145cfc41892ff9851a8b5e99c5afc4d5e8bcd8a Mon Sep 17 00:00:00 2001
+From 08678d8b1447e4df8254534b4e4f36206fe2ee8d Mon Sep 17 00:00:00 2001
 From: Abdulwahab Isam <abdoi94.iq@gmail.com>
 Date: Mon, 19 Sep 2016 18:42:06 +0300
 Subject: [PATCH 2/2] Themes: Expose all elevations
@@ -39,13 +39,13 @@ index a6d2013..9e7e1df 100644
          <item name="android:paddingStart">20dip</item>
 diff --git a/res/values/projekt_dimens.xml b/res/values/projekt_dimens.xml
 new file mode 100644
-index 0000000..c1a0196
+index 0000000..6e68036
 --- /dev/null
 +++ b/res/values/projekt_dimens.xml
 @@ -0,0 +1,20 @@
 +<?xml version="1.0" encoding="utf-8"?>
 +<!--
-+     Copyright (C) 2017 Projekt Substratum
++     Copyright (C) 2016-2017 Projekt Substratum
 +
 +     Licensed under the Apache License, Version 2.0 (the "License");
 +     you may not use this file except in compliance with the License.
@@ -64,5 +64,5 @@ index 0000000..c1a0196
 +    <dimen name="pad_elevation">4.0dip</dimen>
 +</resources>
 -- 
-2.9.3
+2.11.1
 
index c8f88e0f2fe3a4b6c4c32cfef1eadc22bcbc81d6..d6f9afb87fd1b33f49d80ba0cdee01f1130a7020 100644 (file)
@@ -1,4 +1,4 @@
-From 3ce22cd049cde21d7790c58b255b9d072e116625 Mon Sep 17 00:00:00 2001
+From 450424bfd622327e83d48511d94254ed7a7617fc Mon Sep 17 00:00:00 2001
 From: Bryan Owens <djbryan3540@gmail.com>
 Date: Fri, 8 Apr 2016 19:41:40 -0500
 Subject: [PATCH] PackageInstaller: Add tint mode to icons
@@ -12,7 +12,7 @@ Signed-off-by: Bryan Owens <djbryan3540@gmail.com>
  1 file changed, 2 insertions(+)
 
 diff --git a/src/com/android/packageinstaller/permission/utils/Utils.java b/src/com/android/packageinstaller/permission/utils/Utils.java
-index 22663e1..628846a 100644
+index c2da5824..98ae77c6 100644
 --- a/src/com/android/packageinstaller/permission/utils/Utils.java
 +++ b/src/com/android/packageinstaller/permission/utils/Utils.java
 @@ -25,6 +25,7 @@ import android.content.pm.ResolveInfo;
@@ -32,5 +32,5 @@ index 22663e1..628846a 100644
      }
  
 -- 
-2.9.3
+2.11.1
 
index afe7062ebe1a4d14bef4d5d73ef7257e5ec2a3ac..68a0fa1df8f21bce541df67a99ea3103e9b2b386 100644 (file)
@@ -1,4 +1,4 @@
-From bf3a9728d3a62473b7f95fc2ec8056dcd43a9974 Mon Sep 17 00:00:00 2001
+From 4cabfd35796c44a005edae8a62dccc1ab3ac340a Mon Sep 17 00:00:00 2001
 From: Thyrus11 <thyrus11@gmail.com>
 Date: Sat, 21 Feb 2015 10:41:01 +0100
 Subject: [PATCH] Themes: Make dialpad seperator line theme-able
@@ -40,13 +40,13 @@ index 7bc4536..3fcf0da 100644
          android:layout_width="match_parent"
 diff --git a/res/values/projekt_colors.xml b/res/values/projekt_colors.xml
 new file mode 100644
-index 0000000..163e4f0
+index 0000000..91340e4
 --- /dev/null
 +++ b/res/values/projekt_colors.xml
 @@ -0,0 +1,20 @@
 +<?xml version="1.0" encoding="utf-8"?>
 +<!--
-+    Copyright (c) 2016 Projekt Substratum
++    Copyright (c) 2016-2017 Projekt Substratum
 +
 +    Licensed under the Apache License, Version 2.0 (the "License");
 +    you may not use this file except in compliance with the License.
@@ -65,5 +65,5 @@ index 0000000..163e4f0
 +    <color name="dialpad_separator_color">#e3e3e3</color>
 +</resources>
 -- 
-2.9.3
+2.11.1
 
index c665068191055b72e6a3f5f971767767851b9c23..1163056611ba7ae0085901d53e5c980204634819 100644 (file)
@@ -1,4 +1,4 @@
-From 0c3691321abfd7072133ed7a0727a03c9c1132c8 Mon Sep 17 00:00:00 2001
+From a36ad14268d30c19f15e88ce3c6ff74035233c53 Mon Sep 17 00:00:00 2001
 From: Ivan Iskandar <iiiiskandar14@gmail.com>
 Date: Sun, 18 Sep 2016 10:12:05 +0700
 Subject: [PATCH 01/20] Settings: Expose dashboard category and tile color
@@ -17,13 +17,13 @@ Change-Id: Ia9c83eb9b8360923ed52e03641b4179681a80330
 
 diff --git a/res/drawable/dashboard_category_title_bg.xml b/res/drawable/dashboard_category_title_bg.xml
 new file mode 100644
-index 0000000..0e9604d
+index 0000000000..7427ee9b05
 --- /dev/null
 +++ b/res/drawable/dashboard_category_title_bg.xml
 @@ -0,0 +1,21 @@
 +<?xml version="1.0" encoding="utf-8"?>
 +<!--
-+    Copyright (c) 2016 Project Substratum
++    Copyright (c) 2016-2017 Projekt Substratum
 +
 +    Licensed under the Apache License, Version 2.0 (the "License");
 +    you may not use this file except in compliance with the License.
@@ -44,13 +44,13 @@ index 0000000..0e9604d
 +</shape>
 diff --git a/res/drawable/dashboard_tile_bg.xml b/res/drawable/dashboard_tile_bg.xml
 new file mode 100644
-index 0000000..61d113d
+index 0000000000..e8a190b677
 --- /dev/null
 +++ b/res/drawable/dashboard_tile_bg.xml
 @@ -0,0 +1,21 @@
 +<?xml version="1.0" encoding="utf-8"?>
 +<!--
-+    Copyright (c) 2016 Project Substratum
++    Copyright (c) 2016-2017 Projekt Substratum
 +
 +    Licensed under the Apache License, Version 2.0 (the "License");
 +    you may not use this file except in compliance with the License.
@@ -70,7 +70,7 @@ index 0000000..61d113d
 +   <solid android:color="@color/selectable_card_background" />
 +</shape>
 diff --git a/res/drawable/selectable_card.xml b/res/drawable/selectable_card.xml
-index df9ddb1..74018b2 100644
+index df9ddb1367..74018b214b 100644
 --- a/res/drawable/selectable_card.xml
 +++ b/res/drawable/selectable_card.xml
 @@ -18,5 +18,5 @@
@@ -83,7 +83,7 @@ index df9ddb1..74018b2 100644
 +    <item android:drawable="@drawable/dashboard_tile_bg"/>
 +</ripple>
 diff --git a/res/layout/dashboard_category.xml b/res/layout/dashboard_category.xml
-index 2e5dd5c..7836644 100644
+index 2e5dd5ce06..7836644806 100644
 --- a/res/layout/dashboard_category.xml
 +++ b/res/layout/dashboard_category.xml
 @@ -20,7 +20,7 @@
@@ -97,13 +97,13 @@ index 2e5dd5c..7836644 100644
          android:layout_width="match_parent"
 diff --git a/res/values/projekt_colors.xml b/res/values/projekt_colors.xml
 new file mode 100644
-index 0000000..60419bd
+index 0000000000..c30d7eda21
 --- /dev/null
 +++ b/res/values/projekt_colors.xml
 @@ -0,0 +1,21 @@
 +<?xml version="1.0" encoding="utf-8"?>
 +<!--
-+    Copyright (c) 2016 Projekt Substratum
++    Copyright (c) 2016-2017 Projekt Substratum
 +
 +    Licensed under the Apache License, Version 2.0 (the "License");
 +    you may not use this file except in compliance with the License.
@@ -123,5 +123,5 @@ index 0000000..60419bd
 +    <color name="selectable_card_background">@color/card_background</color>
 +</resources>
 -- 
-2.9.3
+2.11.1
 
index 4a24d42cae2363fa5b6f7c965692ad11d4f2aefa..b568e16e842e072ab0345882fd738b1b8921b73d 100644 (file)
@@ -1,4 +1,4 @@
-From 4190ba44a209fa7dbd2f9b54a0c058d590226e0b Mon Sep 17 00:00:00 2001
+From 59d8f9a2b5afc91026a29708239e994d6166d677 Mon Sep 17 00:00:00 2001
 From: daveyannihilation <daveyannihilation@hotmail.com>
 Date: Tue, 20 Sep 2016 23:35:04 +0800
 Subject: [PATCH 02/20] Settings: Expose condition card colors
@@ -9,22 +9,14 @@ PS2 Change to the actual colors in fwb that these attrs call to.
 
 Change-Id: I8de2e2a4f79a28c0fe1f025b4d23937931fe293a
 ---
- res/layout/condition_card.xml | 18 +++++++++---------
+ res/layout/condition_card.xml | 16 ++++++++--------
  res/values/projekt_colors.xml |  9 +++++++++
- 2 files changed, 18 insertions(+), 9 deletions(-)
+ 2 files changed, 17 insertions(+), 8 deletions(-)
 
 diff --git a/res/layout/condition_card.xml b/res/layout/condition_card.xml
-index 7c9e46d..88277c2 100644
+index 7c9e46da00..a5eb6c85cf 100644
 --- a/res/layout/condition_card.xml
 +++ b/res/layout/condition_card.xml
-@@ -1,6 +1,6 @@
- <?xml version="1.0" encoding="utf-8"?>
- <!--
--     Copyright (C) 2015 The Android Open Source Project
-+     Copyright (C) 2016 The Android Open Source Project
-      Licensed under the Apache License, Version 2.0 (the "License");
-      you may not use this file except in compliance with the License.
 @@ -25,7 +25,7 @@
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
@@ -96,7 +88,7 @@ index 7c9e46d..88277c2 100644
  
              </com.android.internal.widget.ButtonBarLayout>
 diff --git a/res/values/projekt_colors.xml b/res/values/projekt_colors.xml
-index 60419bd..9340830 100644
+index c30d7eda21..ea54a02a24 100644
 --- a/res/values/projekt_colors.xml
 +++ b/res/values/projekt_colors.xml
 @@ -18,4 +18,13 @@
@@ -114,5 +106,5 @@ index 60419bd..9340830 100644
 +    <color name="condition_card_second_button_text_color">@*android:color/primary_text_default_material_dark</color>
  </resources>
 -- 
-2.9.3
+2.11.1
 
index fb9e69be1ae9368bceaa5363d3c57f27059c8ec3..2142c6b52d7f3a85eb86dba9172fc806053bf837 100644 (file)
@@ -1,4 +1,4 @@
-From cd5696d8110762846fcd792589018889fd9e9441 Mon Sep 17 00:00:00 2001
+From 14445dd56fd01d0328bf2e1f8e2b17419ff94f45 Mon Sep 17 00:00:00 2001
 From: George G <kreach3r@users.noreply.github.com>
 Date: Tue, 3 Nov 2015 23:57:22 +0200
 Subject: [PATCH 03/20] Settings: Expose storage summary text
@@ -17,7 +17,7 @@ Change-Id: I10c124b6a1516a1be7ac234c1dd7dbe2cbe05bb2
  4 files changed, 17 insertions(+), 3 deletions(-)
 
 diff --git a/res/layout/storage_summary.xml b/res/layout/storage_summary.xml
-index 7bc51df..c01d2da 100644
+index 7bc51df5e6..c01d2dae5d 100644
 --- a/res/layout/storage_summary.xml
 +++ b/res/layout/storage_summary.xml
 @@ -33,7 +33,7 @@
@@ -30,7 +30,7 @@ index 7bc51df..c01d2da 100644
          android:ellipsize="marquee"
          android:fadingEdge="horizontal" />
 diff --git a/res/values/projekt_colors.xml b/res/values/projekt_colors.xml
-index 9340830..fb0d99e 100644
+index ea54a02a24..9cb442b1b5 100644
 --- a/res/values/projekt_colors.xml
 +++ b/res/values/projekt_colors.xml
 @@ -27,4 +27,6 @@
@@ -41,7 +41,7 @@ index 9340830..fb0d99e 100644
 +    <color name="storage_summary_title_color">@*android:color/accent_device_default_light</color>
  </resources>
 diff --git a/src/com/android/settings/deviceinfo/StorageSummaryPreference.java b/src/com/android/settings/deviceinfo/StorageSummaryPreference.java
-index e1cf774..2741798 100644
+index e1cf7742ef..274179830c 100644
 --- a/src/com/android/settings/deviceinfo/StorageSummaryPreference.java
 +++ b/src/com/android/settings/deviceinfo/StorageSummaryPreference.java
 @@ -21,6 +21,7 @@ import android.graphics.Color;
@@ -80,7 +80,7 @@ index e1cf774..2741798 100644
          super.onBindViewHolder(view);
      }
 diff --git a/src/com/android/settings/deviceinfo/StorageVolumePreference.java b/src/com/android/settings/deviceinfo/StorageVolumePreference.java
-index 6389075..9d3c7dc 100644
+index 63890758ba..9d3c7dccf2 100644
 --- a/src/com/android/settings/deviceinfo/StorageVolumePreference.java
 +++ b/src/com/android/settings/deviceinfo/StorageVolumePreference.java
 @@ -27,6 +27,7 @@ import android.support.v7.preference.PreferenceViewHolder;
@@ -120,5 +120,5 @@ index 6389075..9d3c7dc 100644
          }
  
 -- 
-2.9.3
+2.11.1
 
index 0ec6754c5df3f2334d6b8f86fdb69beb32e88948..1fb890cfb2a7c89a36fdfc60fe99cf7ef09929e2 100644 (file)
@@ -1,4 +1,4 @@
-From d076d99bef6c56a8154c0325193fa37498ccd81e Mon Sep 17 00:00:00 2001
+From 624f7356a320e6a942aeb9add1520d2b5b9a1a75 Mon Sep 17 00:00:00 2001
 From: daveyannihilation <daveyannihilation@hotmail.com>
 Date: Fri, 25 Nov 2016 15:20:04 -0700
 Subject: [PATCH 04/20] Settings: Expose gesture settings switchbar
@@ -15,7 +15,7 @@ Change-Id: I9857c10ee4e54d27ca1287c80a7d8e420adc9a61
  2 files changed, 4 insertions(+), 1 deletion(-)
 
 diff --git a/res/layout/gesture_preference.xml b/res/layout/gesture_preference.xml
-index ccbc42a..9fcd14f 100644
+index ccbc42ad25..9fcd14f3fc 100644
 --- a/res/layout/gesture_preference.xml
 +++ b/res/layout/gesture_preference.xml
 @@ -31,7 +31,7 @@
@@ -28,7 +28,7 @@ index ccbc42a..9fcd14f 100644
          <TextView
              android:id="@android:id/title"
 diff --git a/res/values/projekt_colors.xml b/res/values/projekt_colors.xml
-index fb0d99e..00252332 100644
+index 9cb442b1b5..afde5ae973 100644
 --- a/res/values/projekt_colors.xml
 +++ b/res/values/projekt_colors.xml
 @@ -29,4 +29,7 @@
@@ -40,5 +40,5 @@ index fb0d99e..00252332 100644
 +
  </resources>
 -- 
-2.9.3
+2.11.1
 
index 0510d231bfdec7443c4c56f41df0e0362b490915..331eb6c9000d65b891ff44a2aed653efad250c23 100644 (file)
@@ -1,4 +1,4 @@
-From d60689245c7d9d3502ba5f03ee2de28ce9e4db35 Mon Sep 17 00:00:00 2001
+From 5f431757c03c5e59f6ca13d4d8d1278cbb65a88e Mon Sep 17 00:00:00 2001
 From: SpiritCroc <spiritcroc@gmail.com>
 Date: Thu, 8 Dec 2016 20:40:16 +0100
 Subject: [PATCH 05/20] Settings: Expose storage icon colors
@@ -11,7 +11,7 @@ Change-Id: I97ce427f0683791670f1bbf82eaef66152fe4961
  3 files changed, 29 insertions(+), 14 deletions(-)
 
 diff --git a/res/values/projekt_colors.xml b/res/values/projekt_colors.xml
-index 00252332..bb6099b 100644
+index afde5ae973..2bee210dfd 100644
 --- a/res/values/projekt_colors.xml
 +++ b/res/values/projekt_colors.xml
 @@ -31,5 +31,12 @@
@@ -29,7 +29,7 @@ index 00252332..bb6099b 100644
 +    <color name="storage_private_5">#ffc0ca33</color>
  </resources>
 diff --git a/src/com/android/settings/deviceinfo/StorageSettings.java b/src/com/android/settings/deviceinfo/StorageSettings.java
-index 533799a..57fd13b 100755
+index 5b51a82bde..38be6d7b4f 100755
 --- a/src/com/android/settings/deviceinfo/StorageSettings.java
 +++ b/src/com/android/settings/deviceinfo/StorageSettings.java
 @@ -24,6 +24,7 @@ import android.app.Fragment;
@@ -40,7 +40,7 @@ index 533799a..57fd13b 100755
  import android.graphics.Color;
  import android.graphics.drawable.Drawable;
  import android.os.AsyncTask;
-@@ -73,16 +74,22 @@ public class StorageSettings extends SettingsPreferenceFragment implements Index
+@@ -75,16 +76,22 @@ public class StorageSettings extends SettingsPreferenceFragment implements Index
      private static final String TAG_VOLUME_UNMOUNTED = "volume_unmounted";
      private static final String TAG_DISK_INIT = "disk_init";
  
@@ -72,20 +72,21 @@ index 533799a..57fd13b 100755
  
      private StorageManager mStorageManager;
  
-@@ -165,10 +172,11 @@ public class StorageSettings extends SettingsPreferenceFragment implements Index
+@@ -167,11 +174,12 @@ public class StorageSettings extends SettingsPreferenceFragment implements Index
          final List<VolumeInfo> volumes = mStorageManager.getVolumes();
          Collections.sort(volumes, VolumeInfo.getDescriptionComparator());
  
 +        int[] colorPrivate = getColorPrivate(getResources());
          for (VolumeInfo vol : volumes) {
              if (vol.getType() == VolumeInfo.TYPE_PRIVATE) {
-                 final long volumeTotalBytes = getTotalSize(vol);
+                 final long volumeTotalBytes = PrivateStorageInfo.getTotalSize(vol,
+                         sTotalInternalStorage);
 -                final int color = COLOR_PRIVATE[privateCount++ % COLOR_PRIVATE.length];
 +                final int color = colorPrivate[privateCount++ % colorPrivate.length];
                  mInternalCategory.addPreference(
                          new StorageVolumePreference(context, vol, color, volumeTotalBytes));
                  if (vol.isMountedReadable()) {
-@@ -178,7 +186,7 @@ public class StorageSettings extends SettingsPreferenceFragment implements Index
+@@ -181,7 +189,7 @@ public class StorageSettings extends SettingsPreferenceFragment implements Index
                  }
              } else if (vol.getType() == VolumeInfo.TYPE_PUBLIC) {
                  StorageVolumePreference ExStorageVolumePreference =
@@ -94,7 +95,7 @@ index 533799a..57fd13b 100755
  
                  //Disable preference when in change
                  ExStorageVolumePreference.setEnabled(vol.getState()!= VolumeInfo.STATE_CHECKING
-@@ -195,7 +203,7 @@ public class StorageSettings extends SettingsPreferenceFragment implements Index
+@@ -198,7 +206,7 @@ public class StorageSettings extends SettingsPreferenceFragment implements Index
                  // TODO: add actual storage type to record
                  final Drawable icon = context.getDrawable(R.drawable.ic_sim_sd);
                  icon.mutate();
@@ -104,7 +105,7 @@ index 533799a..57fd13b 100755
                  final Preference pref = new Preference(context);
                  pref.setKey(rec.getFsUuid());
 diff --git a/src/com/android/settings/deviceinfo/StorageVolumePreference.java b/src/com/android/settings/deviceinfo/StorageVolumePreference.java
-index 9d3c7dc..8a2780a 100644
+index 9d3c7dccf2..8a2780a90b 100644
 --- a/src/com/android/settings/deviceinfo/StorageVolumePreference.java
 +++ b/src/com/android/settings/deviceinfo/StorageVolumePreference.java
 @@ -89,7 +89,7 @@ public class StorageVolumePreference extends Preference {
@@ -117,5 +118,5 @@ index 9d3c7dc..8a2780a 100644
              }
  
 -- 
-2.9.3
+2.11.1
 
index 193f7e93bb92ff9ed4d0fed3ad4fe5d2c30cd11e..d1e01ac390ddd4203b40d0a135b28aa03679bddb 100644 (file)
@@ -1,4 +1,4 @@
-From cfe707f8060d6b8568a87eca94e77cb2a5d4054b Mon Sep 17 00:00:00 2001
+From 550a7b41ac1d427988ba391f34d936be8fc95bc5 Mon Sep 17 00:00:00 2001
 From: SpiritCroc <spiritcroc@gmail.com>
 Date: Fri, 9 Dec 2016 12:47:54 +0100
 Subject: [PATCH 06/20] Settings: Expose LinearColorBar default colors
@@ -10,7 +10,7 @@ Change-Id: I8e63f10f9e4079d1a03eaece18e8343102f4a755
  2 files changed, 12 insertions(+), 3 deletions(-)
 
 diff --git a/res/values/projekt_colors.xml b/res/values/projekt_colors.xml
-index bb6099b..e1977f9 100644
+index 2bee210dfd..27efb1d1a7 100644
 --- a/res/values/projekt_colors.xml
 +++ b/res/values/projekt_colors.xml
 @@ -39,4 +39,9 @@
@@ -24,7 +24,7 @@ index bb6099b..e1977f9 100644
 +    <color name="linear_color_bar_right">#ffced7db</color>
  </resources>
 diff --git a/src/com/android/settings/applications/LinearColorBar.java b/src/com/android/settings/applications/LinearColorBar.java
-index b637671..b0b8b82 100644
+index b637671f73..b0b8b82e8c 100644
 --- a/src/com/android/settings/applications/LinearColorBar.java
 +++ b/src/com/android/settings/applications/LinearColorBar.java
 @@ -15,6 +15,7 @@ import android.util.DisplayMetrics;
@@ -64,5 +64,5 @@ index b637671..b0b8b82 100644
 \ No newline at end of file
 +}
 -- 
-2.9.3
+2.11.1
 
index 890d569dbd18deb143ec5ae794cd962063f6bfd3..b720f7ecd908d154736b99b6660c2a739bb0b93b 100644 (file)
@@ -1,4 +1,4 @@
-From c723ba7b2530caa587a841398059573c93d758ac Mon Sep 17 00:00:00 2001
+From e356e3c75fda6aa44cf18083ef89c4a4d17e815c Mon Sep 17 00:00:00 2001
 From: George G <kreach3r@users.noreply.github.com>
 Date: Mon, 4 Jul 2016 12:07:11 +0300
 Subject: [PATCH 07/20] OMS7-N: Apps: show/hide Substratum overlays [2/2]
@@ -18,7 +18,7 @@ Change-Id: I1cd4d4d3acd767a87fe402c325a872a4c04e0438
  create mode 100644 res/values/projekt_strings.xml
 
 diff --git a/res/menu/manage_apps.xml b/res/menu/manage_apps.xml
-index 02ee2bb..67f09e5 100644
+index 02ee2bbefd..67f09e5fc8 100644
 --- a/res/menu/manage_apps.xml
 +++ b/res/menu/manage_apps.xml
 @@ -30,6 +30,14 @@
@@ -38,12 +38,12 @@ index 02ee2bb..67f09e5 100644
          android:showAsAction="never" />
 diff --git a/res/values/projekt_strings.xml b/res/values/projekt_strings.xml
 new file mode 100644
-index 0000000..177e78c
+index 0000000000..ed7cab6c7a
 --- /dev/null
 +++ b/res/values/projekt_strings.xml
 @@ -0,0 +1,23 @@
 +<?xml version="1.0" encoding="utf-8"?>
-+<!-- Copyright (c) 2016 Project Substratum
++<!-- Copyright (c) 2016-2017 Projekt Substratum
 +
 +     Licensed under the Apache License, Version 2.0 (the "License");
 +     you may not use this file except in compliance with the License.
@@ -66,7 +66,7 @@ index 0000000..177e78c
 +
 +</resources>
 diff --git a/src/com/android/settings/applications/ManageApplications.java b/src/com/android/settings/applications/ManageApplications.java
-index 8b1dd27..070754a 100644
+index 8b1dd27ef1..070754addb 100644
 --- a/src/com/android/settings/applications/ManageApplications.java
 +++ b/src/com/android/settings/applications/ManageApplications.java
 @@ -107,6 +107,7 @@ public class ManageApplications extends InstrumentedFragment
@@ -155,5 +155,5 @@ index 8b1dd27..070754a 100644
              switch (mLastSortMode) {
                  case R.id.sort_order_size:
 -- 
-2.9.3
+2.11.1
 
index d7cbc2bdf12093e09aaf88d6e54008b5ee616ed2..982aa239a788b1a9ea6fbdfc104b8bd4c3817833 100644 (file)
@@ -1,4 +1,4 @@
-From c960d1be404e87787c4a26e01679af5ff8d89670 Mon Sep 17 00:00:00 2001
+From 76f3432534432343b2562ec825b5e13ef03c2a1b Mon Sep 17 00:00:00 2001
 From: Kuba Schenk <abukcz@gmail.com>
 Date: Thu, 1 Dec 2016 22:00:31 +0100
 Subject: [PATCH 08/20] OMS7-N: Apps: show/hide Substratum icon overlays [2/2]
@@ -10,7 +10,6 @@ So we follow the current trend set by Android with
 "show system" and make it "show icon overlays" on default.
 
 Change-Id: Ib6dd011f821f21bee6da1979615f2eb4658c9f52
-(cherry picked from commit a01b70568db202255fbf7f62d87c3e89e91f933d)
 ---
  res/menu/manage_apps.xml                           |  8 ++++++
  res/values/projekt_strings.xml                     |  5 ++++
@@ -18,7 +17,7 @@ Change-Id: Ib6dd011f821f21bee6da1979615f2eb4658c9f52
  3 files changed, 37 insertions(+), 9 deletions(-)
 
 diff --git a/res/menu/manage_apps.xml b/res/menu/manage_apps.xml
-index 67f09e5..267cff8 100644
+index 67f09e5fc8..267cff8b41 100644
 --- a/res/menu/manage_apps.xml
 +++ b/res/menu/manage_apps.xml
 @@ -38,6 +38,14 @@
@@ -37,7 +36,7 @@ index 67f09e5..267cff8 100644
          android:title="@string/sort_order_alpha"
          android:showAsAction="never" />
 diff --git a/res/values/projekt_strings.xml b/res/values/projekt_strings.xml
-index 177e78c..4c45544 100644
+index ed7cab6c7a..004e268b9c 100644
 --- a/res/values/projekt_strings.xml
 +++ b/res/values/projekt_strings.xml
 @@ -20,4 +20,9 @@
@@ -51,7 +50,7 @@ index 177e78c..4c45544 100644
 +
  </resources>
 diff --git a/src/com/android/settings/applications/ManageApplications.java b/src/com/android/settings/applications/ManageApplications.java
-index 070754a..5d3b353 100644
+index 070754addb..5d3b353766 100644
 --- a/src/com/android/settings/applications/ManageApplications.java
 +++ b/src/com/android/settings/applications/ManageApplications.java
 @@ -108,6 +108,7 @@ public class ManageApplications extends InstrumentedFragment
@@ -147,5 +146,5 @@ index 070754a..5d3b353 100644
              switch (mLastSortMode) {
                  case R.id.sort_order_size:
 -- 
-2.9.3
+2.11.1
 
index 79f0aa77e248df52b53f153b837baaa642031319..089c33a6ead268f7650a3db7d48d2a72a76ea9d1 100644 (file)
@@ -1,4 +1,4 @@
-From 543cd64fb4c7bb0fd4970d81b66b55fc64dc76d9 Mon Sep 17 00:00:00 2001
+From 10bcddc43282009cd6d3f2c007fcd65fb0176c9c Mon Sep 17 00:00:00 2001
 From: Ivan Iskandar <iiiiskandar14@gmail.com>
 Date: Fri, 9 Dec 2016 02:19:20 +0100
 Subject: [PATCH 09/20] Exclude overlays from the app counter
@@ -9,14 +9,13 @@ in manage app summary.
 idea from @KreAch3R
 
 Change-Id: I8cd591dc89eb87057e8c2ae3b2cca2c76c34534b
-(cherry picked from commit 990eeb53387bbd52e76ce7e7b45c171d1e01e7a1)
 ---
  src/com/android/settings/applications/AppCounter.java         | 1 +
  src/com/android/settings/applications/ManageApplications.java | 6 ++++++
  2 files changed, 7 insertions(+)
 
 diff --git a/src/com/android/settings/applications/AppCounter.java b/src/com/android/settings/applications/AppCounter.java
-index fb8d580..852358d 100644
+index fb8d5809e7..852358dca3 100644
 --- a/src/com/android/settings/applications/AppCounter.java
 +++ b/src/com/android/settings/applications/AppCounter.java
 @@ -47,6 +47,7 @@ public abstract class AppCounter extends AsyncTask<Void, Void, Integer> {
@@ -28,7 +27,7 @@ index fb8d580..852358d 100644
                                  user.id);
                  for (ApplicationInfo info : list.getList()) {
 diff --git a/src/com/android/settings/applications/ManageApplications.java b/src/com/android/settings/applications/ManageApplications.java
-index 5d3b353..ed61781 100644
+index 5d3b353766..ed617814b3 100644
 --- a/src/com/android/settings/applications/ManageApplications.java
 +++ b/src/com/android/settings/applications/ManageApplications.java
 @@ -1297,6 +1297,12 @@ public class ManageApplications extends InstrumentedFragment
@@ -45,5 +44,5 @@ index 5d3b353..ed61781 100644
                          }
                          Intent launchIntent = new Intent(Intent.ACTION_MAIN, null)
 -- 
-2.9.3
+2.11.1
 
index 679fde15705141a33cecf005dff50d79ee93a386..33046bc6807750e384f008ae724769214e0302d0 100644 (file)
@@ -1,4 +1,4 @@
-From 819192d6d43d28d71468535ffe67f22b4c6e1b12 Mon Sep 17 00:00:00 2001
+From 4776c9b9c278880d70581ad77c1f116eb76f459d Mon Sep 17 00:00:00 2001
 From: Ivan Iskandar <iiiiskandar14@gmail.com>
 Date: Wed, 14 Dec 2016 14:58:54 +0100
 Subject: [PATCH 10/20] Hide the "show/hide overlays" when no overlay installed
@@ -9,7 +9,7 @@ Change-Id: I54088d27c9492e0992992de59bf340fe2465260a
  1 file changed, 34 insertions(+), 4 deletions(-)
 
 diff --git a/src/com/android/settings/applications/ManageApplications.java b/src/com/android/settings/applications/ManageApplications.java
-index ed61781..c3bc4d4 100644
+index ed617814b3..c3bc4d4a94 100644
 --- a/src/com/android/settings/applications/ManageApplications.java
 +++ b/src/com/android/settings/applications/ManageApplications.java
 @@ -195,6 +195,10 @@ public class ManageApplications extends InstrumentedFragment
@@ -82,5 +82,5 @@ index ed61781..c3bc4d4 100644
  
          private final ManageApplications mManageApplications;
 -- 
-2.9.3
+2.11.1
 
index a633ed4289732c3ae2b4a57541472774079c8f6a..7d3ed0f3010481d99abc4657c6b90f4b5f63fb31 100644 (file)
@@ -1,4 +1,4 @@
-From 8c69f2089767bb0a770f06658955d8e2966d4c85 Mon Sep 17 00:00:00 2001
+From 6345ed2d8d210e74ed139aabc1c7b05d76b040eb Mon Sep 17 00:00:00 2001
 From: Clark Scheff <clark@scheffsblend.com>
 Date: Fri, 23 Dec 2016 09:52:57 -0500
 Subject: [PATCH 11/20] Expose color for external settings icons
@@ -24,7 +24,7 @@ Change-Id: Ifb4a99a315271cdcf978a796e3dea0eaef8d7750
  2 files changed, 12 insertions(+), 6 deletions(-)
 
 diff --git a/res/values/projekt_colors.xml b/res/values/projekt_colors.xml
-index e1977f9..4ecd1b2 100644
+index 27efb1d1a7..a58aa40f6b 100644
 --- a/res/values/projekt_colors.xml
 +++ b/res/values/projekt_colors.xml
 @@ -39,9 +39,11 @@
@@ -41,7 +41,7 @@ index e1977f9..4ecd1b2 100644
 +    <color name="external_tile_icon_tint_color">?android:attr/colorAccent</color>
  </resources>
 diff --git a/src/com/android/settings/dashboard/DashboardAdapter.java b/src/com/android/settings/dashboard/DashboardAdapter.java
-index 6b2e145..c29da43 100755
+index 6b2e145dc3..c29da4308e 100755
 --- a/src/com/android/settings/dashboard/DashboardAdapter.java
 +++ b/src/com/android/settings/dashboard/DashboardAdapter.java
 @@ -114,10 +114,10 @@ public class DashboardAdapter extends RecyclerView.Adapter<DashboardAdapter.Dash
@@ -73,5 +73,5 @@ index 6b2e145..c29da43 100755
              }
          }
 -- 
-2.9.3
+2.11.1
 
index 22fa8339b507f0ec25effe787e0149f7f77689f7..987601703e120615be35360fa5678d418cd6a23d 100644 (file)
@@ -1,4 +1,4 @@
-From 04b30d6b758e7bbdb2067f6a0b7698bfa11de219 Mon Sep 17 00:00:00 2001
+From c5d0122299fa33dd5c04551a202e04c971c5dd70 Mon Sep 17 00:00:00 2001
 From: Ivan Iskandar <iiiiskandar14@gmail.com>
 Date: Sun, 8 Jan 2017 00:18:47 +0100
 Subject: [PATCH 12/20] Expose dashboard category padding bottom
@@ -6,12 +6,12 @@ Subject: [PATCH 12/20] Expose dashboard category padding bottom
 Change-Id: I5a0d3266bbe96dbe6a136f78ed84cb1ee0a6a19b
 ---
  res/layout/dashboard_category.xml |  2 +-
- res/values/projekt_dimens.xml     | 16 ++++++++++++++++
- 2 files changed, 17 insertions(+), 1 deletion(-)
+ res/values/projekt_dimens.xml     | 20 ++++++++++++++++++++
+ 2 files changed, 21 insertions(+), 1 deletion(-)
  create mode 100644 res/values/projekt_dimens.xml
 
 diff --git a/res/layout/dashboard_category.xml b/res/layout/dashboard_category.xml
-index 7836644..86dac35 100644
+index 7836644806..86dac35d47 100644
 --- a/res/layout/dashboard_category.xml
 +++ b/res/layout/dashboard_category.xml
 @@ -19,7 +19,7 @@
@@ -25,26 +25,30 @@ index 7836644..86dac35 100644
      <TextView android:id="@android:id/title"
 diff --git a/res/values/projekt_dimens.xml b/res/values/projekt_dimens.xml
 new file mode 100644
-index 0000000..a5aae4e
+index 0000000000..960c4943b6
 --- /dev/null
 +++ b/res/values/projekt_dimens.xml
-@@ -0,0 +1,16 @@
+@@ -0,0 +1,20 @@
 +<?xml version="1.0" encoding="utf-8"?>
 +<!--
-+    Copyright (c) 2017 Projekt Substratum
-+    Licensed under the Apache License, Version 2.0 (the "License");
-+    you may not use this file except in compliance with the License.
-+    You may obtain a copy of the License at
-+        http://www.apache.org/licenses/LICENSE-2.0
-+    Unless required by applicable law or agreed to in writing, software
-+    distributed under the License is distributed on an "AS IS" BASIS,
-+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+    See the License for the specific language governing permissions and
-+    limitations under the License.
++     Copyright (c) 2017 Projekt Substratum
++
++     Licensed under the Apache License, Version 2.0 (the "License");
++     you may not use this file except in compliance with the License.
++     You may obtain a copy of the License at
++
++         http://www.apache.org/licenses/LICENSE-2.0
++
++     Unless required by applicable law or agreed to in writing, software
++     distributed under the License is distributed on an "AS IS" BASIS,
++     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
++     See the License for the specific language governing permissions and
++     limitations under the License.
 +-->
++
 +<resources>
 +    <dimen name="dashboard_category_padding_bottom">8dip</dimen>
 +</resources>
 -- 
-2.9.3
+2.11.1
 
index a0d5d17030a6d9451b9aa862158dfc0deffbb119..21457680a887eb77abf8634b3a3fe79fc2a88b37 100644 (file)
@@ -1,4 +1,4 @@
-From a9f6de659abaaf005b4befb799e289d3a960c77a Mon Sep 17 00:00:00 2001
+From 36175c23dcd46cef01cf7c5511a1da5d4a06da7a Mon Sep 17 00:00:00 2001
 From: Ivan Iskandar <iiiiskandar14@gmail.com>
 Date: Sun, 8 Jan 2017 01:22:47 +0100
 Subject: [PATCH 13/20] Expose switchbar background color
@@ -11,7 +11,7 @@ Change-Id: Idc8b09c921bb57c9464d6ea956cfdd9b2b95e6a8
  3 files changed, 14 insertions(+), 3 deletions(-)
 
 diff --git a/res/values/projekt_colors.xml b/res/values/projekt_colors.xml
-index 4ecd1b2..f37cc54 100644
+index a58aa40f6b..09d691e98c 100644
 --- a/res/values/projekt_colors.xml
 +++ b/res/values/projekt_colors.xml
 @@ -46,4 +46,6 @@
@@ -22,7 +22,7 @@ index 4ecd1b2..f37cc54 100644
 +    <color name="switchbar_background_color">?android:attr/colorSecondary</color>
  </resources>
 diff --git a/res/values/themes.xml b/res/values/themes.xml
-index ffe802e..acabe21 100644
+index ffe802e2f2..acabe2195f 100644
 --- a/res/values/themes.xml
 +++ b/res/values/themes.xml
 @@ -196,13 +196,13 @@
@@ -42,7 +42,7 @@ index ffe802e..acabe21 100644
  
      <style name="Theme.DialogWhenLarge" parent="@*android:style/Theme.DeviceDefault.Settings.DialogWhenLarge">
 diff --git a/src/com/android/settings/widget/SwitchBar.java b/src/com/android/settings/widget/SwitchBar.java
-index 240c062..ce73a39 100644
+index 240c06296b..ce73a397f0 100644
 --- a/src/com/android/settings/widget/SwitchBar.java
 +++ b/src/com/android/settings/widget/SwitchBar.java
 @@ -24,6 +24,7 @@ import android.text.SpannableStringBuilder;
@@ -73,5 +73,5 @@ index 240c062..ce73a39 100644
          mTextView.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
          mLabel = getResources().getString(R.string.switch_off_text);
 -- 
-2.9.3
+2.11.1
 
index 494586f31ecd7eb565563641c63151bf26a1ad47..abade7cb4b32f3fd130437518cddc98b802458bc 100644 (file)
@@ -1,4 +1,4 @@
-From f5699ec6bd810df751997db9f51732f702f11f28 Mon Sep 17 00:00:00 2001
+From e6633410a07faa16fd054fa3bc8b7df69c32d8f3 Mon Sep 17 00:00:00 2001
 From: SpiritCroc <spiritcroc@gmail.com>
 Date: Sun, 22 Jan 2017 20:51:47 +0100
 Subject: [PATCH 14/20] Settings: Expose bluetooth pin confirm dialog text
@@ -11,7 +11,7 @@ Change-Id: I1e1eb2da23f2470a82574da7ef326d56f770eb95
  2 files changed, 8 insertions(+), 3 deletions(-)
 
 diff --git a/res/layout/bluetooth_pin_confirm.xml b/res/layout/bluetooth_pin_confirm.xml
-index ebdf65d..6609a1b 100644
+index ebdf65de78..6609a1b70f 100644
 --- a/res/layout/bluetooth_pin_confirm.xml
 +++ b/res/layout/bluetooth_pin_confirm.xml
 @@ -40,7 +40,7 @@
@@ -42,7 +42,7 @@ index ebdf65d..6609a1b 100644
      </LinearLayout>
  
 diff --git a/res/values/projekt_colors.xml b/res/values/projekt_colors.xml
-index f37cc54..e0d3ab1 100644
+index 09d691e98c..ac786ac2cc 100644
 --- a/res/values/projekt_colors.xml
 +++ b/res/values/projekt_colors.xml
 @@ -48,4 +48,9 @@
@@ -56,5 +56,5 @@ index f37cc54..e0d3ab1 100644
 +    <color name="bluetooth_phonebook_sharing_message_confirm_pin">@*android:color/secondary_text_material_light</color>
  </resources>
 -- 
-2.9.3
+2.11.1
 
index 30715567e3173bef829226ba356d184b8a2274d2..f28302191054da51a729a939a76ed1fffb384d3f 100644 (file)
@@ -1,4 +1,4 @@
-From 614e827e959ea39c36d8db6e004353ead93732d3 Mon Sep 17 00:00:00 2001
+From 5823708cb8f539ff271eb7ef4c263d4ad642b927 Mon Sep 17 00:00:00 2001
 From: Ivan Iskandar <iiiiskandar14@gmail.com>
 Date: Sat, 28 Jan 2017 13:40:55 +0100
 Subject: [PATCH 15/20] Set external settings icon tint mode to SRC_ATOP
@@ -17,7 +17,7 @@ Change-Id: I65b710e2abefd1052b3af154a98247de9b4fe98d
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/src/com/android/settings/dashboard/DashboardAdapter.java b/src/com/android/settings/dashboard/DashboardAdapter.java
-index c29da43..8259d39 100755
+index c29da4308e..8259d39ee6 100755
 --- a/src/com/android/settings/dashboard/DashboardAdapter.java
 +++ b/src/com/android/settings/dashboard/DashboardAdapter.java
 @@ -19,6 +19,7 @@ import android.content.Context;
@@ -38,5 +38,5 @@ index c29da43..8259d39 100755
              }
          }
 -- 
-2.9.3
+2.11.1
 
index 79f020e238e48b7a904d869cea59a61a9a731ae5..225bbad7af154169496003fcc4d7f8ce3c613008 100644 (file)
@@ -1,4 +1,4 @@
-From 0e2f8c35309b07b6d7cbc1f2a42b7ce19f3cc252 Mon Sep 17 00:00:00 2001
+From 315730403ffbf452c119cdd3bfb4a040cdd3525f Mon Sep 17 00:00:00 2001
 From: Clark Scheff <clark@scheffsblend.com>
 Date: Mon, 27 Feb 2017 00:55:37 +0100
 Subject: [PATCH 16/20] Settings: Guard against themes without colorAccent
@@ -17,7 +17,7 @@ Change-Id: I2754a88a50277abb1b685183c0fb2e5b606eb451
  2 files changed, 6 insertions(+), 1 deletion(-)
 
 diff --git a/res/values/projekt_colors.xml b/res/values/projekt_colors.xml
-index e0d3ab1..a619c50 100644
+index ac786ac2cc..d7dc15bd83 100644
 --- a/res/values/projekt_colors.xml
 +++ b/res/values/projekt_colors.xml
 @@ -53,4 +53,7 @@
@@ -29,7 +29,7 @@ index e0d3ab1..a619c50 100644
 +    <color name="switch_accent_color">@*android:color/accent_device_default_light</color>
  </resources>
 diff --git a/src/com/android/settings/applications/AppOpsSummary.java b/src/com/android/settings/applications/AppOpsSummary.java
-index a86be73..cd534cd 100644
+index a86be734eb..cd534cd6ec 100644
 --- a/src/com/android/settings/applications/AppOpsSummary.java
 +++ b/src/com/android/settings/applications/AppOpsSummary.java
 @@ -161,7 +161,9 @@ public class AppOpsSummary extends InstrumentedFragment {
@@ -44,5 +44,5 @@ index a86be73..cd534cd 100644
  
          // We have to do this now because PreferenceFrameLayout looks at it
 -- 
-2.9.3
+2.11.1
 
index e19d4d087d43d196965c188f467b29c9b879244d..70e6a4b3176b02aa05e3ae0d4e15f9586e1fedc7 100644 (file)
@@ -1,4 +1,4 @@
-From 8b31b9fa53cfc4088456aa11a120f3aabac0147b Mon Sep 17 00:00:00 2001
+From 58f335d0837fca1c79d1ccec154521b0300867df Mon Sep 17 00:00:00 2001
 From: Bryan Owens <djbryan3540@gmail.com>
 Date: Mon, 27 Feb 2017 20:02:56 -0600
 Subject: [PATCH 17/20] Settings: Expose styles in the manifest for themes
@@ -12,10 +12,10 @@ Signed-off-by: Bryan Owens <djbryan3540@gmail.com>
  create mode 100644 res/values/projekt_styles.xml
 
 diff --git a/AndroidManifest.xml b/AndroidManifest.xml
-index b8110ff..db3fa0f 100755
+index 82a7fb55d8..3e1772482c 100755
 --- a/AndroidManifest.xml
 +++ b/AndroidManifest.xml
-@@ -214,7 +214,7 @@
+@@ -217,7 +217,7 @@
  
          <activity android:name="AirplaneModeVoiceActivity"
                  android:label="@string/wireless_networks_settings_title"
@@ -24,7 +24,7 @@ index b8110ff..db3fa0f 100755
                  android:exported="true">
              <intent-filter>
                  <action android:name="android.settings.VOICE_CONTROL_AIRPLANE_MODE" />
-@@ -388,7 +388,7 @@
+@@ -391,7 +391,7 @@
                    android:exported="true"
                    android:permission="android.permission.CONNECTIVITY_INTERNAL"
                    android:taskAffinity=""
@@ -33,7 +33,7 @@ index b8110ff..db3fa0f 100755
              <intent-filter>
                  <action android:name="android.net.conn.PROMPT_UNVALIDATED" />
                  <category android:name="android.intent.category.DEFAULT" />
-@@ -596,7 +596,7 @@
+@@ -599,7 +599,7 @@
  
          <activity android:name="DateTimeSettingsSetupWizard"
                    android:label="@string/date_and_time"
@@ -42,7 +42,7 @@ index b8110ff..db3fa0f 100755
                    android:screenOrientation="behind">
              <intent-filter>
                  <action android:name="android.intent.action.MAIN" />
-@@ -765,7 +765,7 @@
+@@ -768,7 +768,7 @@
  
          <activity android:name=".inputmethod.UserDictionaryAddWordActivity"
                    android:label="@string/user_dict_settings_title"
@@ -51,7 +51,7 @@ index b8110ff..db3fa0f 100755
                    android:windowSoftInputMode="stateVisible"
                    android:noHistory="true"
                    android:excludeFromRecents="true">
-@@ -1044,7 +1044,7 @@
+@@ -1047,7 +1047,7 @@
  
          <activity android:name="SettingsLicenseActivity"
                  android:label="@string/settings_license_activity_title"
@@ -60,7 +60,7 @@ index b8110ff..db3fa0f 100755
                  android:configChanges="orientation|screenSize">
              <intent-filter android:priority="1">
                  <action android:name="android.settings.LICENSE" />
-@@ -1163,7 +1163,7 @@
+@@ -1166,7 +1166,7 @@
          <activity android:name=".fuelgauge.RequestIgnoreBatteryOptimizations"
                  android:label="@string/high_power_apps"
                  android:taskAffinity=""
@@ -69,7 +69,7 @@ index b8110ff..db3fa0f 100755
              <intent-filter android:priority="1">
                  <action android:name="android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
                  <category android:name="android.intent.category.DEFAULT" />
-@@ -1281,7 +1281,7 @@
+@@ -1284,7 +1284,7 @@
          </activity>
  
          <activity android:name=".notification.ZenModeVoiceActivity"
@@ -78,7 +78,7 @@ index b8110ff..db3fa0f 100755
                  android:label="@string/zen_mode_settings_title">
              <intent-filter>
                  <action android:name="android.settings.VOICE_CONTROL_DO_NOT_DISTURB_MODE" />
-@@ -2078,7 +2078,7 @@
+@@ -2081,7 +2081,7 @@
          </activity-alias>
  
          <activity android:name=".AppPicker" android:label="@string/select_application"
@@ -87,7 +87,7 @@ index b8110ff..db3fa0f 100755
  
          <!-- Keep compatibility with old shortcuts. -->
          <activity-alias android:name="UsbSettings"
-@@ -2095,7 +2095,7 @@
+@@ -2098,7 +2098,7 @@
                    android:label="@string/bluetooth_pairing_request"
                    android:excludeFromRecents="true"
                    android:windowSoftInputMode="stateVisible|adjustResize"
@@ -96,7 +96,7 @@ index b8110ff..db3fa0f 100755
              <intent-filter android:priority="1">
                  <action android:name="android.bluetooth.device.action.PAIRING_REQUEST" />
                  <category android:name="android.intent.category.DEFAULT" />
-@@ -2128,7 +2128,7 @@
+@@ -2131,7 +2131,7 @@
                    android:label="@string/bluetooth_permission_request"
                    android:excludeFromRecents="true"
                    android:permission="android.permission.BLUETOOTH"
@@ -105,7 +105,7 @@ index b8110ff..db3fa0f 100755
              <intent-filter android:priority="1">
                  <action android:name="android.bluetooth.adapter.action.REQUEST_DISCOVERABLE" />
                  <action android:name="android.bluetooth.adapter.action.REQUEST_ENABLE" />
-@@ -2149,14 +2149,14 @@
+@@ -2152,14 +2152,14 @@
                    android:excludeFromRecents="true"
                    android:exported="true"
                    android:permission="android.permission.MANAGE_USB"
@@ -122,7 +122,7 @@ index b8110ff..db3fa0f 100755
              <intent-filter>
                  <action android:name="android.settings.SHOW_REMOTE_BUGREPORT_DIALOG" />
                  <category android:name="android.intent.category.DEFAULT" />
-@@ -2167,7 +2167,7 @@
+@@ -2170,7 +2170,7 @@
                    android:label="@string/bluetooth_pairing_request"
                    android:excludeFromRecents="true"
                    android:permission="android.permission.BLUETOOTH"
@@ -131,7 +131,7 @@ index b8110ff..db3fa0f 100755
          </activity>
  
          <receiver android:name=".bluetooth.BluetoothPairingRequest">
-@@ -2190,7 +2190,7 @@
+@@ -2193,7 +2193,7 @@
                    android:label="@string/bluetooth_connection_permission_request"
                    android:excludeFromRecents="true"
                    android:permission="android.permission.BLUETOOTH_ADMIN"
@@ -140,7 +140,7 @@ index b8110ff..db3fa0f 100755
              <intent-filter android:priority="1">
                  <action android:name="android.bluetooth.device.action.CONNECTION_ACCESS_REQUEST" />
                  <action android:name="android.bluetooth.device.action.CONNECTION_ACCESS_CANCEL" />
-@@ -2200,7 +2200,7 @@
+@@ -2203,7 +2203,7 @@
  
          <activity android:name="ActivityPicker"
                  android:label="@string/activity_picker_label"
@@ -149,7 +149,7 @@ index b8110ff..db3fa0f 100755
                  android:finishOnCloseSystemDialogs="true">
              <intent-filter android:priority="1">
                  <action android:name="android.intent.action.PICK_ACTIVITY" />
-@@ -2263,7 +2263,7 @@
+@@ -2266,7 +2266,7 @@
  
          <!-- TODO: Is this needed? -->
          <activity android:name="BandMode"
@@ -158,7 +158,7 @@ index b8110ff..db3fa0f 100755
                    android:process="com.android.phone">
              <intent-filter>
                  <action android:name="android.intent.action.MAIN" />
-@@ -2291,7 +2291,7 @@
+@@ -2294,7 +2294,7 @@
          <!-- Standard picker for widgets -->
          <activity android:name="AppWidgetPickActivity"
                  android:label="@string/widget_picker_title"
@@ -167,7 +167,7 @@ index b8110ff..db3fa0f 100755
                  android:finishOnCloseSystemDialogs="true">
              <intent-filter android:priority="1">
                  <action android:name="android.appwidget.action.APPWIDGET_PICK" />
-@@ -2300,7 +2300,7 @@
+@@ -2303,7 +2303,7 @@
          </activity>
  
          <activity android:name="AllowBindAppWidgetActivity"
@@ -176,7 +176,7 @@ index b8110ff..db3fa0f 100755
                  android:finishOnCloseSystemDialogs="true"
                  android:excludeFromRecents="true">
              <intent-filter android:priority="1">
-@@ -2370,7 +2370,7 @@
+@@ -2373,7 +2373,7 @@
  
          <activity android:name=".fuelgauge.BatterySaverModeVoiceActivity"
                  android:label="@string/power_usage_summary_title"
@@ -185,7 +185,7 @@ index b8110ff..db3fa0f 100755
                  android:exported="true">
              <intent-filter>
                  <action android:name="android.settings.VOICE_CONTROL_BATTERY_SAVER_MODE" />
-@@ -2606,7 +2606,7 @@
+@@ -2609,7 +2609,7 @@
          <activity android:name=".nfc.PaymentDefaultDialog"
                    android:label="@string/nfc_payment_set_default_label"
                    android:excludeFromRecents="true"
@@ -194,7 +194,7 @@ index b8110ff..db3fa0f 100755
              <intent-filter android:priority="1">
                  <action android:name="android.nfc.cardemulation.action.ACTION_CHANGE_DEFAULT" />
                  <category android:name="android.intent.category.DEFAULT" />
-@@ -2624,7 +2624,7 @@
+@@ -2627,7 +2627,7 @@
          <activity android:name=".SmsDefaultDialog"
                    android:label="@string/sms_application_title"
                    android:excludeFromRecents="true"
@@ -203,7 +203,7 @@ index b8110ff..db3fa0f 100755
              <intent-filter android:priority="1">
                  <action android:name="android.provider.Telephony.ACTION_CHANGE_DEFAULT" />
                  <category android:name="android.intent.category.DEFAULT" />
-@@ -2634,7 +2634,7 @@
+@@ -2637,7 +2637,7 @@
          <activity android:name=".ActiveNetworkScorerDialog"
                    android:label="@string/wifi_assistant_title"
                    android:excludeFromRecents="true"
@@ -212,7 +212,7 @@ index b8110ff..db3fa0f 100755
              <intent-filter android:priority="1">
                  <action android:name="android.net.scoring.CHANGE_ACTIVE" />
                  <category android:name="android.intent.category.DEFAULT" />
-@@ -2896,7 +2896,7 @@
+@@ -2899,7 +2899,7 @@
          </activity>
  
          <activity android:name=".sim.SimPreferenceDialog"
@@ -221,7 +221,7 @@ index b8110ff..db3fa0f 100755
              android:excludeFromRecents="true">
          </activity>
  
-@@ -2914,7 +2914,7 @@
+@@ -2917,7 +2917,7 @@
          </activity>
  
          <activity android:name=".sim.SimDialogActivity"
@@ -230,7 +230,7 @@ index b8110ff..db3fa0f 100755
                  android:label="@string/sim_settings_title"
                  android:excludeFromRecents="true">
              <intent-filter>
-@@ -3040,7 +3040,7 @@
+@@ -3043,7 +3043,7 @@
          <activity android:name=".WebViewImplementation"
                    android:exported="true"
                    android:excludeFromRecents="true"
@@ -241,13 +241,13 @@ index b8110ff..db3fa0f 100755
                  <category android:name="android.intent.category.DEFAULT" />
 diff --git a/res/values/projekt_styles.xml b/res/values/projekt_styles.xml
 new file mode 100644
-index 0000000..6f0ce96
+index 0000000000..54fc2b61fd
 --- /dev/null
 +++ b/res/values/projekt_styles.xml
 @@ -0,0 +1,30 @@
 +<?xml version="1.0" encoding="utf-8"?>
 +<!--
-+     Copyright (C) 2017 Project Substratum
++     Copyright (C) 2017 Projekt Substratum
 +
 +     Licensed under the Apache License, Version 2.0 (the "License");
 +     you may not use this file except in compliance with the License.
@@ -276,5 +276,5 @@ index 0000000..6f0ce96
 +    <style name="Theme.VoiceActivity" parent="@*android:style/Theme.DeviceDefault.Light.Voice" />
 +</resources>
 -- 
-2.9.3
+2.11.1
 
index cb9261c07440a0749f7ec377533c7924817d020b..142e6681d6ddf73a040c71b790d39554c44c110a 100644 (file)
@@ -1,4 +1,4 @@
-From 2feffe9fb57f627bfac953bc83e0ce29c93cad42 Mon Sep 17 00:00:00 2001
+From 8bb660b05e3b2e451d90e0ffff1c7ad17fee8ac5 Mon Sep 17 00:00:00 2001
 From: Randall Rushing <randall.rushing@gmail.com>
 Date: Tue, 5 Apr 2016 11:24:26 -0500
 Subject: [PATCH 18/20] Settings: Expose and add tint mode to custom icons
@@ -16,7 +16,7 @@ Signed-off-by: Bryan Owens <djbryan3540@gmail.com>
  2 files changed, 7 insertions(+), 5 deletions(-)
 
 diff --git a/res/values/projekt_colors.xml b/res/values/projekt_colors.xml
-index a619c50..a93ca3c 100644
+index d7dc15bd83..f5c092198e 100644
 --- a/res/values/projekt_colors.xml
 +++ b/res/values/projekt_colors.xml
 @@ -43,17 +43,16 @@
@@ -40,7 +40,7 @@ index a619c50..a93ca3c 100644
 +    <color name="power_usage_ab_icon_tint">@android:color/white</color>
  </resources>
 diff --git a/src/com/android/settings/fuelgauge/PowerUsageDetail.java b/src/com/android/settings/fuelgauge/PowerUsageDetail.java
-index f091f66..eae0ca1 100644
+index f091f6649e..eae0ca14e9 100644
 --- a/src/com/android/settings/fuelgauge/PowerUsageDetail.java
 +++ b/src/com/android/settings/fuelgauge/PowerUsageDetail.java
 @@ -29,6 +29,7 @@ import android.content.pm.PackageInfo;
@@ -69,5 +69,5 @@ index f091f66..eae0ca1 100644
  
      public void onClick(View v) {
 -- 
-2.9.3
+2.11.1
 
index 5ae31dbe2d173608d553e85214a192790bfaf40a..36bf9c314b6819ce2c7de4d43242bd97e8020593 100644 (file)
@@ -1,4 +1,4 @@
-From 1a31913520b5d0d0282658e6d84bcd13fd4bfb27 Mon Sep 17 00:00:00 2001
+From 0d4563664ba23fe8c41d41b4819457d2f2dbc7a1 Mon Sep 17 00:00:00 2001
 From: Bryan Owens <djbryan3540@gmail.com>
 Date: Mon, 27 Feb 2017 22:24:09 -0600
 Subject: [PATCH 19/20] Settings: Expose "ALL" hardcoded and @android colors
@@ -27,7 +27,7 @@ Signed-off-by: Bryan Owens <djbryan3540@gmail.com>
  18 files changed, 53 insertions(+), 31 deletions(-)
 
 diff --git a/res/layout-sw600dp/nfc_payment_how_it_works.xml b/res/layout-sw600dp/nfc_payment_how_it_works.xml
-index 3bee160..5d71e1a 100644
+index 3bee160406..5d71e1a25e 100644
 --- a/res/layout-sw600dp/nfc_payment_how_it_works.xml
 +++ b/res/layout-sw600dp/nfc_payment_how_it_works.xml
 @@ -3,7 +3,7 @@
@@ -84,7 +84,7 @@ index 3bee160..5d71e1a 100644
          </RelativeLayout>
      </RelativeLayout>
 diff --git a/res/layout/app_header.xml b/res/layout/app_header.xml
-index 2d8a099..bbce943 100644
+index 2d8a099be7..bbce9438c0 100644
 --- a/res/layout/app_header.xml
 +++ b/res/layout/app_header.xml
 @@ -36,7 +36,7 @@
@@ -97,7 +97,7 @@ index 2d8a099..bbce943 100644
  
      <ImageView
 diff --git a/res/layout/crypt_keeper_emergency_button.xml b/res/layout/crypt_keeper_emergency_button.xml
-index 0b6f810..cf35315 100644
+index 0b6f810b62..cf353152bf 100644
 --- a/res/layout/crypt_keeper_emergency_button.xml
 +++ b/res/layout/crypt_keeper_emergency_button.xml
 @@ -33,7 +33,7 @@
@@ -110,7 +110,7 @@ index 0b6f810..cf35315 100644
  
  </LinearLayout>
 diff --git a/res/layout/crypt_keeper_status.xml b/res/layout/crypt_keeper_status.xml
-index bddff1a..fd9f82e 100644
+index bddff1ad57..fd9f82e4fd 100644
 --- a/res/layout/crypt_keeper_status.xml
 +++ b/res/layout/crypt_keeper_status.xml
 @@ -35,7 +35,7 @@
@@ -132,7 +132,7 @@ index bddff1a..fd9f82e 100644
  
  </LinearLayout>
 diff --git a/res/layout/data_usage_chart.xml b/res/layout/data_usage_chart.xml
-index c87a006..324d09f 100644
+index c87a006a94..324d09fa5a 100644
 --- a/res/layout/data_usage_chart.xml
 +++ b/res/layout/data_usage_chart.xml
 @@ -44,7 +44,7 @@
@@ -154,7 +154,7 @@ index c87a006..324d09f 100644
  
  </com.android.settings.widget.ChartDataUsageView>
 diff --git a/res/layout/filter_spinner_item.xml b/res/layout/filter_spinner_item.xml
-index e83dd80..6b7bdb8 100644
+index e83dd8071e..6b7bdb85f7 100644
 --- a/res/layout/filter_spinner_item.xml
 +++ b/res/layout/filter_spinner_item.xml
 @@ -23,5 +23,5 @@
@@ -165,7 +165,7 @@ index e83dd80..6b7bdb8 100644
 +    android:textColor="@color/text_color_white"
      android:textAlignment="inherit"/>
 diff --git a/res/layout/master_clear_disallowed_screen.xml b/res/layout/master_clear_disallowed_screen.xml
-index 80326ca..ce14f46 100644
+index 80326caeaf..ce14f46216 100644
 --- a/res/layout/master_clear_disallowed_screen.xml
 +++ b/res/layout/master_clear_disallowed_screen.xml
 @@ -26,8 +26,8 @@
@@ -180,7 +180,7 @@ index 80326ca..ce14f46 100644
  
          <TextView android:id="@android:id/empty"
 diff --git a/res/layout/multi_sim_dialog.xml b/res/layout/multi_sim_dialog.xml
-index d0e7df8..02643ac 100644
+index d0e7df8758..02643accd2 100644
 --- a/res/layout/multi_sim_dialog.xml
 +++ b/res/layout/multi_sim_dialog.xml
 @@ -44,7 +44,7 @@
@@ -211,7 +211,7 @@ index d0e7df8..02643ac 100644
  
          </LinearLayout>
 diff --git a/res/layout/network_reset_disallowed_screen.xml b/res/layout/network_reset_disallowed_screen.xml
-index 04f6fc2..e72708b 100644
+index 04f6fc2b4b..e72708bf27 100644
 --- a/res/layout/network_reset_disallowed_screen.xml
 +++ b/res/layout/network_reset_disallowed_screen.xml
 @@ -26,8 +26,8 @@
@@ -226,7 +226,7 @@ index 04f6fc2..e72708b 100644
  
          <TextView android:id="@android:id/empty"
 diff --git a/res/layout/nfc_payment_how_it_works.xml b/res/layout/nfc_payment_how_it_works.xml
-index 565a16b..a870e5b 100644
+index 565a16b7d7..a870e5b265 100644
 --- a/res/layout/nfc_payment_how_it_works.xml
 +++ b/res/layout/nfc_payment_how_it_works.xml
 @@ -3,7 +3,7 @@
@@ -283,7 +283,7 @@ index 565a16b..a870e5b 100644
          </RelativeLayout>
      </RelativeLayout>
 diff --git a/res/layout/permission_settings.xml b/res/layout/permission_settings.xml
-index f08b9d6..2067c02 100644
+index f08b9d64f3..2067c02f14 100644
 --- a/res/layout/permission_settings.xml
 +++ b/res/layout/permission_settings.xml
 @@ -43,7 +43,7 @@
@@ -296,7 +296,7 @@ index f08b9d6..2067c02 100644
                  android:paddingTop="6dip"
                  android:paddingBottom="6dip"
 diff --git a/res/layout/preference_importance_slider.xml b/res/layout/preference_importance_slider.xml
-index 3861807..7e340f9 100644
+index 38618079bb..7e340f952f 100644
 --- a/res/layout/preference_importance_slider.xml
 +++ b/res/layout/preference_importance_slider.xml
 @@ -61,7 +61,7 @@
@@ -309,7 +309,7 @@ index 3861807..7e340f9 100644
      </FrameLayout>
  
 diff --git a/res/layout/settings_color_picker_item.xml b/res/layout/settings_color_picker_item.xml
-index c171950..d8fc8c1 100644
+index c171950d18..d8fc8c1f97 100644
 --- a/res/layout/settings_color_picker_item.xml
 +++ b/res/layout/settings_color_picker_item.xml
 @@ -41,7 +41,7 @@
@@ -323,7 +323,7 @@ index c171950..d8fc8c1 100644
  </LinearLayout>
 \ No newline at end of file
 diff --git a/res/layout/storage_internal_format.xml b/res/layout/storage_internal_format.xml
-index 8aec28f..c90ed28 100644
+index 8aec28f9ab..c90ed285f4 100644
 --- a/res/layout/storage_internal_format.xml
 +++ b/res/layout/storage_internal_format.xml
 @@ -46,7 +46,7 @@
@@ -336,7 +336,7 @@ index 8aec28f..c90ed28 100644
      </FrameLayout>
  
 diff --git a/res/layout/storage_wizard_navigation.xml b/res/layout/storage_wizard_navigation.xml
-index 94f9baf..191d4f2 100644
+index 94f9bafef2..191d4f2208 100644
 --- a/res/layout/storage_wizard_navigation.xml
 +++ b/res/layout/storage_wizard_navigation.xml
 @@ -46,7 +46,7 @@
@@ -349,7 +349,7 @@ index 94f9baf..191d4f2 100644
  
  </LinearLayout>
 diff --git a/res/values/projekt_colors.xml b/res/values/projekt_colors.xml
-index a93ca3c..eb37be3 100644
+index f5c092198e..8d66eac2f6 100644
 --- a/res/values/projekt_colors.xml
 +++ b/res/values/projekt_colors.xml
 @@ -55,4 +55,22 @@
@@ -376,7 +376,7 @@ index a93ca3c..eb37be3 100644
 +    <color name="background_color_white">@android:color/white</color>
  </resources>
 diff --git a/src/com/android/settings/deviceinfo/StorageSettings.java b/src/com/android/settings/deviceinfo/StorageSettings.java
-index 57fd13b..6ab7a85 100755
+index 38be6d7b4f..27780c2405 100755
 --- a/src/com/android/settings/deviceinfo/StorageSettings.java
 +++ b/src/com/android/settings/deviceinfo/StorageSettings.java
 @@ -27,6 +27,7 @@ import android.content.Intent;
@@ -387,7 +387,7 @@ index 57fd13b..6ab7a85 100755
  import android.os.AsyncTask;
  import android.os.Bundle;
  import android.os.UserHandle;
-@@ -204,6 +205,7 @@ public class StorageSettings extends SettingsPreferenceFragment implements Index
+@@ -207,6 +208,7 @@ public class StorageSettings extends SettingsPreferenceFragment implements Index
                  final Drawable icon = context.getDrawable(R.drawable.ic_sim_sd);
                  icon.mutate();
                  icon.setTint(getColorPublic(getResources()));
@@ -396,7 +396,7 @@ index 57fd13b..6ab7a85 100755
                  final Preference pref = new Preference(context);
                  pref.setKey(rec.getFsUuid());
 diff --git a/src/com/android/settings/deviceinfo/StorageVolumePreference.java b/src/com/android/settings/deviceinfo/StorageVolumePreference.java
-index 8a2780a..a6c227c 100644
+index 8a2780a90b..a6c227c2cd 100644
 --- a/src/com/android/settings/deviceinfo/StorageVolumePreference.java
 +++ b/src/com/android/settings/deviceinfo/StorageVolumePreference.java
 @@ -20,6 +20,7 @@ import android.content.Context;
@@ -416,5 +416,5 @@ index 8a2780a..a6c227c 100644
  
          if (volume.getType() == VolumeInfo.TYPE_PUBLIC
 -- 
-2.9.3
+2.11.1
 
index 902d3f5519cde58047292c9e0cfa12afe50a34d2..5e35891c411bfd37f91462e0d7c2487e829afa08 100644 (file)
@@ -1,4 +1,4 @@
-From ee6a0be005d11c0dad4d59d388e04c5dfa6fd9aa Mon Sep 17 00:00:00 2001
+From 8e5290cb3604878f06aad71bf7ef6a45860fe9db Mon Sep 17 00:00:00 2001
 From: George G <kreach3r@users.noreply.github.com>
 Date: Sat, 25 Feb 2017 18:24:06 +0200
 Subject: [PATCH 20/20] Development: Allow all Masquerade calling packages for
@@ -14,7 +14,7 @@ Change-Id: I4d8ca60ead6fe058e7bc2ef8b7613e77457b3f27
  3 files changed, 29 insertions(+)
 
 diff --git a/res/values/projekt_strings.xml b/res/values/projekt_strings.xml
-index 4c45544..0d339e2 100644
+index 004e268b9c..5641da3d35 100644
 --- a/res/values/projekt_strings.xml
 +++ b/res/values/projekt_strings.xml
 @@ -25,4 +25,8 @@
@@ -27,7 +27,7 @@ index 4c45544..0d339e2 100644
 +
  </resources>
 diff --git a/res/xml/development_prefs.xml b/res/xml/development_prefs.xml
-index 1e7ed4a..d654829 100644
+index 1e7ed4a2b9..d654829ca1 100644
 --- a/res/xml/development_prefs.xml
 +++ b/res/xml/development_prefs.xml
 @@ -210,6 +210,11 @@
@@ -43,7 +43,7 @@ index 1e7ed4a..d654829 100644
  
      <PreferenceCategory android:key="debug_networking_category"
 diff --git a/src/com/android/settings/DevelopmentSettings.java b/src/com/android/settings/DevelopmentSettings.java
-index 02e2a75..17f0717 100644
+index 10e0b73447..e2c0a46b44 100644
 --- a/src/com/android/settings/DevelopmentSettings.java
 +++ b/src/com/android/settings/DevelopmentSettings.java
 @@ -235,6 +235,8 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
@@ -106,7 +106,7 @@ index 02e2a75..17f0717 100644
      private void resetDangerousOptions() {
          mDontPokeProperties = true;
          for (int i=0; i< mResetSwitchPrefs.size(); i++) {
-@@ -2256,6 +2274,8 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
+@@ -2255,6 +2273,8 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
              writeUSBAudioOptions();
          } else if (preference == mForceResizable) {
              writeForceResizableOptions();
@@ -116,5 +116,5 @@ index 02e2a75..17f0717 100644
              startInactiveAppsFragment();
          } else if (BACKGROUND_CHECK_KEY.equals(preference.getKey())) {
 -- 
-2.9.3
+2.11.1
 
diff --git a/patches/system/sepolicy/0001-OMS-N-Add-service-overlay-to-service_contexts.patch b/patches/system/sepolicy/0001-OMS-N-Add-service-overlay-to-service_contexts.patch
deleted file mode 100644 (file)
index 5a73714..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-From c3851a5abf045ea3d41f64990fc017a5c25d5f36 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?M=C3=A5rten=20Kongstad?= <marten.kongstad@sonymobile.com>
-Date: Mon, 22 Jun 2015 09:31:25 +0200
-Subject: [PATCH 01/10] OMS-N: Add service 'overlay' to service_contexts
-
-The 'overlay' service is the Overlay Manager Service, which tracks
-packages and their Runtime Resource Overlay overlay packages.
-
-Bug: 31052947
-
-Co-authored-by: Martin Wallgren <martin.wallgren@sonymobile.com>
-Signed-off-by: Zoran Jovanovic <zoran.jovanovic@sonymobile.com>
-
-Change-Id: Ie996707dd02166325271bee49163ac263e560a1d
----
- service.te       | 1 +
- service_contexts | 1 +
- system_server.te | 1 +
- 3 files changed, 3 insertions(+)
-
-diff --git a/service.te b/service.te
-index e7a30f9..6f9ab3f 100644
---- a/service.te
-+++ b/service.te
-@@ -81,6 +81,7 @@ type network_score_service, system_api_service, system_server_service, service_m
- type network_time_update_service, system_server_service, service_manager_type;
- type notification_service, app_api_service, system_server_service, service_manager_type;
- type otadexopt_service, system_server_service, service_manager_type;
-+type overlay_service, app_api_service, system_server_service, service_manager_type;
- type package_service, app_api_service, system_server_service, service_manager_type;
- type permission_service, app_api_service, system_server_service, service_manager_type;
- type persistent_data_block_service, system_api_service, system_server_service, service_manager_type;
-diff --git a/service_contexts b/service_contexts
-index dd7e49f..b7d7473 100644
---- a/service_contexts
-+++ b/service_contexts
-@@ -93,6 +93,7 @@ network_time_update_service               u:object_r:network_time_update_service
- nfc                                       u:object_r:nfc_service:s0
- notification                              u:object_r:notification_service:s0
- otadexopt                                 u:object_r:otadexopt_service:s0
-+overlay                                   u:object_r:overlay_service:s0
- package                                   u:object_r:package_service:s0
- permission                                u:object_r:permission_service:s0
- persistent_data_block                     u:object_r:persistent_data_block_service:s0
-diff --git a/system_server.te b/system_server.te
-index 03a7ef3..3ca8182 100644
---- a/system_server.te
-+++ b/system_server.te
-@@ -441,6 +441,7 @@ allow system_server mediacodec_service:service_manager find;
- allow system_server mediadrmserver_service:service_manager find;
- allow system_server netd_service:service_manager find;
- allow system_server nfc_service:service_manager find;
-+allow system_server overlay_service:service_manager find;
- allow system_server radio_service:service_manager find;
- allow system_server system_server_service:service_manager { add find };
- allow system_server surfaceflinger_service:service_manager find;
--- 
-2.11.1
-
diff --git a/patches/system/sepolicy/0001-OMS7-N-Add-service-overlay-to-service_contexts.patch b/patches/system/sepolicy/0001-OMS7-N-Add-service-overlay-to-service_contexts.patch
new file mode 100644 (file)
index 0000000..6f86da9
--- /dev/null
@@ -0,0 +1,59 @@
+From 68afbfc6637b4eb999991512e39e2753dce216fc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?M=C3=A5rten=20Kongstad?= <marten.kongstad@sonymobile.com>
+Date: Mon, 22 Jun 2015 09:31:25 +0200
+Subject: [PATCH 01/10] OMS7-N: Add service 'overlay' to service_contexts
+
+The 'overlay' service is the Overlay Manager Service, which tracks
+packages and their Runtime Resource Overlay overlay packages.
+
+Bug: 31052947
+
+Co-authored-by: Martin Wallgren <martin.wallgren@sonymobile.com>
+Signed-off-by: Zoran Jovanovic <zoran.jovanovic@sonymobile.com>
+
+Change-Id: Ie996707dd02166325271bee49163ac263e560a1d
+---
+ service.te       | 1 +
+ service_contexts | 1 +
+ system_server.te | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/service.te b/service.te
+index 9a77ce2..a8d16c2 100644
+--- a/service.te
++++ b/service.te
+@@ -81,6 +81,7 @@ type network_score_service, system_api_service, system_server_service, service_m
+ type network_time_update_service, system_server_service, service_manager_type;
+ type notification_service, app_api_service, system_server_service, service_manager_type;
+ type otadexopt_service, system_server_service, service_manager_type;
++type overlay_service, app_api_service, system_server_service, service_manager_type;
+ type package_service, app_api_service, system_server_service, service_manager_type;
+ type permission_service, app_api_service, system_server_service, service_manager_type;
+ type persistent_data_block_service, system_api_service, system_server_service, service_manager_type;
+diff --git a/service_contexts b/service_contexts
+index fffbd4d..19cf907 100644
+--- a/service_contexts
++++ b/service_contexts
+@@ -93,6 +93,7 @@ network_time_update_service               u:object_r:network_time_update_service
+ nfc                                       u:object_r:nfc_service:s0
+ notification                              u:object_r:notification_service:s0
+ otadexopt                                 u:object_r:otadexopt_service:s0
++overlay                                   u:object_r:overlay_service:s0
+ package                                   u:object_r:package_service:s0
+ permission                                u:object_r:permission_service:s0
+ persistent_data_block                     u:object_r:persistent_data_block_service:s0
+diff --git a/system_server.te b/system_server.te
+index 03a7ef3..3ca8182 100644
+--- a/system_server.te
++++ b/system_server.te
+@@ -441,6 +441,7 @@ allow system_server mediacodec_service:service_manager find;
+ allow system_server mediadrmserver_service:service_manager find;
+ allow system_server netd_service:service_manager find;
+ allow system_server nfc_service:service_manager find;
++allow system_server overlay_service:service_manager find;
+ allow system_server radio_service:service_manager find;
+ allow system_server system_server_service:service_manager { add find };
+ allow system_server surfaceflinger_service:service_manager find;
+-- 
+2.11.1
+
index 53965bf13b8b47d749bc9da12750bf0a29fe6c68..023beb494ab8c3b322d90410910c534cfe984ed2 100644 (file)
@@ -1,4 +1,4 @@
-From 3ed524feda787229cef8076048e00c7933218ced Mon Sep 17 00:00:00 2001
+From 7ecfcd842717ee20c0736b6b7251f9a7edafe287 Mon Sep 17 00:00:00 2001
 From: d34d <clark@cyngn.com>
 Date: Wed, 4 Jan 2017 10:29:34 -0800
 Subject: [PATCH 02/10] Introduce sepolicy exceptions for theme assets
@@ -42,10 +42,10 @@ index c3091ab..3ae9478 100644
 +allow bootanim theme_data_file:dir search;
 +allow bootanim theme_data_file:file r_file_perms;
 diff --git a/file.te b/file.te
-index dfa3c9b..1e18b89 100644
+index 446c182..07bdff1 100644
 --- a/file.te
 +++ b/file.te
-@@ -266,3 +266,6 @@ allow postinstall_file self:filesystem associate;
+@@ -267,3 +267,6 @@ allow postinstall_file self:filesystem associate;
  # Should be:
  #   type apk_data_file, file_type, data_file_type;
  neverallow fs_type file_type:filesystem associate;
@@ -53,10 +53,10 @@ index dfa3c9b..1e18b89 100644
 +# Themes
 +type theme_data_file, file_type, data_file_type;
 diff --git a/file_contexts b/file_contexts
-index 3448f21..392e655 100644
+index 085a57b..fefa9d7 100644
 --- a/file_contexts
 +++ b/file_contexts
-@@ -401,3 +401,6 @@
+@@ -402,3 +402,6 @@
  /mnt/user(/.*)?             u:object_r:mnt_user_file:s0
  /mnt/runtime(/.*)?          u:object_r:storage_file:s0
  /storage(/.*)?              u:object_r:storage_file:s0
index a0ec8be20cba8f3113a8fefff4a8635ba44a713b..659a337b9dca3487124036ec2388ac5e9eb2452a 100644 (file)
@@ -1,4 +1,4 @@
-From 9aa0995284f8eda8450d51963d813efcb1183c99 Mon Sep 17 00:00:00 2001
+From 7f4af920165c7d80018b199388d4309a6c450f88 Mon Sep 17 00:00:00 2001
 From: bigrushdog <randall.rushing@gmail.com>
 Date: Wed, 4 Jan 2017 10:31:29 -0800
 Subject: [PATCH 03/10] sepolicy: fix themed boot animation
index 3939a78fa9fe116011adede8a9bc5ea08249d580..048950d8087d5e447775ab7e10daf9f70a6d750b 100644 (file)
@@ -1,4 +1,4 @@
-From a6bc3717484d734ff09769887438fe7d6afd57fa Mon Sep 17 00:00:00 2001
+From 64b2ac651ecc48a340ae9d12b8a57a98a084fb86 Mon Sep 17 00:00:00 2001
 From: George G <kreach3r@users.noreply.github.com>
 Date: Wed, 8 Feb 2017 17:22:44 +0200
 Subject: [PATCH 04/10] sepolicy: fix themed sounds
index a470c47f1edd9a9a04510666f84ba857c9b20f68..5ceca5f351f042aa85b5a11a66fa08f6d1e1b03b 100644 (file)
@@ -1,4 +1,4 @@
-From 9cc52df64fe73ce52fc81b63895e69c8be0fca3c Mon Sep 17 00:00:00 2001
+From 33abb5b8782a3886016eb8e04a3fd5dec97b16c3 Mon Sep 17 00:00:00 2001
 From: Surge1223 <surge1223@gmail.com>
 Date: Sat, 18 Feb 2017 08:46:15 -0600
 Subject: [PATCH 05/10] initial policy edits for masquerade to operate rootless
index 73389aceb6784cdb8207531176ee73010b898faa..d360431756ee8770c7dafbb08d7868a9a95f4ab2 100644 (file)
@@ -1,4 +1,4 @@
-From 45afc298e2f4bb658ac810c3aa3672d1ebee5571 Mon Sep 17 00:00:00 2001
+From e113da2631251ae612b42de0639ebeba954e2245 Mon Sep 17 00:00:00 2001
 From: Surge1223 <surge1223@gmail.com>
 Date: Tue, 21 Feb 2017 12:28:05 -0600
 Subject: [PATCH 06/10] sepolicy: rename masquerade domain and allow JobService
@@ -152,7 +152,7 @@ index 85303d0..bbf8b78 100644
 -user=system isPrivApp=true domain=masquerade_app seinfo=platform name=masquerade.substratum type=system_app_data_file
 +user=system isPrivApp=true domain=masquerade seinfo=platform name=masquerade.substratum type=system_app_data_file
 diff --git a/service.te b/service.te
-index 6f9ab3f..efa08e7 100644
+index a8d16c2..782201f 100644
 --- a/service.te
 +++ b/service.te
 @@ -68,6 +68,7 @@ type jobscheduler_service, app_api_service, system_server_service, service_manag
@@ -164,7 +164,7 @@ index 6f9ab3f..efa08e7 100644
  type media_router_service, app_api_service, system_server_service, service_manager_type;
  type media_session_service, app_api_service, system_server_service, service_manager_type;
 diff --git a/service_contexts b/service_contexts
-index b7d7473..b831312 100644
+index 19cf907..77b508e 100644
 --- a/service_contexts
 +++ b/service_contexts
 @@ -65,6 +65,7 @@ jobscheduler                              u:object_r:jobscheduler_service:s0
index 8cb78bd0d13368cd59385464af3eb48d368399b5..be1cae1d577e310e3b5ce706ecd74068b92af5b7 100644 (file)
@@ -1,4 +1,4 @@
-From d265922f6a29e129ac222e323707dc0bd195d312 Mon Sep 17 00:00:00 2001
+From d64ff088ccf23a17e054abcd101eabc1ae444a40 Mon Sep 17 00:00:00 2001
 From: Surge1223 <surge1223@gmail.com>
 Date: Wed, 22 Feb 2017 20:45:04 -0600
 Subject: [PATCH 07/10] sepolicy: allow masquerade to read and write theme
index a8c64c7b6ec367d0cdae7429151b943e1c376123..73b7caf97679a073ee4a9bfe6dac5634ae5a42c0 100644 (file)
@@ -1,4 +1,4 @@
-From 56099a5e7d5ccb4b9f38dd865be5fb43c4b6f247 Mon Sep 17 00:00:00 2001
+From 34789475b4bb73b6829c65662f6f54af01a4ad84 Mon Sep 17 00:00:00 2001
 From: Miccia <bono.michele94@gmail.com>
 Date: Mon, 27 Feb 2017 12:36:21 +0100
 Subject: [PATCH 08/10] sepolicy: Fix application of bootanimation
index f98ab83a52f0291a33cddfee0ad07d2de040dab5..89b263f2fc9fb540d77b20b65b05e4d4fe0782d4 100644 (file)
@@ -1,4 +1,4 @@
-From c75924e4334f4ac14a4bf7bce15cc2a93b191998 Mon Sep 17 00:00:00 2001
+From 848c3d6f9aa362f70507fe9508b91a413dbb7a3c Mon Sep 17 00:00:00 2001
 From: LuK1337 <priv.luk@gmail.com>
 Date: Wed, 1 Mar 2017 23:11:49 +0100
 Subject: [PATCH 09/10] sepolicy: Redo masquerade rules
index ebcdbbf1b4b6c27f3c6186be6270bd7505d317f0..01bcde2e8ee99afbf68567dd1ff6be3d42977f34 100644 (file)
@@ -1,4 +1,4 @@
-From acece0611d57e0467c65af1fdbabe1ad7d793b4d Mon Sep 17 00:00:00 2001
+From 730829b706844e30cda494a22653f13341527d86 Mon Sep 17 00:00:00 2001
 From: Nathan Chancellor <natechancellor@gmail.com>
 Date: Sat, 4 Mar 2017 19:20:10 -0700
 Subject: [PATCH 10/10] Welcome to Theme Interfacer! [2/2]
@@ -202,7 +202,7 @@ index bbf8b78..5dc518d 100644
 -user=system isPrivApp=true domain=masquerade seinfo=platform name=masquerade.substratum type=system_app_data_file
 +user=system isPrivApp=true domain=interfacer seinfo=platform name=projekt.interfacer type=system_app_data_file
 diff --git a/service.te b/service.te
-index efa08e7..5818897 100644
+index 782201f..884c6ba 100644
 --- a/service.te
 +++ b/service.te
 @@ -63,12 +63,12 @@ type hardware_properties_service, app_api_service, system_server_service, servic
@@ -220,7 +220,7 @@ index efa08e7..5818897 100644
  type media_router_service, app_api_service, system_server_service, service_manager_type;
  type media_session_service, app_api_service, system_server_service, service_manager_type;
 diff --git a/service_contexts b/service_contexts
-index b831312..c38c017 100644
+index 77b508e..7112450 100644
 --- a/service_contexts
 +++ b/service_contexts
 @@ -57,6 +57,7 @@ iphonesubinfo2                            u:object_r:radio_service:s0