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

免费的旅游网站模板做网站公司价格

免费的旅游网站模板,做网站公司价格,农产品网络营销策划方案,做网站有几种语言文章目录 堆栈打印跟踪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.yayakq.cn/news/584173/

相关文章:

  • 朝青板块网站建设怎样做自己的网站
  • 汽车网站建设流程追设计网站
  • 用ps做的网站样图怎么切国际精品互联网专线
  • html网页制作网站莱芜公交网站
  • 宜春做网站的知乎推广合作
  • 机械手表网站市场调研公司有哪些
  • 阜宁建设网站的公司黄冈网站建设哪家便宜
  • 长春公司网站推广扬州百度seo
  • 电商网站建设心得体会遵义你想网
  • 台州企业网站排名优化网站模板开发主要作用
  • 网站首页背景图片百度推广方案怎么写
  • 网站做文献格式wordpress缩略图加边框
  • 做一个网站推广网上信息发布平台
  • 跟犀牛云一样做网站的北京网站建设价格行情
  • 建设网站自学天长企业网站制作
  • 做app的模板下载网站平邑网站制作
  • 网站怎么做留言提交功能wordpress电子书与公众号
  • 山东网站建设费用南京做网站外包
  • 网站建设员的薪水湘潭建设公司网站
  • 深圳市城乡建设局网站建筑公司网站源码开源
  • 免费数据统计网站wordpress 红包广告
  • 投票网站制作免费h5制作模板免费版
  • icp备案网站信息查询广告公司首页
  • 怎么做中英文的网站网站建设公司深圳
  • 唐兴数码网站怎么免费创建百度网站
  • 做网站台式还是笔记本国外优惠卷网站如何做
  • 在线建设网站 源代码做网站销售好做吗
  • 上海企业建设网站价格腾讯云免费域名申请
  • 电子商务网站建设具体方案今天刚刚最新消息2023
  • 做企业网站需要准备什么资料织梦网站优化教程