mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
Fixes
- 18.1: Fix exempted background tasks when dozing (GrapheneOS) - 20.0: pick a fix for some colors after qpr2 - 20.0: fix the missing notification backdrop Signed-off-by: Tad <tad@spotco.us>
This commit is contained in:
parent
279eaa84bc
commit
b4dbe27f23
@ -208,6 +208,7 @@
|
||||
<project path="device/xiaomi/sdm845-common" name="LineageOS/android_device_xiaomi_sdm845-common" remote="github" revision="lineage-20" />
|
||||
<project path="kernel/xiaomi/sdm845" name="LineageOS/android_kernel_xiaomi_sdm845" remote="github" revision="lineage-20" />
|
||||
|
||||
<!-- Proprietary Blobs -->
|
||||
<project path="vendor/fairphone/FP3" name="[COLOUR IN THE LINES]/proprietary_vendor_fairphone_FP3" remote="github" revision="lineage-20" />
|
||||
<project path="vendor/fairphone/FP4" name="[COLOUR IN THE LINES]/proprietary_vendor_fairphone_FP4" remote="github" revision="lineage-20" />
|
||||
<project path="vendor/fxtec/pro1" name="[COLOUR IN THE LINES]/proprietary_vendor_fxtec_pro1" remote="github" revision="lineage-20" />
|
||||
@ -255,4 +256,5 @@
|
||||
<project path="vendor/sony/aurora" name="[COLOUR IN THE LINES]/proprietary_vendor_sony_aurora" remote="github" revision="lineage-20" />
|
||||
<project path="vendor/sony/xz2c" name="[COLOUR IN THE LINES]/proprietary_vendor_sony_xz2c" remote="github" revision="lineage-20" />
|
||||
<project path="vendor/essential/mata" name="[COLOUR IN THE LINES]/proprietary_vendor_essential_mata" remote="github" revision="lineage-20" />
|
||||
|
||||
</manifest>
|
||||
|
@ -57,6 +57,10 @@ nojit
|
||||
9 https://github.com/GrapheneOS/platform_build/commit/5b9927197e63593b9220d1a9280021252ef205e9
|
||||
9 https://github.com/GrapheneOS/platform_build/commit/e36c7aefaa78a1ed5b94c7f51d29277008eea232
|
||||
|
||||
[implemented] doze jobscheduler fix
|
||||
13 https://github.com/GrapheneOS/platform_frameworks_base/commit/e6aebb654559376b4af70006b0098af53d90187
|
||||
12 https://github.com/GrapheneOS/platform_frameworks_base/commit/4f12bdfdda5cd0d538790c05ee784e5fb5e1e2fb
|
||||
|
||||
[partially implemented] disable forced ntp checks
|
||||
13 https://github.com/GrapheneOS/platform_frameworks_base/commit/4c8a4469a56fad03de58996ccf719b098436f987
|
||||
12 https://github.com/GrapheneOS/platform_frameworks_base/commit/723fb336f7246585ee1595dd1bf1633528265a8b
|
||||
|
@ -102,7 +102,7 @@
|
||||
|
||||
If this string is empty or the specified package does not exist, then
|
||||
the platform will search for an SMS app and use that (if there is one)-->
|
||||
<string name="default_sms_application" translatable="false">org.smssecure.smssecure</string>
|
||||
<string name="default_sms_application" translatable="false">com.android.messaging</string>
|
||||
|
||||
<!-- Component name of the combo network location provider. -->
|
||||
<string name="config_comboNetworkLocationProvider" translatable="false">@null</string>
|
||||
@ -194,8 +194,8 @@
|
||||
in certain places to reduce RAM footprint. This is ignored if ro.config.low_ram
|
||||
is true (in that case this is assumed true as well). It can allow you to tune down
|
||||
your device's memory use without going to the point of causing applications to turn
|
||||
off features. -->
|
||||
<bool name="config_avoidGfxAccel">false</bool>
|
||||
off features.
|
||||
<bool name="config_avoidGfxAccel">false</bool> -->
|
||||
|
||||
<!-- Enables or disables fading edges when marquee is enabled in TextView.
|
||||
Off by default, since the framebuffer readback used to implement the
|
||||
|
@ -0,0 +1,129 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Muhomor <muhomor.dmitry@gmail.com>
|
||||
Date: Thu, 7 Jul 2022 09:28:40 +0300
|
||||
Subject: [PATCH] DeviceIdleJobsController: don't ignore whitelisted system
|
||||
apps
|
||||
|
||||
Only user app IDs were written to `mDeviceIdleWhitelistAppIds`, both initially and when
|
||||
`PowerManager.ACTION_POWER_SAVE_WHITELIST_CHANGED` broadcast was received. All other places that
|
||||
listen to that broadcast retrieve both user and system app IDs.
|
||||
|
||||
The only place where `mDeviceIdleWhitelistAppIds` array is checked is in `isWhitelistedLocked()`,
|
||||
which is called only by `updateTaskStateLocked()` to check whether the app is on the device idle whitelist.
|
||||
|
||||
It's not clear why DeviceIdleJobsController ignores system apps.
|
||||
File level comment doesn't mention the distinction between system and user apps:
|
||||
"When device is dozing, set constraint for all jobs, except whitelisted apps, as not satisfied."
|
||||
Comment for isWhitelistedLocked() does, however:
|
||||
"Checks if the given job's scheduling app id exists in the device idle user whitelist."
|
||||
However, that method is called for both system and user apps, and returns false for system apps
|
||||
because only whitelist of user apps is checked. This leads to long delays for jobs that were
|
||||
submitted by whitelisted system apps when device is in the Doze mode. No such delays happen with
|
||||
whitelisted user apps.
|
||||
|
||||
Other places use a different naming for array of app IDs that includes only user apps,
|
||||
eg `mDeviceIdleWhitelistUserAppIds`, not `mDeviceIdleWhitelistAppIds`.
|
||||
|
||||
I've looked through the Git history of DeviceIdleJobsController and JobSchedulerService, but didn't
|
||||
find a reason for this behavior. Perhaps, system apps were exempted from device idle JobScheduler
|
||||
restricitions in some other place previously, or this was a bug from the start.
|
||||
|
||||
Tested on an emulator with the Messaging app, which uses JobScheduler
|
||||
during processing of incoming SMS:
|
||||
1. Check that Messaging app is on system deviceidle whitelist:
|
||||
```
|
||||
$ dumpsys deviceidle whitelist | grep com.android.messaging
|
||||
system-excidle,com.android.messaging,10090
|
||||
system,com.android.messaging,10090
|
||||
```
|
||||
2. Simulate sending an SMS: it appears immediately
|
||||
3. Simulate Doze mode: `$ dumpsys deviceidle force-idle`
|
||||
4. Simulate sending an SMS again. Message doesn't appear, even if the Messaging app is open
|
||||
5. Exit Doze mode: `$ dumpsys deviceidle unforce`. All pending messages appear immediately
|
||||
6. Add Messaging app to the user whitelist:
|
||||
```
|
||||
$ dumpsys deviceidle whitelist +com.android.messaging
|
||||
$ dumpsys deviceidle whitelist | grep com.android.messaging
|
||||
system-excidle,com.android.messaging,10090
|
||||
system,com.android.messaging,10090
|
||||
user,com.android.messaging,10090
|
||||
```
|
||||
7. Simulate Doze mode again: `$ dumpsys deviceidle force-idle`
|
||||
8. Simulate sending an SMS, note that it appears immediately this time
|
||||
|
||||
Also made a test system app to make sure that this issue isn't caused by low targetSdk of the
|
||||
Messaging app (it targets SDK 24). Same issue with targetSdk 32 app.
|
||||
|
||||
In both cases, applying this patch fixes the issue.
|
||||
---
|
||||
.../java/com/android/server/DeviceIdleInternal.java | 2 +-
|
||||
.../java/com/android/server/DeviceIdleController.java | 6 +++---
|
||||
.../server/job/controllers/DeviceIdleJobsController.java | 6 +++---
|
||||
3 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java b/apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java
|
||||
index 6475f5706a6d..b3e2629af684 100644
|
||||
--- a/apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java
|
||||
+++ b/apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java
|
||||
@@ -46,7 +46,7 @@ public interface DeviceIdleInternal {
|
||||
|
||||
boolean isAppOnWhitelist(int appid);
|
||||
|
||||
- int[] getPowerSaveWhitelistUserAppIds();
|
||||
+ int[] getPowerSaveWhitelistAppIds();
|
||||
|
||||
int[] getPowerSaveTempWhitelistAppIds();
|
||||
|
||||
diff --git a/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java b/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java
|
||||
index ac58f3d6a94d..ad656425af00 100644
|
||||
--- a/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java
|
||||
+++ b/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java
|
||||
@@ -1812,14 +1812,14 @@ public class DeviceIdleController extends SystemService
|
||||
}
|
||||
|
||||
/**
|
||||
- * Returns the array of app ids whitelisted by user. Take care not to
|
||||
+ * Returns the array of whitelisted app ids. Take care not to
|
||||
* modify this, as it is a reference to the original copy. But the reference
|
||||
* can change when the list changes, so it needs to be re-acquired when
|
||||
* {@link PowerManager#ACTION_POWER_SAVE_WHITELIST_CHANGED} is sent.
|
||||
*/
|
||||
@Override
|
||||
- public int[] getPowerSaveWhitelistUserAppIds() {
|
||||
- return DeviceIdleController.this.getPowerSaveWhitelistUserAppIds();
|
||||
+ public int[] getPowerSaveWhitelistAppIds() {
|
||||
+ return DeviceIdleController.this.getAppIdWhitelistInternal();
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/apex/jobscheduler/service/java/com/android/server/job/controllers/DeviceIdleJobsController.java b/apex/jobscheduler/service/java/com/android/server/job/controllers/DeviceIdleJobsController.java
|
||||
index 01f5fa62f889..4b1a830b319f 100644
|
||||
--- a/apex/jobscheduler/service/java/com/android/server/job/controllers/DeviceIdleJobsController.java
|
||||
+++ b/apex/jobscheduler/service/java/com/android/server/job/controllers/DeviceIdleJobsController.java
|
||||
@@ -88,7 +88,7 @@ public final class DeviceIdleJobsController extends StateController {
|
||||
case PowerManager.ACTION_POWER_SAVE_WHITELIST_CHANGED:
|
||||
synchronized (mLock) {
|
||||
mDeviceIdleWhitelistAppIds =
|
||||
- mLocalDeviceIdleController.getPowerSaveWhitelistUserAppIds();
|
||||
+ mLocalDeviceIdleController.getPowerSaveWhitelistAppIds();
|
||||
if (DEBUG) {
|
||||
Slog.d(TAG, "Got whitelist "
|
||||
+ Arrays.toString(mDeviceIdleWhitelistAppIds));
|
||||
@@ -124,7 +124,7 @@ public final class DeviceIdleJobsController extends StateController {
|
||||
mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
|
||||
mLocalDeviceIdleController =
|
||||
LocalServices.getService(DeviceIdleInternal.class);
|
||||
- mDeviceIdleWhitelistAppIds = mLocalDeviceIdleController.getPowerSaveWhitelistUserAppIds();
|
||||
+ mDeviceIdleWhitelistAppIds = mLocalDeviceIdleController.getPowerSaveWhitelistAppIds();
|
||||
mPowerSaveTempWhitelistAppIds =
|
||||
mLocalDeviceIdleController.getPowerSaveTempWhitelistAppIds();
|
||||
mDeviceIdleUpdateFunctor = new DeviceIdleUpdateFunctor();
|
||||
@@ -188,7 +188,7 @@ public final class DeviceIdleJobsController extends StateController {
|
||||
}
|
||||
|
||||
/**
|
||||
- * Checks if the given job's scheduling app id exists in the device idle user whitelist.
|
||||
+ * Checks if the given job's scheduling app id exists in the device idle whitelist.
|
||||
*/
|
||||
boolean isWhitelistedLocked(JobStatus job) {
|
||||
return Arrays.binarySearch(mDeviceIdleWhitelistAppIds,
|
@ -0,0 +1,129 @@
|
||||
From 4f12bdfdda5cd0d538790c05ee784e5fb5e1e2fb Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Muhomor <muhomor.dmitry@gmail.com>
|
||||
Date: Thu, 7 Jul 2022 09:28:40 +0300
|
||||
Subject: [PATCH] DeviceIdleJobsController: don't ignore whitelisted system
|
||||
apps
|
||||
|
||||
Only user app IDs were written to `mDeviceIdleWhitelistAppIds`, both initially and when
|
||||
`PowerManager.ACTION_POWER_SAVE_WHITELIST_CHANGED` broadcast was received. All other places that
|
||||
listen to that broadcast retrieve both user and system app IDs.
|
||||
|
||||
The only place where `mDeviceIdleWhitelistAppIds` array is checked is in `isWhitelistedLocked()`,
|
||||
which is called only by `updateTaskStateLocked()` to check whether the app is on the device idle whitelist.
|
||||
|
||||
It's not clear why DeviceIdleJobsController ignores system apps.
|
||||
File level comment doesn't mention the distinction between system and user apps:
|
||||
"When device is dozing, set constraint for all jobs, except whitelisted apps, as not satisfied."
|
||||
Comment for isWhitelistedLocked() does, however:
|
||||
"Checks if the given job's scheduling app id exists in the device idle user whitelist."
|
||||
However, that method is called for both system and user apps, and returns false for system apps
|
||||
because only whitelist of user apps is checked. This leads to long delays for jobs that were
|
||||
submitted by whitelisted system apps when device is in the Doze mode. No such delays happen with
|
||||
whitelisted user apps.
|
||||
|
||||
Other places use a different naming for array of app IDs that includes only user apps,
|
||||
eg `mDeviceIdleWhitelistUserAppIds`, not `mDeviceIdleWhitelistAppIds`.
|
||||
|
||||
I've looked through the Git history of DeviceIdleJobsController and JobSchedulerService, but didn't
|
||||
find a reason for this behavior. Perhaps, system apps were exempted from device idle JobScheduler
|
||||
restricitions in some other place previously, or this was a bug from the start.
|
||||
|
||||
Tested on an emulator with the Messaging app, which uses JobScheduler
|
||||
during processing of incoming SMS:
|
||||
1. Check that Messaging app is on system deviceidle whitelist:
|
||||
```
|
||||
$ dumpsys deviceidle whitelist | grep com.android.messaging
|
||||
system-excidle,com.android.messaging,10090
|
||||
system,com.android.messaging,10090
|
||||
```
|
||||
2. Simulate sending an SMS: it appears immediately
|
||||
3. Simulate Doze mode: `$ dumpsys deviceidle force-idle`
|
||||
4. Simulate sending an SMS again. Message doesn't appear, even if the Messaging app is open
|
||||
5. Exit Doze mode: `$ dumpsys deviceidle unforce`. All pending messages appear immediately
|
||||
6. Add Messaging app to the user whitelist:
|
||||
```
|
||||
$ dumpsys deviceidle whitelist +com.android.messaging
|
||||
$ dumpsys deviceidle whitelist | grep com.android.messaging
|
||||
system-excidle,com.android.messaging,10090
|
||||
system,com.android.messaging,10090
|
||||
user,com.android.messaging,10090
|
||||
```
|
||||
7. Simulate Doze mode again: `$ dumpsys deviceidle force-idle`
|
||||
8. Simulate sending an SMS, note that it appears immediately this time
|
||||
|
||||
Also made a test system app to make sure that this issue isn't caused by low targetSdk of the
|
||||
Messaging app (it targets SDK 24). Same issue with targetSdk 32 app.
|
||||
|
||||
In both cases, applying this patch fixes the issue.
|
||||
---
|
||||
.../java/com/android/server/DeviceIdleInternal.java | 2 +-
|
||||
.../java/com/android/server/DeviceIdleController.java | 6 +++---
|
||||
.../server/job/controllers/DeviceIdleJobsController.java | 6 +++---
|
||||
3 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java b/apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java
|
||||
index caf7e7f4a4ed..1b1d2252dae1 100644
|
||||
--- a/apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java
|
||||
+++ b/apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java
|
||||
@@ -73,7 +73,7 @@ void addPowerSaveTempWhitelistAppDirect(int uid, long duration,
|
||||
|
||||
boolean isAppOnWhitelist(int appid);
|
||||
|
||||
- int[] getPowerSaveWhitelistUserAppIds();
|
||||
+ int[] getPowerSaveWhitelistAppIds();
|
||||
|
||||
int[] getPowerSaveTempWhitelistAppIds();
|
||||
|
||||
diff --git a/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java b/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java
|
||||
index 84d05c8b4144..61f0ad028caf 100644
|
||||
--- a/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java
|
||||
+++ b/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java
|
||||
@@ -2096,14 +2096,14 @@ public boolean isAppOnWhitelist(int appid) {
|
||||
}
|
||||
|
||||
/**
|
||||
- * Returns the array of app ids whitelisted by user. Take care not to
|
||||
+ * Returns the array of whitelisted app ids. Take care not to
|
||||
* modify this, as it is a reference to the original copy. But the reference
|
||||
* can change when the list changes, so it needs to be re-acquired when
|
||||
* {@link PowerManager#ACTION_POWER_SAVE_WHITELIST_CHANGED} is sent.
|
||||
*/
|
||||
@Override
|
||||
- public int[] getPowerSaveWhitelistUserAppIds() {
|
||||
- return DeviceIdleController.this.getPowerSaveWhitelistUserAppIds();
|
||||
+ public int[] getPowerSaveWhitelistAppIds() {
|
||||
+ return DeviceIdleController.this.getAppIdWhitelistInternal();
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/apex/jobscheduler/service/java/com/android/server/job/controllers/DeviceIdleJobsController.java b/apex/jobscheduler/service/java/com/android/server/job/controllers/DeviceIdleJobsController.java
|
||||
index 79ef321eaf07..393726426afa 100644
|
||||
--- a/apex/jobscheduler/service/java/com/android/server/job/controllers/DeviceIdleJobsController.java
|
||||
+++ b/apex/jobscheduler/service/java/com/android/server/job/controllers/DeviceIdleJobsController.java
|
||||
@@ -89,7 +89,7 @@ public void onReceive(Context context, Intent intent) {
|
||||
case PowerManager.ACTION_POWER_SAVE_WHITELIST_CHANGED:
|
||||
synchronized (mLock) {
|
||||
mDeviceIdleWhitelistAppIds =
|
||||
- mLocalDeviceIdleController.getPowerSaveWhitelistUserAppIds();
|
||||
+ mLocalDeviceIdleController.getPowerSaveWhitelistAppIds();
|
||||
if (DEBUG) {
|
||||
Slog.d(TAG, "Got whitelist "
|
||||
+ Arrays.toString(mDeviceIdleWhitelistAppIds));
|
||||
@@ -131,7 +131,7 @@ public DeviceIdleJobsController(JobSchedulerService service) {
|
||||
mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
|
||||
mLocalDeviceIdleController =
|
||||
LocalServices.getService(DeviceIdleInternal.class);
|
||||
- mDeviceIdleWhitelistAppIds = mLocalDeviceIdleController.getPowerSaveWhitelistUserAppIds();
|
||||
+ mDeviceIdleWhitelistAppIds = mLocalDeviceIdleController.getPowerSaveWhitelistAppIds();
|
||||
mPowerSaveTempWhitelistAppIds =
|
||||
mLocalDeviceIdleController.getPowerSaveTempWhitelistAppIds();
|
||||
mDeviceIdleUpdateFunctor = new DeviceIdleUpdateFunctor();
|
||||
@@ -190,7 +190,7 @@ public void setUidActiveLocked(int uid, boolean active) {
|
||||
}
|
||||
|
||||
/**
|
||||
- * Checks if the given job's scheduling app id exists in the device idle user whitelist.
|
||||
+ * Checks if the given job's scheduling app id exists in the device idle whitelist.
|
||||
*/
|
||||
boolean isWhitelistedLocked(JobStatus job) {
|
||||
return Arrays.binarySearch(mDeviceIdleWhitelistAppIds,
|
@ -93,7 +93,7 @@ index 883903efb95f..2020910d88bf 100644
|
||||
reloadNavIcons();
|
||||
}
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
|
||||
index 563f167828c9..53833ddd7659 100644
|
||||
index 83755c6591be..4e2bb5424eb8 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
|
||||
@@ -226,6 +226,7 @@ import com.android.systemui.statusbar.phone.dagger.StatusBarPhoneModule;
|
||||
|
@ -0,0 +1,129 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Muhomor <muhomor.dmitry@gmail.com>
|
||||
Date: Thu, 7 Jul 2022 09:28:40 +0300
|
||||
Subject: [PATCH] DeviceIdleJobsController: don't ignore whitelisted system
|
||||
apps
|
||||
|
||||
Only user app IDs were written to `mDeviceIdleWhitelistAppIds`, both initially and when
|
||||
`PowerManager.ACTION_POWER_SAVE_WHITELIST_CHANGED` broadcast was received. All other places that
|
||||
listen to that broadcast retrieve both user and system app IDs.
|
||||
|
||||
The only place where `mDeviceIdleWhitelistAppIds` array is checked is in `isWhitelistedLocked()`,
|
||||
which is called only by `updateTaskStateLocked()` to check whether the app is on the device idle whitelist.
|
||||
|
||||
It's not clear why DeviceIdleJobsController ignores system apps.
|
||||
File level comment doesn't mention the distinction between system and user apps:
|
||||
"When device is dozing, set constraint for all jobs, except whitelisted apps, as not satisfied."
|
||||
Comment for isWhitelistedLocked() does, however:
|
||||
"Checks if the given job's scheduling app id exists in the device idle user whitelist."
|
||||
However, that method is called for both system and user apps, and returns false for system apps
|
||||
because only whitelist of user apps is checked. This leads to long delays for jobs that were
|
||||
submitted by whitelisted system apps when device is in the Doze mode. No such delays happen with
|
||||
whitelisted user apps.
|
||||
|
||||
Other places use a different naming for array of app IDs that includes only user apps,
|
||||
eg `mDeviceIdleWhitelistUserAppIds`, not `mDeviceIdleWhitelistAppIds`.
|
||||
|
||||
I've looked through the Git history of DeviceIdleJobsController and JobSchedulerService, but didn't
|
||||
find a reason for this behavior. Perhaps, system apps were exempted from device idle JobScheduler
|
||||
restricitions in some other place previously, or this was a bug from the start.
|
||||
|
||||
Tested on an emulator with the Messaging app, which uses JobScheduler
|
||||
during processing of incoming SMS:
|
||||
1. Check that Messaging app is on system deviceidle whitelist:
|
||||
```
|
||||
$ dumpsys deviceidle whitelist | grep com.android.messaging
|
||||
system-excidle,com.android.messaging,10090
|
||||
system,com.android.messaging,10090
|
||||
```
|
||||
2. Simulate sending an SMS: it appears immediately
|
||||
3. Simulate Doze mode: `$ dumpsys deviceidle force-idle`
|
||||
4. Simulate sending an SMS again. Message doesn't appear, even if the Messaging app is open
|
||||
5. Exit Doze mode: `$ dumpsys deviceidle unforce`. All pending messages appear immediately
|
||||
6. Add Messaging app to the user whitelist:
|
||||
```
|
||||
$ dumpsys deviceidle whitelist +com.android.messaging
|
||||
$ dumpsys deviceidle whitelist | grep com.android.messaging
|
||||
system-excidle,com.android.messaging,10090
|
||||
system,com.android.messaging,10090
|
||||
user,com.android.messaging,10090
|
||||
```
|
||||
7. Simulate Doze mode again: `$ dumpsys deviceidle force-idle`
|
||||
8. Simulate sending an SMS, note that it appears immediately this time
|
||||
|
||||
Also made a test system app to make sure that this issue isn't caused by low targetSdk of the
|
||||
Messaging app (it targets SDK 24). Same issue with targetSdk 32 app.
|
||||
|
||||
In both cases, applying this patch fixes the issue.
|
||||
---
|
||||
.../java/com/android/server/DeviceIdleInternal.java | 2 +-
|
||||
.../java/com/android/server/DeviceIdleController.java | 6 +++---
|
||||
.../server/job/controllers/DeviceIdleJobsController.java | 6 +++---
|
||||
3 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java b/apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java
|
||||
index caf7e7f4a4ed..1b1d2252dae1 100644
|
||||
--- a/apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java
|
||||
+++ b/apex/jobscheduler/framework/java/com/android/server/DeviceIdleInternal.java
|
||||
@@ -73,7 +73,7 @@ public interface DeviceIdleInternal {
|
||||
|
||||
boolean isAppOnWhitelist(int appid);
|
||||
|
||||
- int[] getPowerSaveWhitelistUserAppIds();
|
||||
+ int[] getPowerSaveWhitelistAppIds();
|
||||
|
||||
int[] getPowerSaveTempWhitelistAppIds();
|
||||
|
||||
diff --git a/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java b/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java
|
||||
index 40d1b4c9b267..921afad6a835 100644
|
||||
--- a/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java
|
||||
+++ b/apex/jobscheduler/service/java/com/android/server/DeviceIdleController.java
|
||||
@@ -2090,14 +2090,14 @@ public class DeviceIdleController extends SystemService
|
||||
}
|
||||
|
||||
/**
|
||||
- * Returns the array of app ids whitelisted by user. Take care not to
|
||||
+ * Returns the array of whitelisted app ids. Take care not to
|
||||
* modify this, as it is a reference to the original copy. But the reference
|
||||
* can change when the list changes, so it needs to be re-acquired when
|
||||
* {@link PowerManager#ACTION_POWER_SAVE_WHITELIST_CHANGED} is sent.
|
||||
*/
|
||||
@Override
|
||||
- public int[] getPowerSaveWhitelistUserAppIds() {
|
||||
- return DeviceIdleController.this.getPowerSaveWhitelistUserAppIds();
|
||||
+ public int[] getPowerSaveWhitelistAppIds() {
|
||||
+ return DeviceIdleController.this.getAppIdWhitelistInternal();
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/apex/jobscheduler/service/java/com/android/server/job/controllers/DeviceIdleJobsController.java b/apex/jobscheduler/service/java/com/android/server/job/controllers/DeviceIdleJobsController.java
|
||||
index abbe177c5d49..52050fddb8d3 100644
|
||||
--- a/apex/jobscheduler/service/java/com/android/server/job/controllers/DeviceIdleJobsController.java
|
||||
+++ b/apex/jobscheduler/service/java/com/android/server/job/controllers/DeviceIdleJobsController.java
|
||||
@@ -89,7 +89,7 @@ public final class DeviceIdleJobsController extends StateController {
|
||||
case PowerManager.ACTION_POWER_SAVE_WHITELIST_CHANGED:
|
||||
synchronized (mLock) {
|
||||
mDeviceIdleWhitelistAppIds =
|
||||
- mLocalDeviceIdleController.getPowerSaveWhitelistUserAppIds();
|
||||
+ mLocalDeviceIdleController.getPowerSaveWhitelistAppIds();
|
||||
if (DEBUG) {
|
||||
Slog.d(TAG, "Got whitelist "
|
||||
+ Arrays.toString(mDeviceIdleWhitelistAppIds));
|
||||
@@ -132,7 +132,7 @@ public final class DeviceIdleJobsController extends StateController {
|
||||
mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
|
||||
mLocalDeviceIdleController =
|
||||
LocalServices.getService(DeviceIdleInternal.class);
|
||||
- mDeviceIdleWhitelistAppIds = mLocalDeviceIdleController.getPowerSaveWhitelistUserAppIds();
|
||||
+ mDeviceIdleWhitelistAppIds = mLocalDeviceIdleController.getPowerSaveWhitelistAppIds();
|
||||
mPowerSaveTempWhitelistAppIds =
|
||||
mLocalDeviceIdleController.getPowerSaveTempWhitelistAppIds();
|
||||
mDeviceIdleUpdateFunctor = new DeviceIdleUpdateFunctor();
|
||||
@@ -193,7 +193,7 @@ public final class DeviceIdleJobsController extends StateController {
|
||||
}
|
||||
|
||||
/**
|
||||
- * Checks if the given job's scheduling app id exists in the device idle user whitelist.
|
||||
+ * Checks if the given job's scheduling app id exists in the device idle whitelist.
|
||||
*/
|
||||
boolean isWhitelistedLocked(JobStatus job) {
|
||||
return Arrays.binarySearch(mDeviceIdleWhitelistAppIds,
|
@ -77,7 +77,7 @@ index f235b35b7..895b8f1df 100644
|
||||
persist.logd. u:object_r:logd_prop:s0
|
||||
ro.logd. u:object_r:logd_prop:s0
|
||||
diff --git a/prebuilts/api/33.0/private/property_contexts b/prebuilts/api/33.0/private/property_contexts
|
||||
index c39f2cce0..5dc9a1a89 100644
|
||||
index d8f7a0a04..46c4a53f1 100644
|
||||
--- a/prebuilts/api/33.0/private/property_contexts
|
||||
+++ b/prebuilts/api/33.0/private/property_contexts
|
||||
@@ -58,6 +58,7 @@ persist.nfc. u:object_r:nfc_prop:s0
|
||||
@ -89,7 +89,7 @@ index c39f2cce0..5dc9a1a89 100644
|
||||
persist.logd. u:object_r:logd_prop:s0
|
||||
ro.logd. u:object_r:logd_prop:s0
|
||||
diff --git a/private/property_contexts b/private/property_contexts
|
||||
index c39f2cce0..5dc9a1a89 100644
|
||||
index d8f7a0a04..46c4a53f1 100644
|
||||
--- a/private/property_contexts
|
||||
+++ b/private/property_contexts
|
||||
@@ -58,6 +58,7 @@ persist.nfc. u:object_r:nfc_prop:s0
|
||||
|
@ -167,6 +167,7 @@ applyPatch "$DOS_PATCHES/android_frameworks_base/0019-Random_MAC.patch"; #Add op
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0020-Burnin_Protection.patch"; #SystemUI: add burnIn protection (arter97)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0021-SUPL_Toggle.patch"; #Add a setting for forcibly disabling SUPL (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0022-Allow_Disabling_NTP.patch"; #Dont ping ntp server when nitz time update is toggled off (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0023-System_JobScheduler_Allowance.patch"; #DeviceIdleJobsController: don't ignore whitelisted system apps (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES_COMMON/android_frameworks_base/0006-Do-not-throw-in-setAppOnInterfaceLocked.patch"; #Fix random reboots on broken kernels when an app has data restricted XXX: ugly (DivestOS)
|
||||
applyPatch "$DOS_PATCHES_COMMON/android_frameworks_base/0007-ABI_Warning.patch"; #Warn when running activity from 32 bit app on ARM64 devices. (AOSP)
|
||||
hardenLocationConf services/core/java/com/android/server/location/gps_debug.conf; #Harden the default GPS config
|
||||
|
@ -177,6 +177,7 @@ applyPatch "$DOS_PATCHES/android_frameworks_base/0027-appops_reset_fix-1.patch";
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0027-appops_reset_fix-2.patch"; #appops: skip ops for invalid null package during state serialization (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0028-SUPL_Toggle.patch"; #Add a setting for forcibly disabling SUPL (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0029-Allow_Disabling_NTP.patch"; #Dont ping ntp server when nitz time update is toggled off (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0030-System_JobScheduler_Allowance.patch"; #DeviceIdleJobsController: don't ignore whitelisted system apps (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES_COMMON/android_frameworks_base/0007-ABI_Warning.patch"; #Warn when running activity from 32 bit app on ARM64 devices. (AOSP)
|
||||
hardenLocationConf services/core/java/com/android/server/location/gnss/gps_debug.conf; #Harden the default GPS config
|
||||
sed -i 's/DEFAULT_USE_COMPACTION = false;/DEFAULT_USE_COMPACTION = true;/' services/core/java/com/android/server/am/CachedAppOptimizer.java; #Enable app compaction by default (GrapheneOS)
|
||||
|
@ -115,7 +115,8 @@ patchWorkspace() {
|
||||
verifyAllPlatformTags;
|
||||
gpgVerifyGitHead "$DOS_BUILD_BASE/external/chromium-webview";
|
||||
|
||||
#source build/envsetup.sh;
|
||||
source build/envsetup.sh;
|
||||
repopick -i 350952; #SystemUI: Follow light/dark theme in SplitShade Header
|
||||
|
||||
sh "$DOS_SCRIPTS/Patch.sh";
|
||||
sh "$DOS_SCRIPTS_COMMON/Enable_Verity.sh";
|
||||
|
@ -170,7 +170,7 @@ fi;
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0020-Location_Indicators.patch"; #SystemUI: Use new privacy indicators for location (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0022-Ignore_StatementService_ANR.patch"; #Don't report statementservice crashes (GrapheneOS)
|
||||
#applyPatch "$DOS_PATCHES/android_frameworks_base/326692.patch"; #Skip screen on animation when wake and unlock via biometrics (jesec) #TODO: 20REBASE
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0023-Skip_Screen_Animation.patch"; #SystemUI: Skip screen-on animation in all scenarios (kdrag0n)
|
||||
#applyPatch "$DOS_PATCHES/android_frameworks_base/0023-Skip_Screen_Animation.patch"; #SystemUI: Skip screen-on animation in all scenarios (kdrag0n) #XXX: breaks notification backdrop
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0024-Burnin_Protection.patch"; #SystemUI: add burnIn protection (arter97)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0026-Crash_Details.patch"; #Add an option to show the details of an application error to the user (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0027-Installer_Glitch.patch"; #Make sure PackageInstaller UI returns a result (GrapheneOS)
|
||||
@ -184,6 +184,7 @@ applyPatch "$DOS_PATCHES/android_frameworks_base/0031-appops_reset_fix-2.patch";
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0032-SUPL_Toggle.patch"; #Add a setting for forcibly disabling SUPL (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0033-Ugly_Orbot_Workaround.patch"; #Always add Briar and Tor Browser to Orbot's lockdown allowlist (CalyxOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0034-Allow_Disabling_NTP.patch"; #Dont ping ntp server when nitz time update is toggled off (GrapheneOS)
|
||||
applyPatch "$DOS_PATCHES/android_frameworks_base/0035-System_JobScheduler_Allowance.patch"; #DeviceIdleJobsController: don't ignore whitelisted system apps (GrapheneOS)
|
||||
hardenLocationConf services/core/java/com/android/server/location/gnss/gps_debug.conf; #Harden the default GPS config
|
||||
sed -i 's/DEFAULT_USE_COMPACTION = false;/DEFAULT_USE_COMPACTION = true;/' services/core/java/com/android/server/am/CachedAppOptimizer.java; #Enable app compaction by default (GrapheneOS)
|
||||
sed -i 's/DEFAULT_MAX_FILES = 1000;/DEFAULT_MAX_FILES = 0;/' services/core/java/com/android/server/DropBoxManagerService.java; #Disable DropBox internal logging service
|
||||
|
Loading…
Reference in New Issue
Block a user