OSDN Git Service

Re-run pinner service on camera app update and dex optimization.
authorCarmen Jackson <carmenjackson@google.com>
Tue, 16 May 2017 17:37:26 +0000 (10:37 -0700)
committerCalin Juravle <calin@google.com>
Tue, 23 May 2017 00:09:49 +0000 (17:09 -0700)
commitf107a23ff165bbb7f0ae145f9ac85ddca8b43ed7
treec7e740a3754142476414e31959a2d5ae926c9ad5
parentbc13f7174abd63a03d1a19e9c4360701072cab5b
Re-run pinner service on camera app update and dex optimization.

When the camera app updates or the dex files are optimized, the files
that have been pinned by the pinner service fall out of date. The next
time they're used, they will be paged in like normal. This change
un-pins and re-pins the Camera app when the user's camera app updates,
as well as when background dex optimization finishes.

Bug: 33168521
Test: Manual. Here's a logcat of PinnerService activity while I ran the
following commands:

$ flashall -w
$ adb install -r -d --force-sdk [new camera app].apk
Success
$ adb root
restarting adbd as root
$ adb shell cmd package bg-dexopt-job

SystemServer: PinnerService
SystemServiceManager: Starting com.android.server.PinnerService
PinnerService: Starting PinnerService
SystemServerTiming: PinnerService took to complete: 2ms
PinnerService: Pinned file = /system/framework/arm64/boot-framework.oat
PinnerService: Pinned file = /system/framework/arm64/boot-framework.vdex
PinnerService: Pinned file = /system/framework/oat/arm64/services.odex
PinnerService: Pinned file = /system/framework/oat/arm64/services.vdex
PinnerService: Pinned file = /system/framework/arm64/boot.oat
PinnerService: Pinned file = /system/framework/arm64/boot.vdex
PinnerService: Pinned file =
/system/framework/arm64/boot-core-libart.oat
PinnerService: Pinned file =
/system/framework/arm64/boot-core-libart.vdex
PinnerService: Pinned /system/app/GoogleCamera/GoogleCamera.apk
PinnerService: Pinned
/data/dalvik-cache/arm64/system@app@GoogleCamera@GoogleCamera.apk@classes.dex
PinnerService: Updating pinned files.
PinnerService: Unpinned file /system/app/GoogleCamera/GoogleCamera.apk
PinnerService: Unpinned file
/data/dalvik-cache/arm64/system@app@GoogleCamera@GoogleCamera.apk@classes.dex
PinnerService: Pinned
/data/app/com.google.android.GoogleCamera-vVji3RQcPHS1Lzqh1WjY1g==/base.apk
PinnerService: Pinned
/data/app/com.google.android.GoogleCamera-vVji3RQcPHS1Lzqh1WjY1g==/oat/arm64/base.odex
PinnerService: Updating pinned files.
PinnerService: Unpinned file
/data/app/com.google.android.GoogleCamera-vVji3RQcPHS1Lzqh1WjY1g==/base.apk
PinnerService: Unpinned file
/data/app/com.google.android.GoogleCamera-vVji3RQcPHS1Lzqh1WjY1g==/oat/arm64/base.odex
PinnerService: Pinned
/data/app/com.google.android.GoogleCamera-vVji3RQcPHS1Lzqh1WjY1g==/base.apk
PinnerService: Pinned
/data/app/com.google.android.GoogleCamera-vVji3RQcPHS1Lzqh1WjY1g==/oat/arm64/base.odex

Change-Id: I10d72d6a3d1717773324913362a638f199d49bc9
services/core/java/com/android/server/PinnerService.java
services/core/java/com/android/server/pm/BackgroundDexOptService.java