PackageManager check of isEphemeralDisabled causes a deadlock on Android 7.1 -
private boolean isephemeralallowed( intent intent, list<resolveinfo> resolvedactivities, int userid, boolean skippackagecheck) { // short circuit , return if possible. if (isephemeraldisabled()) { return false; } final int callinguser = userhandle.getcallinguserid(); if (callinguser != userhandle.user_system) { return false; } if (mephemeralresolverconnection == null) { return false; } if (intent.getcomponent() != null) { return false; } if ((intent.getflags() & intent.flag_ignore_ephemeral) != 0) { return false; } if (!skippackagecheck && intent.getpackage() != null) { return false; } final boolean isweburi = hasweburi(intent); private boolean isephemeraldisabled() { // ephemeral apps have been disabled across board if (disable_ephemeral_apps) { return true; } // system isn't yet; can't read settings, so, assume no ephemeral apps if (!msystemready) { return true; } // can't content resolver until system ready; these checks must happen last final contentresolver resolver = mcontext.getcontentresolver(); if (global.getint(resolver, global.enable_ephemeral_feature, 1) == 0) { return true; } return secure.getint(resolver, secure.web_action_enabled, 1) == 0; }
for android 7.0, disable_ephemeral_apps
default true
private static final boolean disable_ephemeral_apps = true;
but in android 7.1, google enabled instant apps support: https://android.googlesource.com/platform/frameworks/base.git/+/7ef97b6624054fff0d712d85336a45eee70bcc3f%5e%21/#f0
for isephemeralallowed
method, if call resolveintent
, of intents call isephemeralallowed
method, cause packagemanager service user binder call settingprovider, , probability cause deadlock.
Comments
Post a Comment