-> 其中通过Intent.ACTION_PRE_BOOT_COMPLETED找出相应的ResolveInfo list(可视为package list), 并对其中每一个package执行performBootDexOpt(), 优先处理相应的package(代码大致看了一下, 通过Installer中的socket connect到installd之后, 会执行从dex到ota的转换, 以满足Android ART对其的加载). -> mPackageManagerSe...
“android.intent.action.ANSWER” String BATTERY_CHANGED_ACTION 广播:充电状态,或者电池的电量发生变化。 “android.intent.action.BATTERY_CHANGED” String BOOT_COMPLETED_ACTION 广播:在系统启动后。这个动作被广播一次(只有一次)。“android.intent.action.BOOT_COMPLETED” String BROWSABLE_CATEGORY 类别:能够被浏览...
<action android:name="android.intent.action.PRE_BOOT_COMPLETED" /> <action android:name="com.android.setupwizard.action.PARTNER_CUSTOMIZATION" /> </intent-filter> </receiver> Java代码如下,没有实现任何具体功能,但必须要有声明: public class SetupReceiver extends BroadcastReceiver { @Override public ...
mDidUpdate) {// 第一次进入时mDidUpdate为false if (mWaitingUpdate) { return; } //【1】系统更新时,通知一些app更新数据(这些app只能是系统app) Intent intent = new Intent(Intent.ACTION_PRE_BOOT_COMPLETED); List<ResolveInfo> ris = null; try {//com.android.providers.contacts...
HOME 启动以后,ActivityManagerService 中 finishBooting 方法会发出 Intent.ACTION_BOOT_COMPLETED 广播,调用该方法的地方有很多,resume activity 的时候或者出错的时候, 调用一次以后就不再调用。 至此android 就完成了整个启动工作,整个流程可以用下图简洁表示: 标签: android 好文要顶 关注我 收藏该文 微信分享 ...
<intent-filter android:priority="1000"> <action android:name="com.anjoyo.receiver"/> </intent-filter> 注意: 1. 每次系统广播(Broadcast)事件发生后,系统就会创建对应的BroadcastReceiver实例,并自动触发它的onReceive()方法,onReceive()方法执行完后,BroadcastReceiver的实例就会被销毁。
//如果有 ACTION_PRE_BOOT_COMPLETED,在处理完广播 receive 以后 ,还会再次走 systemRead(goingCallback) systemReady(goingCallback); } }); } }; } Slog.i(TAG, "Sending system update to: " + intent.getComponent()); broadcastIntentLocked(null, null, intent, null, finisher, 0, null, null, nu...
<action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="android.intent.action.SCREEN_ON" /> <category android:name="android.intent.category.HOME" /> </intent-filter></receiver> 使用设备管理权限的类名为Aa,下面的摘录也是从Manifest文件中提取的。
android:name=".mXRReceiver" > //用于系统启动完成时,接收系统发送的广播 <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> </intent-filter> </receiver> class MyReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { ......
//静态注册<receiver android:name=".MyBroadcastReceiver"><intent-filter><action android:name="android.net.conn.CONNECTIVITY_CHANGE"/></intent-filter><intent-filter><action android:name="android.intent.action.BOOT_COMPLETED"/></intent-filter></receiver>//动态注册mBroadcastReceiver=newMyBroadcastReceiv...