From 6e392ed17a2fbab086f719bf60579dccf353b9f7 Mon Sep 17 00:00:00 2001 From: Chad Brubaker Date: Wed, 22 Mar 2017 14:36:37 -0700 Subject: Expose ACTION_STORAGE_LOW and ACTION_STORAGE_OK to Instant Apps Instant Apps wont be started by these broadcasts, but if they're running it gives them a chance to be good citizens on the device and help out with a space crunch. Test: manual Bug: 33350280 Change-Id: I1700153b1c698a29e1e35535f64062544d071cab --- .../com/android/server/storage/DeviceStorageMonitorService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java b/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java index 0639eeed42e4..ba160bac650c 100644 --- a/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java +++ b/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java @@ -385,10 +385,12 @@ public class DeviceStorageMonitorService extends SystemService { mDataFileStats.getBlockSize(); mStorageLowIntent = new Intent(Intent.ACTION_DEVICE_STORAGE_LOW); mStorageLowIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT - | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); + | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND + | Intent.FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS); mStorageOkIntent = new Intent(Intent.ACTION_DEVICE_STORAGE_OK); mStorageOkIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT - | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); + | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND + | Intent.FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS); mStorageFullIntent = new Intent(Intent.ACTION_DEVICE_STORAGE_FULL); mStorageFullIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); mStorageNotFullIntent = new Intent(Intent.ACTION_DEVICE_STORAGE_NOT_FULL); -- cgit v1.2.3-59-g8ed1b