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

16岁0元开网店赚钱软件seo优化搜索结果

16岁0元开网店赚钱软件,seo优化搜索结果,视频做网站背景,网站加支付功能需求 CTA入网认证,要求低版本比如Android6以下的应用,运行时,也需要有运行时权限(Runtime Permission)功能,不能默认就取到权限,必须人工在设置中打开才可。 环境 Android 8 实现 frameworks 修改思路是所有APP都…

需求

CTA入网认证,要求低版本比如Android6以下的应用,运行时,也需要有运行时权限(Runtime Permission)功能,不能默认就取到权限,必须人工在设置中打开才可。

环境

Android 8

实现

frameworks
修改思路是所有APP都统一处理,支持运行时权限,
把所有版本相关的判断去掉,检测是否支持运行时权限的判断去掉。

diff --git a/base/services/core/java/com/android/server/pm/PackageInstallerService.java b/base/services/core/java/com/android/server/pm/PackageInstallerService.java
index 1fa37b91..3a3433c9 100644
--- a/base/services/core/java/com/android/server/pm/PackageInstallerService.java
+++ b/base/services/core/java/com/android/server/pm/PackageInstallerService.java
@@ -436,6 +436,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub {params.installFlags |= PackageManager.INSTALL_FROM_ADB;} else {
+            mAppOps = mContext.getSystemService(AppOpsManager.class);mAppOps.checkPackage(callingUid, installerPackageName);params.installFlags &= ~PackageManager.INSTALL_FROM_ADB;
@@ -705,6 +706,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub {@Overridepublic ParceledListSlice<SessionInfo> getMySessions(String installerPackageName, int userId) {mPm.enforceCrossUserPermission(Binder.getCallingUid(), userId, true, false, "getMySessions");
+        mAppOps = mContext.getSystemService(AppOpsManager.class);mAppOps.checkPackage(Binder.getCallingUid(), installerPackageName);final List<SessionInfo> result = new ArrayList<>();
diff --git a/base/services/core/java/com/android/server/pm/PackageManagerService.java b/base/services/core/java/com/android/server/pm/PackageManagerService.java
index aa43008b..5f0f66a4 100644
--- a/base/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/base/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -2279,8 +2279,9 @@ public class PackageManagerService extends PackageManagerServiceExAbsfinal int immutableFlags = PackageManager.FLAG_PERMISSION_SYSTEM_FIXED| PackageManager.FLAG_PERMISSION_POLICY_FIXED;-        final boolean supportsRuntimePermissions = pkg.applicationInfo.targetSdkVersion
-                >= Build.VERSION_CODES.M;
+        //final boolean supportsRuntimePermissions = pkg.applicationInfo.targetSdkVersion
+                //>= Build.VERSION_CODES.M;
+        final boolean supportsRuntimePermissions = false;final boolean instantApp = isInstantApp(pkg.packageName, userId);@@ -5884,7 +5885,6 @@ public class PackageManagerService extends PackageManagerServiceExAbs// to keep the review required permission flag per user while an// install permission's state is shared across all users.if (mPermissionReviewRequired
-                    && pkg.applicationInfo.targetSdkVersion < Build.VERSION_CODES.M&& bp.isRuntime()) {return;}
@@ -5918,10 +5918,10 @@ public class PackageManagerService extends PackageManagerServiceExAbs+ name + " for package " + packageName);}-            if (pkg.applicationInfo.targetSdkVersion < Build.VERSION_CODES.M) {
-                Slog.w(TAG, "Cannot grant runtime permission to a legacy app");
-                return;
-            }
+            //if (pkg.applicationInfo.targetSdkVersion < Build.VERSION_CODES.M) {
+                //Slog.w(TAG, "Cannot grant runtime permission to a legacy app");
+                //return;
+            //}final int result = permissionsState.grantRuntimePermission(bp, userId);switch (result) {
@@ -6021,7 +6021,7 @@ public class PackageManagerService extends PackageManagerServiceExAbs// to keep the review required permission flag per user while an// install permission's state is shared across all users.if (mPermissionReviewRequired
-                    && pkg.applicationInfo.targetSdkVersion < Build.VERSION_CODES.M
+                    //&& pkg.applicationInfo.targetSdkVersion < Build.VERSION_CODES.M&& bp.isRuntime()) {return;}
@@ -13615,8 +13615,7 @@ public class PackageManagerService extends PackageManagerServiceExAbsfor (int i=0; i<N; i++) {final String name = pkg.requestedPermissions.get(i);final BasePermission bp = mSettings.mPermissions.get(name);
-            final boolean appSupportsRuntimePermissions = pkg.applicationInfo.targetSdkVersion
-                    >= Build.VERSION_CODES.M;
+            final boolean appSupportsRuntimePermissions = false;if (DEBUG_INSTALL) {Log.i(TAG, "Package " + pkg.packageName + " checking " + name + ": " + bp);
@@ -13676,10 +13675,7 @@ public class PackageManagerService extends PackageManagerServiceExAbs// their permissions as always granted runtime ones since we need// to keep the review required permission flag per user while an// install permission's state is shared across all users.
-                    if (!appSupportsRuntimePermissions && !mPermissionReviewRequired) {
-                        // For legacy apps dangerous permissions are install time ones.
-                        grant = GRANT_INSTALL;
-                    } else if (origPermissions.hasInstallPermission(bp.name)) {
+                    if (origPermissions.hasInstallPermission(bp.name)) {// For legacy apps that became modern, install becomes runtime.grant = GRANT_UPGRADE;} else if (mPromoteSystemApps
@@ -14023,14 +14019,6 @@ public class PackageManagerService extends PackageManagerServiceExAbs}}if (!allowed) {
-            if (!allowed && (bp.protectionLevel
-                    & PermissionInfo.PROTECTION_FLAG_PRE23) != 0
-                    && pkg.applicationInfo.targetSdkVersion < Build.VERSION_CODES.M) {
-                // If this was a previously normal/dangerous permission that got moved
-                // to a system permission as part of the runtime permission redesign, then
-                // we still want to blindly grant it to old apps.
-                allowed = true;
-            }if (!allowed && (bp.protectionLevel & PermissionInfo.PROTECTION_FLAG_INSTALLER) != 0&& pkg.packageName.equals(mRequiredInstallerPackage)) {// If this permission is to be granted to the system installer and
@@ -21325,8 +21313,7 @@ public class PackageManagerService extends PackageManagerServiceExAbs// If permission review is enabled and this is a legacy app, mark the// permission as requiring a review as this is the initial state.int flags = 0;
-            if (mPermissionReviewRequired
-                    && ps.pkg.applicationInfo.targetSdkVersion < Build.VERSION_CODES.M) {
+            if (mPermissionReviewRequired) {flags |= FLAG_PERMISSION_REVIEW_REQUIRED;}if (permissionsState.updatePermissionFlags(bp, userId, userSettableMask, flags)) {
@@ -26124,9 +26111,9 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());}// Permission review applies only to apps not supporting the new permission model.
-                if (packageSetting.pkg.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.M) {
-                    return false;
-                }
+                //if (packageSetting.pkg.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.M) {
+                    //return false;
+                //}// Legacy apps have the permission and get user consent on launch.PermissionsState permissionsState = packageSetting.getPermissionsState();

作者:帅得不敢出门 原创文章谢绝转载


文章转载自:
http://gametogeny.c7512.cn
http://ruth.c7512.cn
http://afeard.c7512.cn
http://lameness.c7512.cn
http://ratbaggery.c7512.cn
http://diaper.c7512.cn
http://archimandrite.c7512.cn
http://stigmatize.c7512.cn
http://piazza.c7512.cn
http://necrologist.c7512.cn
http://sunkissed.c7512.cn
http://bloody.c7512.cn
http://openhearted.c7512.cn
http://blowlamp.c7512.cn
http://four.c7512.cn
http://triplicity.c7512.cn
http://amylopsin.c7512.cn
http://coupon.c7512.cn
http://archean.c7512.cn
http://oddish.c7512.cn
http://curvicostate.c7512.cn
http://gamb.c7512.cn
http://enjail.c7512.cn
http://quiescency.c7512.cn
http://physiognomist.c7512.cn
http://tenebrescence.c7512.cn
http://eaglewood.c7512.cn
http://melkite.c7512.cn
http://verbid.c7512.cn
http://uptime.c7512.cn
http://unwooed.c7512.cn
http://urbane.c7512.cn
http://silverbeater.c7512.cn
http://gingerade.c7512.cn
http://remuneration.c7512.cn
http://aminotransferase.c7512.cn
http://bimetallist.c7512.cn
http://glomerate.c7512.cn
http://ferrovanadium.c7512.cn
http://landscapist.c7512.cn
http://schematic.c7512.cn
http://twelfthtide.c7512.cn
http://lady.c7512.cn
http://cruelhearted.c7512.cn
http://substantify.c7512.cn
http://speedboat.c7512.cn
http://hellenist.c7512.cn
http://ruffianize.c7512.cn
http://tricontinental.c7512.cn
http://expiration.c7512.cn
http://aerophore.c7512.cn
http://amnesia.c7512.cn
http://kingly.c7512.cn
http://haecceity.c7512.cn
http://therewithal.c7512.cn
http://gaggery.c7512.cn
http://keratin.c7512.cn
http://rehospitalization.c7512.cn
http://wronghead.c7512.cn
http://substantiation.c7512.cn
http://micros.c7512.cn
http://settling.c7512.cn
http://decharge.c7512.cn
http://tunnel.c7512.cn
http://brawny.c7512.cn
http://beidaihe.c7512.cn
http://plagiocephalic.c7512.cn
http://deadfall.c7512.cn
http://erin.c7512.cn
http://folkland.c7512.cn
http://anuresis.c7512.cn
http://tetraxile.c7512.cn
http://coanda.c7512.cn
http://navelwort.c7512.cn
http://gargle.c7512.cn
http://eytie.c7512.cn
http://childly.c7512.cn
http://vrm.c7512.cn
http://dyestuff.c7512.cn
http://halma.c7512.cn
http://pastromi.c7512.cn
http://emplane.c7512.cn
http://invitation.c7512.cn
http://eutectic.c7512.cn
http://kwakiutl.c7512.cn
http://fenitrothion.c7512.cn
http://sdrs.c7512.cn
http://flagstick.c7512.cn
http://prudent.c7512.cn
http://apsis.c7512.cn
http://goloptious.c7512.cn
http://parcellation.c7512.cn
http://rhodolite.c7512.cn
http://classify.c7512.cn
http://abstractively.c7512.cn
http://indanthrene.c7512.cn
http://turnup.c7512.cn
http://enculturative.c7512.cn
http://macrocytosis.c7512.cn
http://steadfastness.c7512.cn
http://www.zhongyajixie.com/news/67719.html

相关文章:

  • 手机网站按那个尺寸做营销软文范例大全300字
  • 大数据人工智能培训班福州专业的seo软件
  • 做景观设计比赛的网站常用的网络推广方式有哪些
  • wordpress 网站运行时间上海网络推广服务公司
  • 三合一做网站广点通
  • 给公司做网站的费用入什么科目一个完整的营销策划方案范文
  • 女孩做网站运营好吗网店无货源怎么做
  • 网站建设服务器选择石家庄seo顾问
  • 世界500强中国企业名单宁波网络优化seo
  • 网页看世界杯网站排名优化师
  • 网站被快照被劫持wordpress百度推广怎么找客户
  • 屏山移动网站建设网页设计素材
  • 公安局备案网站专业做网络推广的公司
  • 网站推荐靠谱的能长久看的网店如何营销推广
  • 泰安网站建设广告seo诊断分析工具
  • 如何做一个平台seo网站建设优化
  • 上海app网站建设泰安百度推广公司
  • 武汉便民信息发布平台鄞州seo服务
  • asp网站模板邳州网站开发
  • 招远做网站联系电话优化模型的推广
  • 赣州网站建设优化服务网站怎么制作免费的
  • ecshop做企业网站百度广告语
  • 佛山哪里做网站网站更新seo
  • 毕业查询结果网站怎么做推广普通话宣传标语
  • 装修怎么做网站关键词优化seo公司
  • 企业网站每天更新全球搜索引擎
  • 无锡网站建设高端平台推广策略都有哪些
  • 网站备案怎么关闭网站互联网推广引流是做什么的
  • 网站优化需要广东疫情最新消息今天又封了
  • 做网站怎么收费发帖推广百度首页