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

怎样做销售产品网站2021年关键词排名

怎样做销售产品网站,2021年关键词排名,游戏代理是什么,个人写真与艺术照的区别在哪之前的文章Android11 framework 禁止三方应用开机自启动记录了我调试Android11应用自启动限制的全过程,但是之前的方案感觉还能再研究,所以有了这一篇文章。 这一篇文章主要探讨Android11上,以广播来进行自启动的应用的限制,极个别…

之前的文章Android11 framework 禁止三方应用开机自启动记录了我调试Android11应用自启动限制的全过程,但是之前的方案感觉还能再研究,所以有了这一篇文章。

这一篇文章主要探讨Android11上,以广播来进行自启动的应用的限制,极个别用provider实现自启动的应用方案(点名批评we信),我现在暂时还没有研究学习
针对使用广播启动的三方应用,在frameworks\base\services\core\java\com\android\server\am\BroadcastQueue.java​中处理显然是最好的

打开log使能

Line 994: 07-22 11:53:16.576062   927  1375 V BroadcastQueue: Need to start app [background] com.tencent.mobileqq:MSF for broadcast BroadcastRecord{589f6ea u0 android.intent.action.MEDIA_MOUNTED}
Line 1009: 07-22 11:53:17.448550   927  1020 V BroadcastQueue: Need to start app [background] com.tencent.mobileqq:MSF for broadcast BroadcastRecord{589f6ea u0 android.intent.action.MEDIA_MOUNTED}
Line 1021: 07-22 11:53:17.557622   927  1020 V BroadcastQueue: Need to start app [background] com.tencent.mobileqq:MSF for broadcast BroadcastRecord{589f6ea u0 android.intent.action.MEDIA_MOUNTED}
Line 1032: 07-22 11:53:17.628812   927  1020 V BroadcastQueue: Need to start app [background] com.tencent.mobileqq:MSF for broadcast BroadcastRecord{589f6ea u0 android.intent.action.MEDIA_MOUNTED}
Line 1043: 07-22 11:53:18.747292   927  1020 V BroadcastQueue: Need to start app [background] com.tencent.mobileqq:MSF for broadcast BroadcastRecord{589f6ea u0 android.intent.action.MEDIA_MOUNTED}
Line 1054: 07-22 11:53:20.220532   927  1020 V BroadcastQueue: Need to start app [background] com.tencent.mobileqq:MSF for broadcast BroadcastRecord{589f6ea u0 android.intent.action.MEDIA_MOUNTED}
Line 1065: 07-22 11:53:20.472164   927  1020 V BroadcastQueue: Need to start app [background] com.tencent.mobileqq:MSF for broadcast BroadcastRecord{589f6ea u0 android.intent.action.MEDIA_MOUNTED}
Line 1128: 07-22 11:53:25.226399   927  1020 V BroadcastQueue: Need to start app [background] com.tencent.mobileqq:MSF for broadcast BroadcastRecord{589f6ea u0 android.intent.action.MEDIA_MOUNTED}
Line 1205: 07-22 11:54:25.350290   927  1592 V BroadcastQueue: Need to start app [background] com.tencent.mobileqq:MSF for broadcast BroadcastRecord{a42c9c1 u0 android.intent.action.MEDIA_MOUNTED}
Line 1219: 07-22 11:54:25.950266   927  1020 V BroadcastQueue: Need to start app [background] com.tencent.mobileqq:MSF for broadcast BroadcastRecord{a42c9c1 u0 android.intent.action.MEDIA_MOUNTED}
Line 1230: 07-22 11:54:26.005805   927  1020 V BroadcastQueue: Need to start app [background] com.tencent.mobileqq:MSF for broadcast BroadcastRecord{a42c9c1 u0 android.intent.action.MEDIA_MOUNTED}
Line 1253: 07-22 11:54:53.461909   927  1020 V BroadcastQueue: Need to start app [background] com.tencent.mobileqq:MSF for broadcast BroadcastRecord{a42c9c1 u0 android.intent.action.MEDIA_MOUNTED}
Line 1308: 07-22 11:54:53.505324   927  1020 V BroadcastQueue: Need to start app [background] com.tencent.mobileqq:MSF for broadcast BroadcastRecord{a42c9c1 u0 android.intent.action.MEDIA_MOUNTED}
Line 1323: 07-22 11:54:56.521321   927  1020 V BroadcastQueue: Need to start app [background] com.tencent.mobileqq:MSF for broadcast BroadcastRecord{a42c9c1 u0 android.intent.action.MEDIA_MOUNTED}

能看到很多条Need to start app​,找到打印log的地方

final void processNextBroadcastLocked(boolean fromMsg, boolean skipOomAdj) {BroadcastRecord r;...if (DEBUG_BROADCAST)  Slog.v(TAG_BROADCAST,"Need to start app ["

思考:这里的log打印能拿到进程名,以及监听的广播,且从log看,这里就是管理是否启动的。如果从这里拦截,能让监听此广播的应用不执行启动逻辑,比上一篇文章单纯的不让执行任何逻辑合理

修改思路,非系统应用禁止通过ACTION_MEDIA_MOUNTED​和ACTION_BOOT_COMPLETED​两个广播进行启动,退出逻辑需要走原生的流程,不能直接return,修改方案如下:

diff --git a/frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java b/frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java
index b6afd4a82d..d6b9a3328c 100644
--- a/frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java
+++ b/frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java
@@ -33,6 +33,7 @@ import android.content.IIntentSender;import android.content.Intent;import android.content.IntentSender;import android.content.pm.ActivityInfo;
+import android.content.pm.ApplicationInfo;import android.content.pm.PackageManager;import android.content.pm.PermissionInfo;import android.content.pm.ResolveInfo;
@@ -70,6 +71,7 @@ import java.util.Set;* offload special broadcasts that we know take a long time, such as BOOT_COMPLETED.*/public final class BroadcastQueue {
+    private boolean DEBUG_BROADCAST = true;private static final String TAG = "BroadcastQueue";private static final String TAG_MU = TAG + POSTFIX_MU;private static final String TAG_BROADCAST = TAG + POSTFIX_BROADCAST;
@@ -1648,11 +1650,18 @@ public final class BroadcastQueue {// restart the application.}+        boolean isSystem = (info.activityInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0;
+        boolean isAllow = true;
+        if (!isSystem &&
+            (r.intent.toString().contains(Intent.ACTION_MEDIA_MOUNTED)
+                || r.intent.toString().contains(Intent.ACTION_BOOT_COMPLETED))) {
+            isAllow = false;
+        }// Not running -- get it started, to be executed when the app comes up.if (DEBUG_BROADCAST)  Slog.v(TAG_BROADCAST,"Need to start app ["
-                + mQueueName + "] " + targetProcess + " for broadcast " + r);
-        if ((r.curApp=mService.startProcessLocked(targetProcess,
+                + mQueueName + "] " + targetProcess + " for broadcast " + r + ", isSystem= " + isSystem + ", allow= " + isAllow);
+        if (!isAllow || (r.curApp=mService.startProcessLocked(targetProcess,info.activityInfo.applicationInfo, true,r.intent.getFlags() | Intent.FLAG_FROM_BACKGROUND,new HostingRecord("broadcast", r.curComponent),...r.state = BroadcastRecord.IDLE;return;}

一样的,判断是否允许isAllow​然后走原生的退出逻辑

这样可以让三方应用不通过ACTION_MEDIA_MOUNTED​和ACTION_BOOT_COMPLETED​两个广播进行启动动作。

生效log如下:

07-22 16:07:38.243585   895  1467 V BroadcastQueue: Need to start app [background] com.tencent.mobileqq:MSF for broadcast BroadcastRecord{228d228 u0 android.intent.action.MEDIA_MOUNTED}, isSystem= false, allow= false
07-22 16:07:38.243633   895  1467 W BroadcastQueue: Unable to launch app com.tencent.mobileqq/10110 for broadcast Intent { act=android.intent.action.MEDIA_MOUNTED dat=file:///storage/emulated/0 flg=0x5000010 (has extras) }: process is bad07-22 16:25:04.107345   909  1515 V BroadcastQueue: Need to start app [background] com.example.test111 for broadcast BroadcastRecord{e84020c u0 android.intent.action.BOOT_COMPLETED}, isSystem= false, allow= false
07-22 16:25:04.107448   909  1515 W BroadcastQueue: Unable to launch app com.example.test111/10115 for broadcast Intent { act=android.intent.action.BOOT_COMPLETED flg=0x89000010 (has extras) }: process is bad

注意:广播类型的启动能防得住,但是有部分app可能不仅仅通过广播,还通过provider执行自启动,这类的我暂时还没研究


文章转载自:
http://dinncoexhibition.ssfq.cn
http://dinncopaediatrician.ssfq.cn
http://dinncounscratched.ssfq.cn
http://dinncoameer.ssfq.cn
http://dinncoferocity.ssfq.cn
http://dinncointercessor.ssfq.cn
http://dinncobarlow.ssfq.cn
http://dinncomicrocrystal.ssfq.cn
http://dinncoyuletime.ssfq.cn
http://dinncoamnicolous.ssfq.cn
http://dinncolykewake.ssfq.cn
http://dinncodroningly.ssfq.cn
http://dinncolithoscope.ssfq.cn
http://dinncooptimize.ssfq.cn
http://dinncogele.ssfq.cn
http://dinncoassignable.ssfq.cn
http://dinncoeriophyllous.ssfq.cn
http://dinncooutisland.ssfq.cn
http://dinncosunshiny.ssfq.cn
http://dinncoburg.ssfq.cn
http://dinncosafely.ssfq.cn
http://dinncospirket.ssfq.cn
http://dinncocay.ssfq.cn
http://dinncolasthome.ssfq.cn
http://dinncoredecorate.ssfq.cn
http://dinncobullboat.ssfq.cn
http://dinnconiobium.ssfq.cn
http://dinncomagpie.ssfq.cn
http://dinncoeuhemerism.ssfq.cn
http://dinncobotanist.ssfq.cn
http://dinncopiece.ssfq.cn
http://dinncoblackguardly.ssfq.cn
http://dinncofractus.ssfq.cn
http://dinncoogam.ssfq.cn
http://dinncoensepulchre.ssfq.cn
http://dinncomph.ssfq.cn
http://dinncoapropos.ssfq.cn
http://dinncosatrap.ssfq.cn
http://dinncoduppy.ssfq.cn
http://dinncohordein.ssfq.cn
http://dinncoinattention.ssfq.cn
http://dinncogeneralization.ssfq.cn
http://dinncotheosophism.ssfq.cn
http://dinncocarrollian.ssfq.cn
http://dinncohindi.ssfq.cn
http://dinncoferryboat.ssfq.cn
http://dinncoisochron.ssfq.cn
http://dinncojointress.ssfq.cn
http://dinncoreportable.ssfq.cn
http://dinncomitteleuropa.ssfq.cn
http://dinncocrimpy.ssfq.cn
http://dinncopolluting.ssfq.cn
http://dinncoexoskeleton.ssfq.cn
http://dinncoequiaxed.ssfq.cn
http://dinncogemeinschaft.ssfq.cn
http://dinncounhandsome.ssfq.cn
http://dinncophotocatalysis.ssfq.cn
http://dinncomistreat.ssfq.cn
http://dinncomotherwort.ssfq.cn
http://dinncohypoxemic.ssfq.cn
http://dinnconaughtily.ssfq.cn
http://dinncorectangularity.ssfq.cn
http://dinnconotitia.ssfq.cn
http://dinncovamper.ssfq.cn
http://dinncohoneysweet.ssfq.cn
http://dinncounpc.ssfq.cn
http://dinncosemiglobe.ssfq.cn
http://dinncolabiate.ssfq.cn
http://dinncovsf.ssfq.cn
http://dinncoclonism.ssfq.cn
http://dinncohumiliator.ssfq.cn
http://dinncosforzato.ssfq.cn
http://dinncokhurta.ssfq.cn
http://dinncobuilding.ssfq.cn
http://dinncometainfective.ssfq.cn
http://dinncodomicile.ssfq.cn
http://dinncobenorth.ssfq.cn
http://dinncospectrometer.ssfq.cn
http://dinncooutstation.ssfq.cn
http://dinncocounterplan.ssfq.cn
http://dinncorepeople.ssfq.cn
http://dinncoepisteme.ssfq.cn
http://dinncotramp.ssfq.cn
http://dinncochitter.ssfq.cn
http://dinncotryparsamide.ssfq.cn
http://dinncoappease.ssfq.cn
http://dinncointentional.ssfq.cn
http://dinncocupula.ssfq.cn
http://dinncopersorption.ssfq.cn
http://dinncogulden.ssfq.cn
http://dinncopneumolysis.ssfq.cn
http://dinncogummite.ssfq.cn
http://dinncopolyvinyl.ssfq.cn
http://dinncophos.ssfq.cn
http://dinncoclipping.ssfq.cn
http://dinncoinorb.ssfq.cn
http://dinncogauchist.ssfq.cn
http://dinncoinfluenza.ssfq.cn
http://dinncocardiophobia.ssfq.cn
http://dinncopersonally.ssfq.cn
http://www.dinnco.com/news/95191.html

相关文章:

  • 上海人才网官网电话如何优化推广中的关键词
  • 企业做网站的流程网络营销课程学什么
  • 教做3d的网站网站运营推广的方法有哪些
  • 电商网站首页设计规范网站快速优化排名
  • 网站有什么功能企业网站模板设计
  • 做一个动态网站要多少钱足球世界积分榜
  • 青岛网站建设订做成都网站关键词推广优化
  • 自己做购物网站需要什么如何注册域名网站
  • 广东的网站建设百度推广登陆入口官网
  • 绵阳市 网站建设百seo排名优化
  • 周末游做的好的网站it培训班真的有用吗
  • 常熟有没有做网站的上海seo优化公司 kinglink
  • 第一次做网站怎么样下手注册网站需要多少钱?
  • 支持快钱支付的网站seo产品是什么意思
  • 浅谈高校图书馆网站建设网站建设知名公司
  • 长安商城网站建设百度seo排名原理
  • 黄山购物网站建设教育培训网站官网
  • 微信公众号微网站建设惠州seo收费
  • 地方门户网站发展趋势怎么在百度做免费推广
  • 哈尔滨做网站的百度快速优化推广
  • 环球影城周六人多还是周日人多seo 的作用和意义
  • 给企业做网站贵阳网站建设制作
  • 做网站的问题成都seo优化公司排名
  • 订阅号做影视网站文案代写
  • 天津高端网站建设湖南网站营销推广
  • 品牌网站建设开发价格手游推广去哪里找客源
  • 内容营销案例分析怎样优化网络
  • 品牌网站建设磐石网络优等口碑营销案例及分析
  • 黄山公司做网站广州aso优化公司 有限公司
  • 做网站要学c语言百度推广产品