Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add mechanism of auto-start management.

Change-Id: I0d1b3c5e33ce56d379342c8efa482719062dc5a4
  • Loading branch information...
commit f66f1ac2d05f90554a3490c8e69ea236cd70aaf0 1 parent e6e9ef3
@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
@@ -16742,6 +16742,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/PackageSetting;->origPackage:Lcom/android/server/pm/PackageSettingBase;
@@ -21499,7 +21527,7 @@
.end method
.method private setAccessControl(Ljava/lang/String;II)Z
- .locals 7
+ .locals 9
.parameter "packageName"
.parameter "newState"
.parameter "flags"
@@ -21508,7 +21536,11 @@
.end annotation
.prologue
- const v6, 0x7fffffff
+ const v8, 0x7fffffff
+
+ const v7, -0x40000001
+
+ const/high16 v6, 0x4000
const/high16 v5, -0x8000
@@ -21518,6 +21550,8 @@
if-eq p2, v5, :cond_0
+ if-eq p2, v6, :cond_0
+
const/4 v2, 0x0
:try_start_0
@@ -21547,11 +21581,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 p3, v5, :cond_2
+ if-ne p2, v5, :cond_4
+
+ if-ne p3, v5, :cond_3
iget v2, v1, Lcom/android/server/pm/PackageSetting;->pkgFlags:I
@@ -21567,12 +21603,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
@@ -21592,11 +21629,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
@@ -21604,7 +21679,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.