mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 20:17:49 +00:00
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.
This commit is contained in:
parent
245281cc55
commit
ff3f4d9493
@ -44,6 +44,9 @@ public class Unpacker extends Activity {
|
||||
private AsyncTask<String, Integer, Void> 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<String> 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);
|
||||
|
Loading…
Reference in New Issue
Block a user