当前位置: 首页 > news >正文

用什么自己做网站网站的推广有哪些方式

用什么自己做网站,网站的推广有哪些方式,网站更改公司需要重新备案吗,django的优点1、手机开机后,Android系统首先会创建一个Zygote(核心进程)。 2、由Zygote启动SystemServer。 3、SystemServer会启动系统运行所需的众多核心服务和普通服务、以及一些应用及数据。例如:SystemUI 启动就是从 SystemServer 里启动的…

1、手机开机后,Android系统首先会创建一个Zygote(核心进程)。
2、由Zygote启动SystemServer。
3、SystemServer会启动系统运行所需的众多核心服务和普通服务、以及一些应用及数据。例如:SystemUI 启动就是从 SystemServer 里启动的。
4、进入锁屏界面,开机完成。

SystemServer 中有一个 main()方法为系统服务的入口;
frameworks/base/services/java/com/android/server/SystemServer.java

    /*** The main entry point from zygote.*/public static void main(String[] args) {new SystemServer().run();}

在SystemServer 中的 main()方法中,就一句代码生成 SystemServer 对象,执行run 方法。在run()方法里启动了各类服务;
frameworks/base/services/java/com/android/server/SystemServer.java

private void run() {//省略部分代码// Start services.try {traceBeginAndSlog("StartServices");startBootstrapServices();startCoreServices();startOtherServices();    // 在该方法里启动了 SystemUI的服务。SystemServerInitThreadPool.shutdown();} catch (Throwable ex) {Slog.e("System", "******************************************");Slog.e("System", "************ Failure starting system services", ex);throw ex;} finally {traceEnd();}//省略部分代码
}
private void startOtherServices() {//省略部分代码t.traceBegin("StartSystemUI");try {startSystemUi(context, windowManagerF);} catch (Throwable e) {reportWtf("starting System UI", e);}t.traceEnd();//省略部分代码
}
private static void startSystemUi(Context context, WindowManagerService windowManager) {PackageManagerInternal pm = LocalServices.getService(PackageManagerInternal.class);Intent intent = new Intent();intent.setComponent(pm.getSystemUiServiceComponent());intent.addFlags(Intent.FLAG_DEBUG_TRIAGED_MISSING);//Slog.d(TAG, "Starting service: " + intent);context.startServiceAsUser(intent, UserHandle.SYSTEM);windowManager.onSystemUiStarted();}

SystemServer执行流程图:

SystemUi进入到SystemUIService的onCreate()方法里;在onCreate()方法中获得 SystemUIApplication 对象并调用其 startServicesIfNeeded() 方法
frameworks/base/packages/SystemUI/src/com/android/systemui/SystemUIService.java

    @Overridepublic void onCreate() {super.onCreate();// Start all of SystemUI((SystemUIApplication) getApplication()).startServicesIfNeeded();// 省略部分代码...}/*** Makes sure that all the SystemUI services are running. If they are already running, this is a* no-op. This is needed to conditinally start all the services, as we only need to have it in* the main process.* <p>This method must only be called from the main thread.</p>*/public void startServicesIfNeeded() {String[] names = getResources().getStringArray(R.array.config_systemUIServiceComponents);startServicesIfNeeded(names);}

在SystemUIApplication中查看startServicesIfNeeded() 方法,其中其中 config_systemUIServiceComponents 值在frameworks/base/packages/SystemUI/res/values/config.xml 里:
frameworks/base/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java

private void startServicesIfNeeded(String[] services) {if (mServicesStarted) {return;}mServices = new SystemUI[services.length];if (!mBootCompleted) {// check to see if maybe it was already completed long before we began// see ActivityManagerService.finishBooting()if ("1".equals(SystemProperties.get("sys.boot_completed"))) {mBootCompleted = true;if (DEBUG) Log.v(TAG, "BOOT_COMPLETED was already sent");}}Log.v(TAG, "Starting SystemUI services for user " +Process.myUserHandle().getIdentifier() + ".");TimingsTraceLog log = new TimingsTraceLog("SystemUIBootTiming",Trace.TRACE_TAG_APP);log.traceBegin("StartServices");final int N = services.length;for (int i = 0; i < N; i++) {String clsName = services[i];if (DEBUG) Log.d(TAG, "loading: " + clsName);log.traceBegin("StartServices" + clsName);long ti = System.currentTimeMillis();Class cls;try {cls = Class.forName(clsName);mServices[i] = (SystemUI) cls.newInstance();} catch(ClassNotFoundException ex){throw new RuntimeException(ex);} catch (IllegalAccessException ex) {throw new RuntimeException(ex);} catch (InstantiationException ex) {throw new RuntimeException(ex);}mServices[i].mContext = this;mServices[i].mComponents = mComponents;if (DEBUG) Log.d(TAG, "running: " + mServices[i]);mServices[i].start();log.traceEnd();//省略其他代码}
}

可以看到 startServicesIfNeeded() 循环 start 了config_systemUIServiceComponents 里的 Service,这些服务不是四大组件之一的 Service, 而是继承自 SystemUI 接口的服务,我们称之为 SystemUI服务。
到此SystemUI 启动流程分析完毕。

http://www.15wanjia.com/news/187857.html

相关文章:

  • 免费企业建站源代码上海建设工程管理网站
  • c 手机网模板网站自动做效果图的网站
  • 网站3d特效源码廊坊网络公司有哪些
  • 大型企业网站建设国内免费商用图片的网站
  • 郑州中森网站建设推广资源seo
  • 微信网页登录公司网站的seo优化怎么做
  • 看动漫是怎么做视频网站佛山网站快速排名提升
  • 湖北公司网站建设多少钱建设银行贷款网站
  • 黄岛做网站找哪家好WordPress免插件相册幻灯片
  • 做平面设计常用的网站网站空间大小多少合适
  • 做优秀企业网站app store切换账号
  • 网站安装源码免费咨询个税
  • 东城专业网站建设公司建设厅网站实名制系统如何解聘
  • 用模板做网站教程邢台专业网站建设源码
  • 静态网站举例wordpress主题英文改中文
  • 福州市高速公路建设指挥部网站爱ppt模板官网
  • 网站建设与运营公司主营业务收入与成本购物网站单页模板
  • 免费手机网站空间学前心理学课程建设网站
  • 北京html5网站建设官方网站拼多多
  • 网站建设备案信息wordpress 描述代码
  • 汕头站上海工商局企业查询
  • 泰州做兼职的网站如何做网站 知乎
  • 网站开发工作站长网站优化公司
  • 做网站的是不是程序员推56论坛
  • 网站做产品的审核工作怎么样品牌购物平台有哪些
  • wp建站模板网站项目推广方案
  • gzip压缩网站seo网站优化推广
  • 瑞丽网站建设wordpress用户密码表
  • 网站开发选题背景泰安房产网签成交数据
  • 京东的网站是哪家公司做广元网站建设优化