diff options
author | Dianne Hackborn <hackbod@google.com> | 2015-06-16 17:18:23 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2015-06-17 11:41:45 -0700 |
commit | a750a63d639f6936af456df904fa6b9ba941885e (patch) | |
tree | 41cd79aec0dedbf162eab2749bd6dec45bb7509d /test-runner/src/android/test/mock/MockContext.java | |
parent | f5820276635a2d3d2e3c694eddba7e6a02093a20 (diff) | |
download | frameworks_base-a750a63d639f6936af456df904fa6b9ba941885e.zip frameworks_base-a750a63d639f6936af456df904fa6b9ba941885e.tar.gz frameworks_base-a750a63d639f6936af456df904fa6b9ba941885e.tar.bz2 |
Fix issue #21814207 and issue #21814212 (alarm manager)
Issue #21814207: AlarmManager.setAndAllowWhileIdle should also allow wake locks.
Introduce a whole new infrastructure for providing options when
sending broadcasts, much like ActivityOptions. There is a single
option right now, asking the activity manager to apply a tempory
whitelist to each receiver of the broadcast.
Issue #21814212: Need to allow configuration of alarm manager parameters
The various alarm manager timing configurations are not modifiable
through settings, much like DeviceIdleController. Also did a few
tweaks in the existing DeviceIdleController impl.
Change-Id: Ifd01013185acc4de668617b1e46e78e30ebed041
Diffstat (limited to 'test-runner/src/android/test/mock/MockContext.java')
-rw-r--r-- | test-runner/src/android/test/mock/MockContext.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test-runner/src/android/test/mock/MockContext.java b/test-runner/src/android/test/mock/MockContext.java index 04ded9d..e5e3e44 100644 --- a/test-runner/src/android/test/mock/MockContext.java +++ b/test-runner/src/android/test/mock/MockContext.java @@ -16,6 +16,7 @@ package android.test.mock; +import android.annotation.SystemApi; import android.content.ComponentName; import android.content.ContentResolver; import android.content.Context; @@ -317,6 +318,13 @@ public class MockContext extends Context { } /** @hide */ + @SystemApi + @Override + public void sendBroadcast(Intent intent, String receiverPermission, Bundle options) { + throw new UnsupportedOperationException(); + } + + /** @hide */ @Override public void sendBroadcast(Intent intent, String receiverPermission, int appOp) { throw new UnsupportedOperationException(); @@ -336,6 +344,15 @@ public class MockContext extends Context { } /** @hide */ + @SystemApi + @Override + public void sendOrderedBroadcast(Intent intent, String receiverPermission, + Bundle options, BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData, + Bundle initialExtras) { + throw new UnsupportedOperationException(); + } + + /** @hide */ @Override public void sendOrderedBroadcast(Intent intent, String receiverPermission, int appOp, BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData, |