From a1b47e3d10cef6ecbc6cb8081a16ef554c3ecc24 Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Mon, 16 Oct 2017 09:37:03 +0100 Subject: [PATCH] Whitelist some of our own broadcast actions * Starting with Oreo, all the apps that target O+ are always subject to background restrictions (android/platform_frameworks_base@42a386b7717300bf6d75cbd3b4f7ad00f294be0d). The manifest-registered receivers of apps with a targetSdkVersion higher than 25 won't receive the broadcast. Instead, a message similar to the following will appear in LogCat: 10-07 14:13:49.594 719 736 W BroadcastQueue: Background execution not allowed: receiving Intent { act=lineageos.intent.action.LID_STATE_CHANGED flg=0x20000010 (has extras) } to org.lineageos.flipflap/.EventReceiver * Exempt some of our broadcast actions so that we can keep targetting the latest SDK. Change-Id: I075608e18994f64db5e89658757dca307f07c417 --- config/common.mk | 4 ++++ config/permissions/lineage-sysconfig.xml | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 config/permissions/lineage-sysconfig.xml diff --git a/config/common.mk b/config/common.mk index 6e300f7d..0211eb77 100644 --- a/config/common.mk +++ b/config/common.mk @@ -50,6 +50,10 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ vendor/lineage/config/permissions/backup.xml:system/etc/sysconfig/backup.xml +# Lineage-specific broadcast actions whitelist +PRODUCT_COPY_FILES += \ + vendor/lineage/config/permissions/lineage-sysconfig.xml:system/etc/sysconfig/lineage-sysconfig.xml + # Signature compatibility validation PRODUCT_COPY_FILES += \ vendor/lineage/prebuilt/common/bin/otasigcheck.sh:install/bin/otasigcheck.sh diff --git a/config/permissions/lineage-sysconfig.xml b/config/permissions/lineage-sysconfig.xml new file mode 100644 index 00000000..4ab0f696 --- /dev/null +++ b/config/permissions/lineage-sysconfig.xml @@ -0,0 +1,24 @@ + + + + + + + + + +