Send app restrictions broadcast to stopped apps as well

Otherwise the restrictions won't be shown for apps that haven't been
launched yet.

Bug: 8577600
Change-Id: I1d0d93553456dfedfb749e3d8262911af4362a80
This commit is contained in:
Amith Yamasani
2013-04-09 11:05:18 -07:00
parent 645e78d806
commit 872d4fba77

View File

@@ -425,6 +425,7 @@ public class AppRestrictionsFragment extends SettingsPreferenceFragment implemen
intent.setPackage(packageName); intent.setPackage(packageName);
intent.putParcelableArrayListExtra(Intent.EXTRA_RESTRICTIONS, intent.putParcelableArrayListExtra(Intent.EXTRA_RESTRICTIONS,
new ArrayList<RestrictionEntry>(oldEntries)); new ArrayList<RestrictionEntry>(oldEntries));
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
getActivity().sendOrderedBroadcast(intent, null, getActivity().sendOrderedBroadcast(intent, null,
new RestrictionsResultReceiver(packageName, preference), new RestrictionsResultReceiver(packageName, preference),
null, Activity.RESULT_OK, null, null); null, Activity.RESULT_OK, null, null);