Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add mechanism of auto-start management.

Change-Id: I652155d607bd37c0f32584c00f447ccd8d889590
  • Loading branch information...
commit 3b21b65a3293276a76b5ca695ed973638567abdb 1 parent 46cd192
@HackerMi HackerMi authored
View
2  framework.jar.out/smali/android/content/pm/ApplicationInfo.smali
@@ -38,6 +38,8 @@
.field public static final FLAG_DEBUGGABLE:I = 0x2
+.field public static final FLAG_DISABLE_AUTOSTART:I = 0x40000000
+
.field public static final FLAG_EXTERNAL_STORAGE:I = 0x40000
.field public static final FLAG_FACTORY_TEST:I = 0x10
View
2  framework.jar.out/smali/android/content/pm/PackageManager.smali
@@ -22,6 +22,8 @@
.field public static final COMPONENT_ENABLED_STATE_DISABLED_USER:I = 0x3
+.field public static final COMPONENT_ENABLED_STATE_DISABLE_AUTOSTART:I = 0x40000000
+
.field public static final COMPONENT_ENABLED_STATE_ENABLED:I = 0x1
.field public static final DELETE_FAILED_DEVICE_POLICY_MANAGER:I = -0x2
View
2  services.jar.out/smali/com/android/server/pm/GrantedPermissions.smali
@@ -102,7 +102,7 @@
.parameter "pkgFlags"
.prologue
- const v0, -0x5ffbffff
+ const v0, -0x1ffbffff
and-int/2addr v0, p1
View
93 services.jar.out/smali/com/android/server/pm/PackageManagerService.smali
@@ -15998,6 +15998,34 @@
iput v4, v3, Landroid/content/pm/ApplicationInfo;->flags:I
+ move-object/from16 v0, p1
+
+ iget-object v3, v0, Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;
+
+ iget v4, v3, Landroid/content/pm/ApplicationInfo;->flags:I
+
+ move-object/from16 v0, v41
+
+ iget v10, v0, Lcom/android/server/pm/PackageSetting;->pkgFlags:I
+
+ const/high16 v11, 0x4000
+
+ and-int/2addr v10, v11
+
+ or-int/2addr v4, v10
+
+ iput v4, v3, Landroid/content/pm/ApplicationInfo;->flags:I
+
+ move-object/from16 v0, p1
+
+ iget-object v3, v0, Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;
+
+ move-object/from16 v0, p0
+
+ iget-object v4, v0, Lcom/android/server/pm/PackageManagerService;->mSettings:Lcom/android/server/pm/Settings;
+
+ invoke-static {v3, v4}, Lcom/android/server/pm/ExtraPackageManagerServices;->blockAutoStartedApp(Landroid/content/pm/ApplicationInfo;Lcom/android/server/pm/Settings;)V
+
move-object/from16 v0, v41
iget-object v3, v0, Lcom/android/server/pm/PackageSettingBase;->origPackage:Lcom/android/server/pm/PackageSettingBase;
@@ -20638,7 +20666,7 @@
.end method
.method private setAccessControl(Ljava/lang/String;II)Z
- .locals 7
+ .locals 9
.parameter "packageName"
.parameter "newState"
.parameter "flags"
@@ -20647,7 +20675,11 @@
.end annotation
.prologue
- const v6, 0x7fffffff
+ const v8, 0x7fffffff
+
+ const v7, -0x40000001
+
+ const/high16 v6, 0x4000
const/high16 v5, -0x8000
@@ -20657,6 +20689,8 @@
if-eq p2, v5, :cond_0
+ if-eq p2, v6, :cond_0
+
const/4 v2, 0x0
:try_start_0
@@ -20686,11 +20720,13 @@
check-cast v1, Lcom/android/server/pm/PackageSetting;
.local v1, pkgSetting:Lcom/android/server/pm/PackageSetting;
- if-eqz v0, :cond_1
+ if-eqz v0, :cond_2
- if-eqz v1, :cond_1
+ if-eqz v1, :cond_2
+
+ if-ne p2, v5, :cond_4
- if-ne p3, v5, :cond_2
+ if-ne p3, v5, :cond_3
iget v2, v1, Lcom/android/server/pm/PackageSetting;->pkgFlags:I
@@ -20706,12 +20742,13 @@
iput v4, v2, Landroid/content/pm/ApplicationInfo;->flags:I
+ :cond_1
:goto_1
iget-object v2, p0, Lcom/android/server/pm/PackageManagerService;->mSettings:Lcom/android/server/pm/Settings;
invoke-virtual {v2}, Lcom/android/server/pm/Settings;->writeLPr()V
- :cond_1
+ :cond_2
const/4 v2, 0x1
monitor-exit v3
@@ -20731,11 +20768,49 @@
.restart local v0 #pkg:Landroid/content/pm/PackageParser$Package;
.restart local v1 #pkgSetting:Lcom/android/server/pm/PackageSetting;
- :cond_2
+ :cond_3
:try_start_1
iget v2, v1, Lcom/android/server/pm/PackageSetting;->pkgFlags:I
- and-int/2addr v2, v6
+ and-int/2addr v2, v8
+
+ iput v2, v1, Lcom/android/server/pm/PackageSetting;->pkgFlags:I
+
+ iget-object v2, v0, Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;
+
+ iget v4, v2, Landroid/content/pm/ApplicationInfo;->flags:I
+
+ and-int/2addr v4, v8
+
+ iput v4, v2, Landroid/content/pm/ApplicationInfo;->flags:I
+
+ goto :goto_1
+
+ :cond_4
+ if-ne p2, v6, :cond_1
+
+ if-ne p3, v6, :cond_5
+
+ iget v2, v1, Lcom/android/server/pm/PackageSetting;->pkgFlags:I
+
+ or-int/2addr v2, v6
+
+ iput v2, v1, Lcom/android/server/pm/PackageSetting;->pkgFlags:I
+
+ iget-object v2, v0, Landroid/content/pm/PackageParser$Package;->applicationInfo:Landroid/content/pm/ApplicationInfo;
+
+ iget v4, v2, Landroid/content/pm/ApplicationInfo;->flags:I
+
+ or-int/2addr v4, v6
+
+ iput v4, v2, Landroid/content/pm/ApplicationInfo;->flags:I
+
+ goto :goto_1
+
+ :cond_5
+ iget v2, v1, Lcom/android/server/pm/PackageSetting;->pkgFlags:I
+
+ and-int/2addr v2, v7
iput v2, v1, Lcom/android/server/pm/PackageSetting;->pkgFlags:I
@@ -20743,7 +20818,7 @@
iget v4, v2, Landroid/content/pm/ApplicationInfo;->flags:I
- and-int/2addr v4, v6
+ and-int/2addr v4, v7
iput v4, v2, Landroid/content/pm/ApplicationInfo;->flags:I
:try_end_1
Please sign in to comment.
Something went wrong with that request. Please try again.