From 7a94b5bc34218250f65a2cbdb18697c1fffbd394 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Fri, 14 Apr 2017 18:46:14 +0200 Subject: [PATCH] Rebase OMS patches on latest 7.1.2 merge --- ...agging-resources-as-OK-to-overlay-1-.patch | 8 +- ...oduce-the-OverlayManagerService-2-11.patch | 30 ++-- ...-OverlayManagerService-into-framewor.patch | 159 ++++++++---------- ..._REPLACING-correctly-in-ACTION_PACKA.patch | 8 +- ...press-print-for-padded-resources-5-1.patch | 4 +- ...mory-leak-during-idmap-creation-6-11.patch | 8 +- ...-N-installd-add-command-rmidmap-7-11.patch | 4 +- ...able-Zygote-preloaded-drawables-8-11.patch | 10 +- ...ce-on-boot-through-OverlayManagerSer.patch | 4 +- ...force-code-policy-limiting-overlay-i.patch | 8 +- ...-multi-target-enable-disable-and-dis.patch | 4 +- ...dynamic-theme-BootAnimation-support.patch} | 18 +- ...ras-Add-dynamic-theme-fonts-support.patch} | 14 +- ...vice-Allow-system-effect-sounds-to-.patch} | 10 +- ...es-Expose-resolver-hardcoded-colors.patch} | 8 +- ...rsive-cling-colors-to-be-fully-them.patch} | 6 +- ...Permission-Icons-to-be-fully-themed.patch} | 6 +- ...ow-Navbar-ripple-color-to-be-themed.patch} | 8 +- ...S-edit-item-decoration-background-c.patch} | 6 +- ...pha-for-notification-shade-bg-color.patch} | 8 +- ...e-various-QuickSettings-text-colors.patch} | 6 +- ...ose-a-bool-to-disable-dynamic-color.patch} | 14 +- ...mic-colors-bool-compatible-with-OMS.patch} | 4 +- ...of-doze-notification-color-inversio.patch} | 8 +- ...ible-Ambient-notification-inversion.patch} | 4 +- ...ale-even-if-invert-boolean-is-false.patch} | 4 +- ...se-own-drawables-for-QS-expand-icon.patch} | 4 +- ...nsState-add-filter-for-Substratum-o.patch} | 4 +- ...nsState-add-filter-for-Substratum-i.patch} | 4 +- ...ch => 0030-Themes-Expose-QS-battery.patch} | 6 +- ...IFY_OVERLAYS-permission-for-user-ap.patch} | 12 +- ...32-SystemUI-Expose-switch-bar-title.patch} | 8 +- ...3-Expose-external-qs-tile-tint-color.patch | 6 +- ...hics-ADB-N-icon-compatible-with-OMS7.patch | 4 +- ...ernal-QS-tiles-tint-mode-to-SRC_ATOP.patch | 4 +- ...eyguard-affordance-circle-background.patch | 6 +- ...t-add-optional-findContrastColor-alg.patch | 8 +- ...cted-broadcast-for-Masquerade-events.patch | 44 +++++ ...urity-Update-Preparation-for-March-.patch} | 4 +- ...tation-to-MODIFY_OVERLAYS-permissio.patch} | 8 +- ...alogs-own-set-of-volume-icons-for-t.patch} | 4 +- ...ize-all-calling-packages-by-Masquer.patch} | 8 +- ...tected-broadcast-for-Masquerade-even.patch | 46 +++++ ...meSafety-Introduce-App-Crash-Intent.patch} | 4 +- ...eenshot-flash-and-background-colors.patch} | 8 +- ...es-Expose-Keyboard-Shortcuts-Dialog.patch} | 6 +- ...-during-boot-to-disable-all-overlays.patch | 140 +++++++++++++++ ...OMS7-N-installd-add-command-rmidmap.patch} | 19 +-- ...e-hardcoded-layout-and-styles-colors.patch | 14 +- ...e-hardcoded-contact-tile-text-colors.patch | 14 +- ...ine-back-arrow-tint-color-for-themes.patch | 8 +- ...ate-background-color-from-text-color.patch | 10 +- ...Themes-InCallUI-dialpad-digits-color.patch | 12 +- ...Expose-hard-coded-background-in-java.patch | 8 +- .../0002-Themes-Expose-all-elevations.patch | 8 +- ...kageInstaller-Add-tint-mode-to-icons.patch | 6 +- ...ke-dialpad-seperator-line-theme-able.patch | 8 +- ...se-dashboard-category-and-tile-color.patch | 20 +-- ...ettings-Expose-condition-card-colors.patch | 20 +-- ...Settings-Expose-storage-summary-text.patch | 12 +- ...gs-Expose-gesture-settings-switchbar.patch | 8 +- ...-Settings-Expose-storage-icon-colors.patch | 21 +-- ...Expose-LinearColorBar-default-colors.patch | 8 +- ...ps-show-hide-Substratum-overlays-2-2.patch | 12 +- ...ow-hide-Substratum-icon-overlays-2-2.patch | 11 +- ...xclude-overlays-from-the-app-counter.patch | 9 +- ...de-overlays-when-no-overlay-installe.patch | 6 +- ...se-color-for-external-settings-icons.patch | 8 +- ...se-dashboard-category-padding-bottom.patch | 38 +++-- ...13-Expose-switchbar-background-color.patch | 10 +- ...bluetooth-pin-confirm-dialog-text-co.patch | 8 +- ...-settings-icon-tint-mode-to-SRC_ATOP.patch | 6 +- ...gainst-themes-without-colorAccent-de.patch | 8 +- ...se-styles-in-the-manifest-for-themes.patch | 58 +++---- ...se-and-add-tint-mode-to-custom-icons.patch | 8 +- ...ose-ALL-hardcoded-and-android-colors.patch | 42 ++--- ...w-all-Masquerade-calling-packages-fo.patch | 12 +- ...service-overlay-to-service_contexts.patch} | 8 +- ...sepolicy-exceptions-for-theme-assets.patch | 10 +- ...3-sepolicy-fix-themed-boot-animation.patch | 2 +- .../0004-sepolicy-fix-themed-sounds.patch | 2 +- ...dits-for-masquerade-to-operate-rootl.patch | 2 +- ...masquerade-domain-and-allow-JobServi.patch | 6 +- ...asquerade-to-read-and-write-theme-as.patch | 2 +- ...icy-Fix-application-of-bootanimation.patch | 2 +- .../0009-sepolicy-Redo-masquerade-rules.patch | 2 +- ...0010-Welcome-to-Theme-Interfacer-2-2.patch | 6 +- 87 files changed, 696 insertions(+), 487 deletions(-) rename patches/frameworks/base/{0024-N-Extras-Add-dynamic-theme-BootAnimation-support.patch => 0012-N-Extras-Add-dynamic-theme-BootAnimation-support.patch} (69%) rename patches/frameworks/base/{0025-N-Extras-Add-dynamic-theme-fonts-support.patch => 0013-N-Extras-Add-dynamic-theme-fonts-support.patch} (98%) rename patches/frameworks/base/{0026-N-Extras-AudioService-Allow-system-effect-sounds-to-.patch => 0014-N-Extras-AudioService-Allow-system-effect-sounds-to-.patch} (93%) rename patches/frameworks/base/{0012-Themes-Expose-resolver-hardcoded-colors.patch => 0015-Themes-Expose-resolver-hardcoded-colors.patch} (97%) rename patches/frameworks/base/{0013-Themes-Allow-Immersive-cling-colors-to-be-fully-them.patch => 0016-Themes-Allow-Immersive-cling-colors-to-be-fully-them.patch} (94%) rename patches/frameworks/base/{0014-Themes-Allow-Permission-Icons-to-be-fully-themed.patch => 0017-Themes-Allow-Permission-Icons-to-be-fully-themed.patch} (91%) rename patches/frameworks/base/{0015-Themes-Allow-Navbar-ripple-color-to-be-themed.patch => 0018-Themes-Allow-Navbar-ripple-color-to-be-themed.patch} (93%) rename patches/frameworks/base/{0016-SystemUI-Expose-QS-edit-item-decoration-background-c.patch => 0019-SystemUI-Expose-QS-edit-item-decoration-background-c.patch} (93%) rename patches/frameworks/base/{0017-Allow-custom-alpha-for-notification-shade-bg-color.patch => 0020-Allow-custom-alpha-for-notification-shade-bg-color.patch} (93%) rename patches/frameworks/base/{0018-Themes-Expose-various-QuickSettings-text-colors.patch => 0021-Themes-Expose-various-QuickSettings-text-colors.patch} (94%) rename patches/frameworks/base/{0019-Notifications-Expose-a-bool-to-disable-dynamic-color.patch => 0022-Notifications-Expose-a-bool-to-disable-dynamic-color.patch} (95%) rename patches/frameworks/base/{0020-Notification-dynamic-colors-bool-compatible-with-OMS.patch => 0023-Notification-dynamic-colors-bool-compatible-with-OMS.patch} (94%) rename patches/frameworks/base/{0021-Allow-prevention-of-doze-notification-color-inversio.patch => 0024-Allow-prevention-of-doze-notification-color-inversio.patch} (93%) rename patches/frameworks/base/{0022-OMS7-compatible-Ambient-notification-inversion.patch => 0025-OMS7-compatible-Ambient-notification-inversion.patch} (95%) rename patches/frameworks/base/{0032-doze-allow-grayscale-even-if-invert-boolean-is-false.patch => 0026-doze-allow-grayscale-even-if-invert-boolean-is-false.patch} (93%) rename patches/frameworks/base/{0023-SystemUI-Use-own-drawables-for-QS-expand-icon.patch => 0027-SystemUI-Use-own-drawables-for-QS-expand-icon.patch} (99%) rename patches/frameworks/base/{0027-OMS7-N-ApplicationsState-add-filter-for-Substratum-o.patch => 0028-OMS7-N-ApplicationsState-add-filter-for-Substratum-o.patch} (94%) rename patches/frameworks/base/{0028-OMS7-N-ApplicationsState-add-filter-for-Substratum-i.patch => 0029-OMS7-N-ApplicationsState-add-filter-for-Substratum-i.patch} (91%) rename patches/frameworks/base/{0029-Themes-Expose-QS-battery.patch => 0030-Themes-Expose-QS-battery.patch} (93%) rename patches/frameworks/base/{0030-OMS-Introduce-MODIFY_OVERLAYS-permission-for-user-ap.patch => 0031-OMS-Introduce-MODIFY_OVERLAYS-permission-for-user-ap.patch} (96%) rename patches/frameworks/base/{0031-SystemUI-Expose-switch-bar-title.patch => 0032-SystemUI-Expose-switch-bar-title.patch} (91%) create mode 100644 patches/frameworks/base/0038-Add-a-protected-broadcast-for-Masquerade-events.patch rename patches/frameworks/base/{0038-OMS7-Rootless-Security-Update-Preparation-for-March-.patch => 0039-OMS7-Rootless-Security-Update-Preparation-for-March-.patch} (99%) rename patches/frameworks/base/{0039-OMS-Add-hide-annotation-to-MODIFY_OVERLAYS-permissio.patch => 0040-OMS-Add-hide-annotation-to-MODIFY_OVERLAYS-permissio.patch} (85%) rename patches/frameworks/base/{0040-FWB-Give-power-dialogs-own-set-of-volume-icons-for-t.patch => 0041-FWB-Give-power-dialogs-own-set-of-volume-icons-for-t.patch} (97%) rename patches/frameworks/base/{0041-base-Force-authorize-all-calling-packages-by-Masquer.patch => 0042-base-Force-authorize-all-calling-packages-by-Masquer.patch} (81%) create mode 100644 patches/frameworks/base/0043-Revert-Add-a-protected-broadcast-for-Masquerade-even.patch rename patches/frameworks/base/{0042-ThemeSafety-Introduce-App-Crash-Intent.patch => 0044-ThemeSafety-Introduce-App-Crash-Intent.patch} (91%) rename patches/frameworks/base/{0043-Expose-Screenshot-flash-and-background-colors.patch => 0045-Expose-Screenshot-flash-and-background-colors.patch} (90%) rename patches/frameworks/base/{0044-Themes-Expose-Keyboard-Shortcuts-Dialog.patch => 0046-Themes-Expose-Keyboard-Shortcuts-Dialog.patch} (91%) create mode 100644 patches/frameworks/base/0047-Hold-volume-up-during-boot-to-disable-all-overlays.patch rename patches/frameworks/native/{0001-OMS-N-installd-add-command-rmidmap.patch => 0001-OMS7-N-installd-add-command-rmidmap.patch} (88%) rename patches/system/sepolicy/{0001-OMS-N-Add-service-overlay-to-service_contexts.patch => 0001-OMS7-N-Add-service-overlay-to-service_contexts.patch} (93%) diff --git a/patches/frameworks/base/0001-OMS7-N-Support-tagging-resources-as-OK-to-overlay-1-.patch b/patches/frameworks/base/0001-OMS7-N-Support-tagging-resources-as-OK-to-overlay-1-.patch index f3cacf0..bd3c013 100644 --- a/patches/frameworks/base/0001-OMS7-N-Support-tagging-resources-as-OK-to-overlay-1-.patch +++ b/patches/frameworks/base/0001-OMS7-N-Support-tagging-resources-as-OK-to-overlay-1-.patch @@ -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?= 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(), diff --git a/patches/frameworks/base/0002-OMS7-N-Introduce-the-OverlayManagerService-2-11.patch b/patches/frameworks/base/0002-OMS7-N-Introduce-the-OverlayManagerService-2-11.patch index 1c881f0..cf27eb4 100644 --- a/patches/frameworks/base/0002-OMS7-N-Introduce-the-OverlayManagerService-2-11.patch +++ b/patches/frameworks/base/0002-OMS7-N-Introduce-the-OverlayManagerService-2-11.patch @@ -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?= 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 diff --git a/patches/frameworks/base/0003-OMS7-N-Integrate-OverlayManagerService-into-framewor.patch b/patches/frameworks/base/0003-OMS7-N-Integrate-OverlayManagerService-into-framewor.patch index 7b33efa..4d7a44d 100644 --- a/patches/frameworks/base/0003-OMS7-N-Integrate-OverlayManagerService-into-framewor.patch +++ b/patches/frameworks/base/0003-OMS7-N-Integrate-OverlayManagerService-into-framewor.patch @@ -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?= 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/ 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 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 > 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(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(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(this)->mAssetPaths.add(oap); - const_cast(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(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> mKnownCodebase = new ArrayMap>(); @@ -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 /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(); diff --git a/patches/frameworks/base/0004-OMS7-N-Set-EXTRA_REPLACING-correctly-in-ACTION_PACKA.patch b/patches/frameworks/base/0004-OMS7-N-Set-EXTRA_REPLACING-correctly-in-ACTION_PACKA.patch index 17a2788..8ebcc3b 100644 --- a/patches/frameworks/base/0004-OMS7-N-Set-EXTRA_REPLACING-correctly-in-ACTION_PACKA.patch +++ b/patches/frameworks/base/0004-OMS7-N-Set-EXTRA_REPLACING-correctly-in-ACTION_PACKA.patch @@ -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?= 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) { diff --git a/patches/frameworks/base/0005-OMS7-N-idmap-suppress-print-for-padded-resources-5-1.patch b/patches/frameworks/base/0005-OMS7-N-idmap-suppress-print-for-padded-resources-5-1.patch index b6ca391..66cebcd 100644 --- a/patches/frameworks/base/0005-OMS7-N-idmap-suppress-print-for-padded-resources-5-1.patch +++ b/patches/frameworks/base/0005-OMS7-N-idmap-suppress-print-for-padded-resources-5-1.patch @@ -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?= 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 diff --git a/patches/frameworks/base/0006-OMS7-N-Fix-memory-leak-during-idmap-creation-6-11.patch b/patches/frameworks/base/0006-OMS7-N-Fix-memory-leak-during-idmap-creation-6-11.patch index 517da42..591ad0b 100644 --- a/patches/frameworks/base/0006-OMS7-N-Fix-memory-leak-during-idmap-creation-6-11.patch +++ b/patches/frameworks/base/0006-OMS7-N-Fix-memory-leak-during-idmap-creation-6-11.patch @@ -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?= 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) }; diff --git a/patches/frameworks/base/0007-OMS7-N-installd-add-command-rmidmap-7-11.patch b/patches/frameworks/base/0007-OMS7-N-installd-add-command-rmidmap-7-11.patch index 6332295..32bd1a6 100644 --- a/patches/frameworks/base/0007-OMS7-N-installd-add-command-rmidmap-7-11.patch +++ b/patches/frameworks/base/0007-OMS7-N-installd-add-command-rmidmap-7-11.patch @@ -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?= 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 diff --git a/patches/frameworks/base/0008-OMS7-N-Disable-Zygote-preloaded-drawables-8-11.patch b/patches/frameworks/base/0008-OMS7-N-Disable-Zygote-preloaded-drawables-8-11.patch index 7328510..07b3288 100644 --- a/patches/frameworks/base/0008-OMS7-N-Disable-Zygote-preloaded-drawables-8-11.patch +++ b/patches/frameworks/base/0008-OMS7-N-Disable-Zygote-preloaded-drawables-8-11.patch @@ -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 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."); } diff --git a/patches/frameworks/base/0009-OMS7-N-Persistence-on-boot-through-OverlayManagerSer.patch b/patches/frameworks/base/0009-OMS7-N-Persistence-on-boot-through-OverlayManagerSer.patch index e4b90d6..5edcda4 100644 --- a/patches/frameworks/base/0009-OMS7-N-Persistence-on-boot-through-OverlayManagerSer.patch +++ b/patches/frameworks/base/0009-OMS7-N-Persistence-on-boot-through-OverlayManagerSer.patch @@ -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 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 diff --git a/patches/frameworks/base/0010-OMS7-N-Do-not-enforce-code-policy-limiting-overlay-i.patch b/patches/frameworks/base/0010-OMS7-N-Do-not-enforce-code-policy-limiting-overlay-i.patch index a87c899..c8e97bf 100644 --- a/patches/frameworks/base/0010-OMS7-N-Do-not-enforce-code-policy-limiting-overlay-i.patch +++ b/patches/frameworks/base/0010-OMS7-N-Do-not-enforce-code-policy-limiting-overlay-i.patch @@ -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 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; } diff --git a/patches/frameworks/base/0011-OMS7-N-Implement-multi-target-enable-disable-and-dis.patch b/patches/frameworks/base/0011-OMS7-N-Implement-multi-target-enable-disable-and-dis.patch index 3d1ae90..85f6a5f 100644 --- a/patches/frameworks/base/0011-OMS7-N-Implement-multi-target-enable-disable-and-dis.patch +++ b/patches/frameworks/base/0011-OMS7-N-Implement-multi-target-enable-disable-and-dis.patch @@ -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 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/0024-N-Extras-Add-dynamic-theme-BootAnimation-support.patch b/patches/frameworks/base/0012-N-Extras-Add-dynamic-theme-BootAnimation-support.patch similarity index 69% rename from patches/frameworks/base/0024-N-Extras-Add-dynamic-theme-BootAnimation-support.patch rename to patches/frameworks/base/0012-N-Extras-Add-dynamic-theme-BootAnimation-support.patch index d67f9e5..541cc69 100644 --- a/patches/frameworks/base/0024-N-Extras-Add-dynamic-theme-BootAnimation-support.patch +++ b/patches/frameworks/base/0012-N-Extras-Add-dynamic-theme-BootAnimation-support.patch @@ -1,7 +1,7 @@ -From 82cf71dda5f995d9a6a7642f0489a7b5dc5fd347 Mon Sep 17 00:00:00 2001 +From 6401e0731359e93a0ab6d27e2482fcc4115e864c Mon Sep 17 00:00:00 2001 From: 0xD34D Date: Mon, 20 Jun 2016 22:59:48 +0300 -Subject: [PATCH 24/44] N-Extras: Add dynamic theme BootAnimation support +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 @@ -12,10 +12,10 @@ Change-Id: I394897c10f02695f0416e87e9bf960e840bcb3b7 1 file changed, 4 insertions(+) diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp -index d4a9326fc0d..57e1992a903 100644 +index 10fabcfb735..53e4965eccc 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp -@@ -68,6 +68,7 @@ namespace android { +@@ -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"; @@ -23,15 +23,15 @@ index d4a9326fc0d..57e1992a903 100644 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); +@@ -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(getAnimationFileName(IMG_OEM), R_OK) == 0) { - mZipFileName = getAnimationFileName(IMG_OEM); + else if (access(OEM_BOOTANIMATION_FILE, R_OK) == 0) { + mZipFileName = OEM_BOOTANIMATION_FILE; } -- 2.11.1 diff --git a/patches/frameworks/base/0025-N-Extras-Add-dynamic-theme-fonts-support.patch b/patches/frameworks/base/0013-N-Extras-Add-dynamic-theme-fonts-support.patch similarity index 98% rename from patches/frameworks/base/0025-N-Extras-Add-dynamic-theme-fonts-support.patch rename to patches/frameworks/base/0013-N-Extras-Add-dynamic-theme-fonts-support.patch index 2ef6e0f..58a3d1e 100644 --- a/patches/frameworks/base/0025-N-Extras-Add-dynamic-theme-fonts-support.patch +++ b/patches/frameworks/base/0013-N-Extras-Add-dynamic-theme-fonts-support.patch @@ -1,7 +1,7 @@ -From 16d66568ce9eb9a5fbc06281415a56d3f292f0e9 Mon Sep 17 00:00:00 2001 +From 13155afe5a3c9a0cc921e3626c8e4e943ac5287e Mon Sep 17 00:00:00 2001 From: 0xD34D Date: Wed, 22 Jun 2016 23:54:23 +0300 -Subject: [PATCH 25/44] N-Extras: Add dynamic theme fonts support +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 @@ -53,7 +53,7 @@ Change-Id: I1f61bd269b42ab6145482a51d25fe5b1b5308f94 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 +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; @@ -64,7 +64,7 @@ index 55fc25de68b..44a900b3a1f 100644 import android.hardware.display.DisplayManagerGlobal; import android.net.ConnectivityManager; import android.net.IConnectivityManager; -@@ -4852,8 +4853,12 @@ public final class ActivityThread { +@@ -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); @@ -560,7 +560,7 @@ index 2886f0dd4a2..990c9bd1fbf 100644 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 +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 @@ -572,7 +572,7 @@ index f4d07aff3e6..5d8ab51d077 100644 // 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 +@@ -3956,6 +3958,13 @@ public final class ActivityManagerService extends ActivityManagerNative mNativeDebuggingApp = null; } @@ -586,7 +586,7 @@ index f4d07aff3e6..5d8ab51d077 100644 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 +@@ -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, diff --git a/patches/frameworks/base/0026-N-Extras-AudioService-Allow-system-effect-sounds-to-.patch b/patches/frameworks/base/0014-N-Extras-AudioService-Allow-system-effect-sounds-to-.patch similarity index 93% rename from patches/frameworks/base/0026-N-Extras-AudioService-Allow-system-effect-sounds-to-.patch rename to patches/frameworks/base/0014-N-Extras-AudioService-Allow-system-effect-sounds-to-.patch index 0d28c0d..7c65573 100644 --- a/patches/frameworks/base/0026-N-Extras-AudioService-Allow-system-effect-sounds-to-.patch +++ b/patches/frameworks/base/0014-N-Extras-AudioService-Allow-system-effect-sounds-to-.patch @@ -1,7 +1,7 @@ -From cfc3eb11fa4e993884a183926d702ad644e9d1d5 Mon Sep 17 00:00:00 2001 +From 4fe7e1f0459c09f59b87f2fe59203065e160ee1d Mon Sep 17 00:00:00 2001 From: Nicholas Chum Date: Sun, 17 Jul 2016 17:56:40 -0400 -Subject: [PATCH 26/44] N-Extras: AudioService: Allow system effect sounds to +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 @@ -17,7 +17,7 @@ Change-Id: I7666c2bd259443ccec442bf6059786bea3dc069e 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 +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; @@ -36,7 +36,7 @@ index f5db48806de..c6144d0b0b9 100644 private static final List SOUND_EFFECT_FILES = new ArrayList(); /* Sound effect file name mapping sound effect id (AudioManager.FX_xxx) to -@@ -4679,9 +4681,16 @@ public class AudioService extends IAudioService.Stub { +@@ -4687,9 +4689,16 @@ public class AudioService extends IAudioService.Stub { continue; } if (poolId[SOUND_EFFECT_FILES_MAP[effect][0]] == -1) { @@ -56,7 +56,7 @@ index f5db48806de..c6144d0b0b9 100644 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 { +@@ -4795,8 +4804,15 @@ public class AudioService extends IAudioService.Stub { } else { MediaPlayer mediaPlayer = new MediaPlayer(); try { diff --git a/patches/frameworks/base/0012-Themes-Expose-resolver-hardcoded-colors.patch b/patches/frameworks/base/0015-Themes-Expose-resolver-hardcoded-colors.patch similarity index 97% rename from patches/frameworks/base/0012-Themes-Expose-resolver-hardcoded-colors.patch rename to patches/frameworks/base/0015-Themes-Expose-resolver-hardcoded-colors.patch index 9eabae8..6f07fa7 100644 --- a/patches/frameworks/base/0012-Themes-Expose-resolver-hardcoded-colors.patch +++ b/patches/frameworks/base/0015-Themes-Expose-resolver-hardcoded-colors.patch @@ -1,7 +1,7 @@ -From 9c8d1caf4ceed49cce6f8d314f1a8a8867ac21a2 Mon Sep 17 00:00:00 2001 +From f55f8d8025d795ddbe1f759055f4ea3d5dcf98af Mon Sep 17 00:00:00 2001 From: Dave Kover Date: Fri, 9 Dec 2016 10:47:17 -0700 -Subject: [PATCH 12/44] Themes: Expose resolver hardcoded colors +Subject: [PATCH 15/47] Themes: Expose resolver hardcoded colors commit dbbd5e70cc65002df41561474b03362022dd6716 Author: Dave Kover @@ -171,13 +171,13 @@ index 02dc2ede430..d3baf682fe0 100644 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 +index 00000000000..0743f7f4b04 --- /dev/null +++ b/core/res/res/values/projekt_colors.xml @@ -0,0 +1,20 @@ + + Allows the app to read and write Do Not Disturb configuration. diff --git a/patches/frameworks/base/0031-SystemUI-Expose-switch-bar-title.patch b/patches/frameworks/base/0032-SystemUI-Expose-switch-bar-title.patch similarity index 91% rename from patches/frameworks/base/0031-SystemUI-Expose-switch-bar-title.patch rename to patches/frameworks/base/0032-SystemUI-Expose-switch-bar-title.patch index a139a70..048398a 100644 --- a/patches/frameworks/base/0031-SystemUI-Expose-switch-bar-title.patch +++ b/patches/frameworks/base/0032-SystemUI-Expose-switch-bar-title.patch @@ -1,7 +1,7 @@ -From e6ffc28bf3894806ccaaa694eba82e0cbe9e34e9 Mon Sep 17 00:00:00 2001 +From 35c793d3fa2c1c909d0108a1139ff7860a400b6f Mon Sep 17 00:00:00 2001 From: daveyannihilation Date: Sun, 1 Jan 2017 01:47:53 -0700 -Subject: [PATCH 31/44] SystemUI: Expose switch bar title +Subject: [PATCH 32/47] SystemUI: Expose switch bar title This is needed for the power notifications switchbar in SystemUI Tuner, amongst other things. @@ -28,13 +28,13 @@ index 41cdb78392a..344c5aa0531 100644 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 +index 00000000000..d0be98087e6 --- /dev/null +++ b/packages/SystemUI/res/values/projekt_styles.xml @@ -0,0 +1,24 @@ + + + + ++ ++ + + + +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/0039-OMS7-Rootless-Security-Update-Preparation-for-March-.patch similarity index 99% rename from patches/frameworks/base/0038-OMS7-Rootless-Security-Update-Preparation-for-March-.patch rename to patches/frameworks/base/0039-OMS7-Rootless-Security-Update-Preparation-for-March-.patch index 9a87cf7..3b1d1ad 100644 --- a/patches/frameworks/base/0038-OMS7-Rootless-Security-Update-Preparation-for-March-.patch +++ b/patches/frameworks/base/0039-OMS7-Rootless-Security-Update-Preparation-for-March-.patch @@ -1,7 +1,7 @@ -From cbba5cade6c741883cfe912012e98661684499df Mon Sep 17 00:00:00 2001 +From e3df03d2bffa02bf94632d0c1070a0d0d9d5caad Mon Sep 17 00:00:00 2001 From: Nicholas Chum Date: Wed, 22 Feb 2017 22:55:15 -0500 -Subject: [PATCH 38/44] OMS7: Rootless Security Update Preparation for March +Subject: [PATCH 39/47] OMS7: Rootless Security Update Preparation for March 2017 Change-Id: I93f7917eebf9f86590eb9c00841460d236702cb3 diff --git a/patches/frameworks/base/0039-OMS-Add-hide-annotation-to-MODIFY_OVERLAYS-permissio.patch b/patches/frameworks/base/0040-OMS-Add-hide-annotation-to-MODIFY_OVERLAYS-permissio.patch similarity index 85% rename from patches/frameworks/base/0039-OMS-Add-hide-annotation-to-MODIFY_OVERLAYS-permissio.patch rename to patches/frameworks/base/0040-OMS-Add-hide-annotation-to-MODIFY_OVERLAYS-permissio.patch index 1448f58..28284e6 100644 --- a/patches/frameworks/base/0039-OMS-Add-hide-annotation-to-MODIFY_OVERLAYS-permissio.patch +++ b/patches/frameworks/base/0040-OMS-Add-hide-annotation-to-MODIFY_OVERLAYS-permissio.patch @@ -1,7 +1,7 @@ -From a88449305ba7f06a57890c7c188e75a0d67c01ce Mon Sep 17 00:00:00 2001 +From 7f63dd85b5618a0f661cf80c74afa1ae3fe9e123 Mon Sep 17 00:00:00 2001 From: Evan Anderson Date: Mon, 27 Feb 2017 15:16:18 -0500 -Subject: [PATCH 39/44] OMS: Add hide annotation to MODIFY_OVERLAYS permission +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 @@ -13,10 +13,10 @@ Signed-off-by: Evan Anderson 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml -index 3ceb17ba568..4a7dd780c15 100644 +index d4a23a69924..12d12efb3c8 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml -@@ -3162,7 +3162,8 @@ +@@ -3169,7 +3169,8 @@ diff --git a/patches/frameworks/base/0040-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 similarity index 97% rename from patches/frameworks/base/0040-FWB-Give-power-dialogs-own-set-of-volume-icons-for-t.patch rename to patches/frameworks/base/0041-FWB-Give-power-dialogs-own-set-of-volume-icons-for-t.patch index a5121b8..df01d23 100644 --- a/patches/frameworks/base/0040-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 @@ -1,7 +1,7 @@ -From 3f729adb148bbf2689823bac93fef8e292f29e4f Mon Sep 17 00:00:00 2001 +From 48c09423a4afaeb02f927ed2addaf29f40832d9f Mon Sep 17 00:00:00 2001 From: Bryan Owens Date: Mon, 27 Feb 2017 19:06:31 -0600 -Subject: [PATCH 40/44] FWB: Give power dialogs own set of volume icons for +Subject: [PATCH 41/47] FWB: Give power dialogs own set of volume icons for themes Change-Id: I5add336c06a83b162dfd0832dfabfb06a2827421 diff --git a/patches/frameworks/base/0041-base-Force-authorize-all-calling-packages-by-Masquer.patch b/patches/frameworks/base/0042-base-Force-authorize-all-calling-packages-by-Masquer.patch similarity index 81% rename from patches/frameworks/base/0041-base-Force-authorize-all-calling-packages-by-Masquer.patch rename to patches/frameworks/base/0042-base-Force-authorize-all-calling-packages-by-Masquer.patch index 854b48b..2827f4c 100644 --- a/patches/frameworks/base/0041-base-Force-authorize-all-calling-packages-by-Masquer.patch +++ b/patches/frameworks/base/0042-base-Force-authorize-all-calling-packages-by-Masquer.patch @@ -1,7 +1,7 @@ -From 7269c14a19e2d5322e9ff7b66c9a99f8189eef1e Mon Sep 17 00:00:00 2001 +From 0424a244564b745ee5185346363fe363cb353f86 Mon Sep 17 00:00:00 2001 From: George G Date: Sat, 25 Feb 2017 17:32:18 +0200 -Subject: [PATCH 41/44] base: Force authorize all calling packages by +Subject: [PATCH 42/47] base: Force authorize all calling packages by Masquerade (2/3) Change-Id: Iaf354c4d891acf9f5e19767223e4f9860a07338f @@ -10,10 +10,10 @@ Change-Id: Iaf354c4d891acf9f5e19767223e4f9860a07338f 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 +index c83bd3e78e9..4c778fbdee8 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java -@@ -6564,6 +6564,12 @@ public final class Settings { +@@ -6619,6 +6619,12 @@ public final class Settings { public static final String VOLUME_LINK_NOTIFICATION = "volume_link_notification"; /** 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 index 0000000..a3614b0 --- /dev/null +++ b/patches/frameworks/base/0043-Revert-Add-a-protected-broadcast-for-Masquerade-even.patch @@ -0,0 +1,46 @@ +From 04ec5440cac206bc1b4c2b5f2ca513d802055a6e Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +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 @@ + + + +- +- + + + +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/0042-ThemeSafety-Introduce-App-Crash-Intent.patch b/patches/frameworks/base/0044-ThemeSafety-Introduce-App-Crash-Intent.patch similarity index 91% rename from patches/frameworks/base/0042-ThemeSafety-Introduce-App-Crash-Intent.patch rename to patches/frameworks/base/0044-ThemeSafety-Introduce-App-Crash-Intent.patch index b05149c..baab3cd 100644 --- a/patches/frameworks/base/0042-ThemeSafety-Introduce-App-Crash-Intent.patch +++ b/patches/frameworks/base/0044-ThemeSafety-Introduce-App-Crash-Intent.patch @@ -1,7 +1,7 @@ -From aabad857d74935eaebc590ec3b105f96cec93e25 Mon Sep 17 00:00:00 2001 +From 4dcd57908d1c27b7f4590fd444373ca4e494fee5 Mon Sep 17 00:00:00 2001 From: Ivan Iskandar Date: Thu, 9 Mar 2017 13:28:22 +0100 -Subject: [PATCH 42/44] ThemeSafety: Introduce App Crash Intent +Subject: [PATCH 44/47] ThemeSafety: Introduce App Crash Intent The intent received by substratum and it will disable all enabled overlays. diff --git a/patches/frameworks/base/0043-Expose-Screenshot-flash-and-background-colors.patch b/patches/frameworks/base/0045-Expose-Screenshot-flash-and-background-colors.patch similarity index 90% rename from patches/frameworks/base/0043-Expose-Screenshot-flash-and-background-colors.patch rename to patches/frameworks/base/0045-Expose-Screenshot-flash-and-background-colors.patch index fd23e41..8255253 100644 --- a/patches/frameworks/base/0043-Expose-Screenshot-flash-and-background-colors.patch +++ b/patches/frameworks/base/0045-Expose-Screenshot-flash-and-background-colors.patch @@ -1,7 +1,7 @@ -From 1b5826792b4a0b94d40e280d6e3113e61d8547a7 Mon Sep 17 00:00:00 2001 -From: Ezio Lacandia Bijelkic +From 54b0d34c2391fb034ddc0a507e216c2923febb2e Mon Sep 17 00:00:00 2001 +From: ezio84 Date: Tue, 7 Mar 2017 23:33:40 +0100 -Subject: [PATCH 43/44] Expose Screenshot flash and background colors +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). @@ -36,7 +36,7 @@ index 59952e09555..c74c69ba8e9 100644 Date: Thu, 30 Mar 2017 13:30:04 -0500 -Subject: [PATCH 44/44] Themes: Expose Keyboard Shortcuts Dialog +Subject: [PATCH 46/47] Themes: Expose Keyboard Shortcuts Dialog Change-Id: I84d3e57fe8c42d79ff6e0b6502cb6cd49aaaf91b Signed-off-by: Bryan Owens @@ -11,7 +11,7 @@ Signed-off-by: Bryan Owens 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 +index d0be98087e6..87dd19cb97c 100644 --- a/packages/SystemUI/res/values/projekt_styles.xml +++ b/packages/SystemUI/res/values/projekt_styles.xml @@ -20,5 +20,8 @@ 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 index 0000000..d20150f --- /dev/null +++ b/patches/frameworks/base/0047-Hold-volume-up-during-boot-to-disable-all-overlays.patch @@ -0,0 +1,140 @@ +From 590ff215ebbf88799b01715d155d05e6116df082 Mon Sep 17 00:00:00 2001 +From: George G +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> allOverlays = iom.getAllOverlays(UserHandle.USER_SYSTEM); ++ if (allOverlays != null) { ++ Log.d(TAG, "The Overlay Manager Service provided the list of enabled overlays"); ++ Set 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-OMS7-N-installd-add-command-rmidmap.patch similarity index 88% rename from patches/frameworks/native/0001-OMS-N-installd-add-command-rmidmap.patch rename to patches/frameworks/native/0001-OMS7-N-installd-add-command-rmidmap.patch index ec1ad89..c17fdf3 100644 --- a/patches/frameworks/native/0001-OMS-N-installd-add-command-rmidmap.patch +++ b/patches/frameworks/native/0001-OMS7-N-installd-add-command-rmidmap.patch @@ -1,18 +1,13 @@ -From 70dc365c2877d443aebb7da11f061fa3d69dd2a4 Mon Sep 17 00:00:00 2001 +From 072fba04d4d8ad9598bbac24e27f2b7497378de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Kongstad?= Date: Tue, 15 Dec 2015 14:02:30 +0100 -Subject: [PATCH] OMS-N: installd: add command 'rmidmap' +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. -This commit depends on a corresponding commit in frameworks/base -(with the same Change-Id). - -Bug: 31052947 - -Change-Id: Iae19a519803f0c172b02a32faa283ef36f43863c +Change-Id: I98cb26a51d03d7babda6b7b46b6a328abb032836 --- cmds/installd/commands.cpp | 16 ++++++++++++++++ cmds/installd/commands.h | 1 + @@ -20,7 +15,7 @@ Change-Id: Iae19a519803f0c172b02a32faa283ef36f43863c 3 files changed, 23 insertions(+) diff --git a/cmds/installd/commands.cpp b/cmds/installd/commands.cpp -index cadcd1e..0b25da1 100644 +index cadcd1ef1..0b25da1d7 100644 --- a/cmds/installd/commands.cpp +++ b/cmds/installd/commands.cpp @@ -2047,6 +2047,22 @@ fail: @@ -47,7 +42,7 @@ index cadcd1e..0b25da1 100644 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 +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]); @@ -59,7 +54,7 @@ index ba27517..2da80dd 100644 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 +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) @@ -83,5 +78,5 @@ index 8f883db..93388ce 100644 { "rmpackagedir", 1, do_rm_package_dir }, { "clear_app_profiles", 1, do_clear_app_profiles }, -- -2.9.3 +2.11.1 diff --git a/patches/packages/apps/Contacts/0001-Themes-Expose-hardcoded-layout-and-styles-colors.patch b/patches/packages/apps/Contacts/0001-Themes-Expose-hardcoded-layout-and-styles-colors.patch index ecedf0c..d4326d3 100644 --- a/patches/packages/apps/Contacts/0001-Themes-Expose-hardcoded-layout-and-styles-colors.patch +++ b/patches/packages/apps/Contacts/0001-Themes-Expose-hardcoded-layout-and-styles-colors.patch @@ -1,4 +1,4 @@ -From 821a5244f3d480fc62d5b16ec9167d16a0f86ea2 Mon Sep 17 00:00:00 2001 +From 8c3f30d4a76837b5221b8b99d13237bd09b1a39f Mon Sep 17 00:00:00 2001 From: beanstown106 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 @@ + + ++ + + 8dip + -- -2.9.3 +2.11.1 diff --git a/patches/packages/apps/Settings/0013-Expose-switchbar-background-color.patch b/patches/packages/apps/Settings/0013-Expose-switchbar-background-color.patch index a0d5d17..2145768 100644 --- a/patches/packages/apps/Settings/0013-Expose-switchbar-background-color.patch +++ b/patches/packages/apps/Settings/0013-Expose-switchbar-background-color.patch @@ -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 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 + ?android:attr/colorSecondary 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