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: Ia1e867f0eae4812fe92a02dae64ae1ed07e10593
  • Loading branch information...
commit 26de2bfba8277841f4206a16c001f3e74a9d3e45 1 parent 5f5729c
yanhao authored
2  framework.jar.out/smali/android/content/pm/ApplicationInfo.smali
View
@@ -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
2  framework.jar.out/smali/android/content/pm/PackageManager.smali
View
@@ -25,6 +25,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
2  services.jar.out/smali/com/android/server/pm/GrantedPermissions.smali
View
@@ -102,7 +102,7 @@
.parameter "pkgFlags"
.prologue
- const v0, -0x5ffbffff
+ const v0, -0x1ffbffff
and-int/2addr v0, p1
93 services.jar.out/smali/com/android/server/pm/PackageManagerService.smali
View
@@ -17003,6 +17003,24 @@
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, v50
+
+ 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, v50
iget-object v3, v0, Lcom/android/server/pm/PackageSettingBase;->origPackage:Lcom/android/server/pm/PackageSettingBase;
@@ -17395,6 +17413,16 @@
.line 3737
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 v1, v0, Lcom/android/server/pm/PackageManagerService;->mSettings:Lcom/android/server/pm/Settings;
+
+ invoke-static {v3, v1}, Lcom/android/server/pm/ExtraPackageManagerServices;->blockAutoStartedApp(Landroid/content/pm/ApplicationInfo;Lcom/android/server/pm/Settings;)V
+
+ move-object/from16 v0, p1
+
iget-object v3, v0, Landroid/content/pm/PackageParser$Package;->providers:Ljava/util/ArrayList;
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I
@@ -22276,7 +22304,7 @@
.end method
.method private setAccessControl(Ljava/lang/String;II)Z
- .locals 7
+ .locals 9
.parameter "packageName"
.parameter "newState"
.parameter "flags"
@@ -22285,7 +22313,11 @@
.end annotation
.prologue
- const v6, 0x7fffffff
+ const v8, 0x7fffffff
+
+ const v7, -0x40000001
+
+ const/high16 v6, 0x4000
const/high16 v5, -0x8000
@@ -22295,6 +22327,8 @@
if-eq p2, v5, :cond_0
+ if-eq p2, v6, :cond_0
+
const/4 v2, 0x0
:try_start_0
@@ -22324,11 +22358,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
@@ -22344,12 +22380,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
@@ -22369,11 +22406,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
@@ -22381,7 +22456,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.