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

扁平化网站设计趋势大学生网页制作成品模板

扁平化网站设计趋势,大学生网页制作成品模板,广州一建筑外墙脚手架坍塌,wordpress我爱搜罗主题文章目录 堆栈打印跟踪Activity的启动过程(基于Android10.0.0-r41),framework修改,去除第三方app的倒计时页面1.打印异常堆栈2.去除第三方app的倒计时页面3.模拟点击事件跳过首页进入主页 堆栈打印跟踪Activity的启动过程(基于Android10.0.0-r41)&#x…

文章目录

  • 堆栈打印跟踪Activity的启动过程(基于Android10.0.0-r41),framework修改,去除第三方app的倒计时页面
    • 1.打印异常堆栈
    • 2.去除第三方app的倒计时页面
    • 3.模拟点击事件跳过首页进入主页

堆栈打印跟踪Activity的启动过程(基于Android10.0.0-r41),framework修改,去除第三方app的倒计时页面

1.打印异常堆栈

,查看Activity的onCreate如何回调的

        Log.i(TAG, "onCreate: ", new Exception());

在这里插入图片描述

编译

在这里插入图片描述

logcat -c清除日志缓存

logcat -s qfh过滤tag

在这里插入图片描述

在这里插入图片描述

跟踪堆栈调试发现,onCreate的回调大致从这里开始

在这里插入图片描述

走到这

在这里插入图片描述

往下走

在这里插入图片描述

那系统又是怎么调用handleLaunchActivity的?

系统Handler发消息以及处理消息

在这里插入图片描述

执行

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

从这里就能看出系统调用handleLaunchActivity的过程

2.去除第三方app的倒计时页面

查看位于最上层的activity,想办法去掉这个倒计时页面直接进入主页面

在这里插入图片描述

adb shell dumpsys activity activities | grep “Resumed”

查看最顶层

在这里插入图片描述

framework中修改,一般都是lanucher界面启动我们的第三方app

@Overridepublic void startActivity(Intent intent, @Nullable Bundle options) {//qfh addComponentName originCom = new ComponentName("com.example.myapplication2", "com.example.myapplication.WelcomeActivity");ComponentName targetCom = new ComponentName("com.example.myapplication2", "com.example.myapplication.MainActivity");if (intent.getComponent() != null && intent.getComponent().equals(originCom)) {intent.setComponent(targetCom);}//qfh endif (options != null) {startActivityForResult(intent, -1, options);} else {// Note we want to go through this call for compatibility with// applications that may have overridden the method.startActivityForResult(intent, -1);}}

在这里插入图片描述

这样就可以拦截我们想要拦截的Activity了

进到倒计时的下一个页面

在这里插入图片描述

3.模拟点击事件跳过首页进入主页

自定义一个方法处理点击按钮事件

@CallSuperprotected void onResume() {if (DEBUG_LIFECYCLE) Slog.v(TAG, "onResume " + this);dispatchActivityResumed();mActivityTransitionState.onResume(this);enableAutofillCompatibilityIfNeeded();if (mAutoFillResetNeeded) {if (!mAutoFillIgnoreFirstResumePause) {View focus = getCurrentFocus();if (focus != null && focus.canNotifyAutofillEnterExitEvent()) {// TODO: in Activity killed/recreated case, i.e. SessionLifecycleTest#// testDatasetVisibleWhileAutofilledAppIsLifecycled: the View's initial// window visibility after recreation is INVISIBLE in onResume() and next frame// ViewRootImpl.performTraversals() changes window visibility to VISIBLE.// So we cannot call View.notifyEnterOrExited() which will do nothing// when View.isVisibleToUser() is false.getAutofillManager().notifyViewEntered(focus);}}}notifyContentCaptureManagerIfNeeded(CONTENT_CAPTURE_RESUME);mCalled = true;//qfh addComponentName originCom = new ComponentName("com.example.myapplication2", "com.example.myapplication.TestWelcomeActivity");if (originCom.equals(getComponentName())){Log.i(TAG, "originCom.equals(getComponentName()) == true");mHandler.postDelayed(new Runnable() {@Overridepublic void run() {injectClick(420,52);}}, 1000);}//qfh end}

在这里插入图片描述

//qfh add //处理跳过按钮的坐标,模拟点击跳过广告页按钮private void injectClick(int x, int y) {MotionEvent downAction = MotionEvent.obtain(android.os.SystemClock.uptimeMillis(),android.os.SystemClock.uptimeMillis(), MotionEvent.ACTION_DOWN, x, y, 0);dispatchTouchEvent(downAction);MotionEvent upAction = MotionEvent.obtain(android.os.SystemClock.uptimeMillis(),android.os.SystemClock.uptimeMillis(), MotionEvent.ACTION_UP, x, y, 0);mHandler.postDelayed(new Runnable() {@Overridepublic void run() {Log.i(TAG, "injectClick");dispatchTouchEvent(upAction);}},100);}//qfh end

注入一个点击事件

在这里插入图片描述

这样模拟点击事件跳过也可以的

http://www.fp688.cn/news/144473.html

相关文章:

  • 电子商务网站开发杭州seo网站建设
  • 广东h5网站建设域名交易域名出售
  • pandorabox做网站青岛网站seo诊断
  • 数码设计网站软文发布网站
  • 怎样给网站做流量精灵官网
  • 短信群发网站sms ch关键词优化精灵
  • 北京网站建设最好公司如何快速推广网站
  • 网络推广专员招聘网站优化方案案例
  • wordpress登录主题seo优化实训报告
  • 简单的网站首页培训课
  • 北京市建设工程信息网站怎样宣传自己的品牌
  • 站群网站内容sem搜索引擎
  • 网站设计制作的价格低廉网络广告推广服务
  • 4399游戏盒下载官方网站桂林seo排名
  • 专门做dnf补丁的网站广州关键词优化外包
  • 鼓楼做网站价格营销推广平台
  • 西安印象网站建设龙岗seo优化
  • 阿里云1m 宽带做网站服务器百度正式员工工资待遇
  • 深圳网站制作公司报价搜索引擎营销的典型案例
  • 如何做网站支付链接企业关键词推广
  • 游戏排行榜页游百度seo搜索引擎优化方案
  • 如何在百度搜索到自己的网站今天的重要新闻
  • 聊城做网站网络公司微信指数怎么看
  • 衡水网站制作报价搜索引擎调词平台价格
  • 申通e物流的网站建设安卓优化大师hd
  • 页面设置上37cm如何提高seo关键词排名
  • 南通网站建设推广爱站网关键词查询工具
  • 做相册哪个网站好用宁德市高中阶段招生信息平台
  • 加工厂网站建设论文天津seo培训
  • 涿州是住房和城乡建设局网站今日小说排行榜百度搜索榜