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

企业网站模块iis建好的网站套用模板

企业网站模块,iis建好的网站套用模板,网上在哪里注册公司,直播网站开发需要多少钱用来记录学习wms#xff0c;后续会一点一点更新。。。。。。 代码#xff1a;android14 WMS是在SystemServer进程中启动的 在SystemServer中的main方法中#xff0c;调用run方法。 private void run() { // Initialize native services.初始化服务#xff0c;加载andro…用来记录学习wms后续会一点一点更新。。。。。。 代码android14 WMS是在SystemServer进程中启动的 在SystemServer中的main方法中调用run方法。 private void run() { // Initialize native services.初始化服务加载android_servers so库 870 System.loadLibrary(android_servers); // Create the system service manager.创建SystemServiceManager 895 mSystemServiceManager new SystemServiceManager(mSystemContext);942 startOtherServices(t);//android14在startOtherServices中启动WindowManagerService android14中在startOtherServices中启动WindowManagerService 1606 wm WindowManagerService.main(context, inputManager, !mFirstBoot, 1607 new PhoneWindowManager(), mActivityManagerService.mActivityTaskManager);该代码执行了WMS的main方法会在内部创建一个WMS。其中有一个参数inputManager也是在startOtherServices中创建的如下。 1589 t.traceBegin(StartInputManagerService); 1590 inputManager new InputManagerService(context); 总结WMS的main方法在startOtherServices中而startOtherServices在SystemServer的run方法中运行在system_server线程中。 1608 ServiceManager.addService(Context.WINDOW_SERVICE, wm, /* allowIsolated */ false, 1609 DUMP_FLAG_PRIORITY_CRITICAL | DUMP_FLAG_PROTO); 1610 ServiceManager.addService(Context.INPUT_SERVICE, inputManager, 1611 /* allowIsolated */ false, DUMP_FLAG_PRIORITY_CRITICAL);上述代码将WMS和IMS注册到ServerManager中。 回到上述的WindowManagerService main中。 /frameworks/base/services/core/java/com/android/server/wm/WindowManagerService.java 1137 public static WindowManagerService main(final Context context, final InputManagerService im, 1138 final boolean showBootMsgs, WindowManagerPolicy policy, ActivityTaskManagerService atm, 1139 DisplayWindowSettingsProvider displayWindowSettingsProvider, 1140 SupplierSurfaceControl.Transaction transactionFactory, 1141 FunctionSurfaceSession, SurfaceControl.Builder surfaceControlFactory) { 1142 final WindowManagerService[] wms new WindowManagerService[1]; 1143 DisplayThread.getHandler().runWithScissors(() - 1144 wms[0] new WindowManagerService(context, im, showBootMsgs, policy, atm, 1145 displayWindowSettingsProvider, transactionFactory, 1146 surfaceControlFactory), 0); 1147 return wms[0]; 1148 }DisplayThread.getHandler().runWithScissors调用DisplayThread的getHandler方法获得DisplayThread的handler实例。 可以用来处理需要低延时显示的相关操作。 这张图可以清晰的了解到不管是applicationWindow还是SystemWindow都是由WindowManager和WMS处理。 addwindow public int addWindow(Session session, IWindow client, LayoutParams attrs, int viewVisibility, 1432 int displayId, int requestUserId, InsetsType int requestedVisibleTypes, 1433 InputChannel outInputChannel, InsetsState outInsetsState, 1434 InsetsSourceControl.Array outActiveControls, Rect outAttachedFrame, 1435 float[] outSizeCompatScale) {int res mPolicy.checkAddPermission(attrs.type, isRoundedCornerOverlay, attrs.packageName, 1441 appOp); 上述通过checkAddpermission方法来检测权限如果没有权限则不会执行后续代码。 1457 final DisplayContent displayContent getDisplayContentOrCreate(displayId, attrs.token);上述代码中有一个参数displayId,该参数获得窗口添加到哪个DisplayContent上。 if (displayContent null) { 1460 ProtoLog.w(WM_ERROR, Attempted to add window to a display that does 1461 not exist: %d. Aborting., displayId); 1462 return WindowManagerGlobal.ADD_INVALID_DISPLAY; 1463 }如果displatContent等于null则会返回一个ADD_INVALID_DISPLAY无效的状态类似的还有成功的状态这些状态都在WindowManagerGlobal中被定义。 if (type FIRST_SUB_WINDOW type LAST_SUB_WINDOW) { 1478 parentWindow windowForClientLocked(null, attrs.token, false); 1479 if (parentWindow null) { 1480 ProtoLog.w(WM_ERROR, Attempted to add window with token that is not a window: 1481 %s. Aborting., attrs.token); 1482 return WindowManagerGlobal.ADD_BAD_SUBWINDOW_TOKEN; 1483 }上述的一个判断type代码窗口类型它介于FIRST_SUB_WINDOW和LAST_SUB_WINDOW之间FIRST_SUB_WINDOW和LAST_SUB_WINDOW值定义在windowmanger中 通常Window有三种类型以及它们的值范围分别是 Application Window应用窗口 1-99 Sub Window子窗口1000-1999 System Window系统窗口2000-2999 所以上述可以看出上述窗口是一个子窗口。 1478 parentWindow windowForClientLocked(null, attrs.token, false); 看一下windowforclientLocked方法 6033 final WindowState windowForClientLocked(Session session, IWindow client, boolean throwOnError) { 6034 return windowForClientLocked(session, client.asBinder(), throwOnError); 6035 } 6036 6037 final WindowState windowForClientLocked(Session session, IBinder client, boolean throwOnError) { 6038 WindowState win mWindowMap.get(client); 6039 if (DEBUG) Slog.v(TAG_WM, Looking up client client : win); 6040 if (win null) { 6041 if (throwOnError) { 6042 throw new IllegalArgumentException( 6043 Requested window client does not exist); 6044 } 6045 ProtoLog.w(WM_ERROR, Failed looking up window session%s callers%s, session, 6046 Debug.getCallers(3)); 6047 return null; 6048 } 6049 if (session ! null win.mSession ! session) { 6050 if (throwOnError) { 6051 throw new IllegalArgumentException(Requested window client is in session 6052 win.mSession , not session); 6053 } 6054 ProtoLog.w(WM_ERROR, Failed looking up window session%s callers%s, session, 6055 Debug.getCallers(3)); 6056 return null; 6057 } 6058 6059 return win; 6060 }根据attrs.token作为key值从mWindowMap中得到该子窗口的父窗口如果win父类窗口等于null会返回错误。 WindowToken token displayContent.getWindowToken( 1525 hasParent ? parentWindow.mAttrs.token : attrs.token);通过displayContent的getWindowToken方法获得WindowToken if (token null) { 1535 if (!unprivilegedAppCanCreateTokenWith(parentWindow, callingUid, type, 1536 rootType, attrs.token, attrs.packageName)) { 1537 return WindowManagerGlobal.ADD_BAD_APP_TOKEN; 1538 }......1585 } else if (rootType TYPE_INPUT_METHOD) { 1586 if (token.windowType ! TYPE_INPUT_METHOD) { 1587 ProtoLog.w(WM_ERROR, Attempted to add input method window with bad token 1588 %s. Aborting., attrs.token); 1589 return WindowManagerGlobal.ADD_BAD_APP_TOKEN; 1590 }} else if (rootType TYPE_VOICE_INTERACTION) { 1592 if (token.windowType ! TYPE_VOICE_INTERACTION) { 1593 ProtoLog.w(WM_ERROR, Attempted to add voice interaction window with bad token 1594 %s. Aborting., attrs.token); 1595 return WindowManagerGlobal.ADD_BAD_APP_TOKEN; 1596 } 1597 } else if (rootType TYPE_WALLPAPER) { 1598 if (token.windowType ! TYPE_WALLPAPER) { 1599 ProtoLog.w(WM_ERROR, Attempted to add wallpaper window with bad token 1600 %s. Aborting., attrs.token); 1601 return WindowManagerGlobal.ADD_BAD_APP_TOKEN; 1602 } 1603 } else if (rootType TYPE_ACCESSIBILITY_OVERLAY) { 1604 if (token.windowType ! TYPE_ACCESSIBILITY_OVERLAY) { 1605 ProtoLog.w(WM_ERROR, 1606 Attempted to add Accessibility overlay window with bad token 1607 %s. Aborting., attrs.token); 1608 return WindowManagerGlobal.ADD_BAD_APP_TOKEN; 1609 }如果token为空则做些判断如果rootType等于TYPE_INPUT_METHOD等时会返回ADD_BAD_APP_TOKEN状态值。
http://wiki.neutronadmin.com/news/342259/

相关文章:

  • 个人网站当企业网站用榆林seo
  • 安阳360网站推广工具杭州公司网站
  • 深圳网络公司网站电话网站源码
  • 做网站关于我们做擦边球网站会不会违法呢
  • 通辽网站建设通辽郑州网站开发hndlwx
  • 网站图标按钮用什么做福州seo网站优化
  • 网站首页原型图怎么做红点设计官网
  • 潍坊市建设一体化平台网站wordpress主题等
  • 合肥专业网站优化哪家好临沂手机网站制作
  • 做网站的怎么赚钱杭州企业如何建网站
  • wordpress群站域名有限公司和责任公司的区别
  • 微商城网站建设东海县建设局网站
  • 网站做反向解析产品品牌推广公司
  • 高邮做网站wordpress saharan
  • 视频素材库网站免费企业解决方案网站
  • 做自己的第一个网站微信怎么做网站的动图
  • 金山网站建设关键词排名博客网站开发背景及作用
  • 国外 电商网站济南天桥区网站建设公司
  • 山东三强建设咨询有限公司网站专业的商城网站开发
  • 个人可以做几个网站吗郑州自助建站软件
  • wordpress免费网站模板给我免费的视频在线观看
  • 网站建设什么因素最重要肇庆网络
  • 网站建设公司 知道万维科技南宁网站建设哪家公司好
  • 营销网站建设技术沈阳做网站建设
  • 网站开发包wordpress投稿插件
  • 网站建设开发语言和使用工具用python做网站后台
  • 洛龙区网站制作建设费用wordpress 重定向
  • 树形菜单的网站代码易企秀怎么制作
  • 长沙网上房地产官网涟源seo快速排名
  • 苏州网站建设与网络推广创建国际网站