From ff3f4d9493d66b034119f0ff15657c9e8cd1b1a8 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Sat, 22 Oct 2011 20:45:15 +0200 Subject: ANDROID: Fix plugins on Android 3.1+. Android 3.1 changed the default behaviour for broadcasts so that it doens't wake up non-running receivers, so we need to override that. --- backends/platform/android/org/inodes/gus/scummvm/Unpacker.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'backends/platform/android/org/inodes/gus/scummvm') diff --git a/backends/platform/android/org/inodes/gus/scummvm/Unpacker.java b/backends/platform/android/org/inodes/gus/scummvm/Unpacker.java index 8811b1f3ae..6cc7f8eadb 100644 --- a/backends/platform/android/org/inodes/gus/scummvm/Unpacker.java +++ b/backends/platform/android/org/inodes/gus/scummvm/Unpacker.java @@ -44,6 +44,9 @@ public class Unpacker extends Activity { private AsyncTask mUnpacker; private final static int REQUEST_MARKET = 1; + // Android 3.1+ only + public static final int FLAG_INCLUDE_STOPPED_PACKAGES = 32; + private static class UnpackJob { public ZipFile zipfile; public Set paths; @@ -273,6 +276,9 @@ public class Unpacker extends Activity { unpack_libs); Intent intent = new Intent(ScummVMApplication.ACTION_PLUGIN_QUERY); + // Android 3.1 defaults to FLAG_EXCLUDE_STOPPED_PACKAGES, and since + // none of our plugins will ever be running, that is not helpful + intent.setFlags(FLAG_INCLUDE_STOPPED_PACKAGES); sendOrderedBroadcast(intent, Manifest.permission.SCUMMVM_PLUGIN, new PluginBroadcastReciever(), null, RESULT_OK, null, extras); -- cgit v1.2.3