OSDN Git Service

Fix targetSdkVersion, make resize mode a flag, delayed dexopt, easy ApplicationInfo.
authorDianne Hackborn <hackbod@google.com>
Fri, 19 Jun 2009 00:10:57 +0000 (17:10 -0700)
committerDianne Hackborn <hackbod@google.com>
Fri, 19 Jun 2009 00:10:57 +0000 (17:10 -0700)
commit5c1e00b14d2ef10ec76abf3e951fa8003a67f558
treefa723a6f96f5b977dfdfdc08b5b8aab98c20d500
parente748161ca89867e8c57d4e71c780486d4de8039c
Fix targetSdkVersion, make resize mode a flag, delayed dexopt, easy ApplicationInfo.

- Fix a bug where targetSdkVersion could not be set if minSdkVersion.  Stupid, stupid.
  Also make sure to fail if minSdkVersion is for a code name.  Really stupid.

- Change the API for resize compatibility mode to be a bit in the flags field, instead
  of a separate boolean.

- Implement delayed dexopting, to avoid the looong full dexopt during boot.  This is
  only enabled for "eng" builds.  When in this mode, the activity manager will make
  sure that a dexopt has been done before loading an .apk into a process, and will
  try to avoid displaying ANRs if they are due to the dexopt causing some operation
  to take longer than it normally would (though I make no guarantees about this
  totally working).

- Add API to Context to get the ApplicationInfo for its package, for easy access to
  things like targetSdkVersion.
15 files changed:
api/current.xml
core/java/android/app/ActivityThread.java
core/java/android/app/ApplicationContext.java
core/java/android/content/Context.java
core/java/android/content/ContextWrapper.java
core/java/android/content/pm/ApplicationInfo.java
core/java/android/content/pm/IPackageManager.aidl
core/java/android/content/pm/PackageManager.java
core/java/android/content/pm/PackageParser.java
core/java/android/content/res/CompatibilityInfo.java
services/java/com/android/server/PackageManagerService.java
services/java/com/android/server/am/ActivityManagerService.java
services/java/com/android/server/am/HistoryRecord.java
test-runner/android/test/mock/MockContext.java
tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeContext.java