不能让三方应用接收到开机完成广播
frameworks/base / services/core/java/com/android/server/am/BroadcastQueue.java
final void processNextBroadcast(boolean fromMsg) {
if (brOptions != null &&
(info.activityInfo.applicationInfo.targetSdkVersion
< brOptions.getMinManifestReceiverApiLevel() ||
info.activityInfo.applicationInfo.targetSdkVersion
> brOptions.getMaxManifestReceiverApiLevel())
//#ifedf LAVA_EDIT
//pfl add allow lava fota receive broadcast
&&(!"com.android.softwareupdateclient".equals(info.activityInfo.packageName))
//#endif
) {
Slog.w(TAG, "skip because api level not support");
skip = true;
}
//#ifedf 1
//test add avoid third part app auto start
if(!skip){
if(r.intent!=null&&r.intent.getAction()!=null&&r.intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {
if((info.activityInfo.applicationInfo.flags & android.content.pm.ApplicationInfo.FLAG_SYSTEM)==0){
Slog.w(TAG, "skip because ACTION_BOOT_COMPLETED will not send to third part app :"+info.activityInfo.packageName);
skip = true;
}
}
}
//#endif