[pm] make sure to restore mAlways=true preferred activity filter
Test: manual and verified that if a action has more than one preferred
activity filters, at least the mAlways=true filter will be restored on reboot.
Test: Before reboot in dumpsys:
android.media.action.STILL_IMAGE_CAMERA:
59144b6 com.google.android.GoogleCamera/com.android.camera.CameraImageActivity
mMatch=0x100000 mAlways=false
Action: "android.media.action.STILL_IMAGE_CAMERA"
Category: "android.intent.category.DEFAULT"
7d0bd59 com.google.android.GoogleCamera/com.android.camera.CameraImageActivity
mMatch=0x100000 mAlways=false
Action: "android.media.action.STILL_IMAGE_CAMERA"
Category: "android.intent.category.DEFAULT"
fbb913d com.google.android.GoogleCamera/com.android.camera.CameraImageActivity
mMatch=0x100000 mAlways=false
Action: "android.media.action.STILL_IMAGE_CAMERA"
Category: "android.intent.category.DEFAULT"
c86d195 com.google.android.GoogleCamera/com.android.camera.CameraImageActivity
mMatch=0x100000 mAlways=true
Selected from:
com.google.android.GoogleCamera/com.android.camera.CameraImageActivity
photo.android.hd.camera/com.android.camera.activity.SplashActivity
filter.camera.snap.photo.video.panorama/cn.kuxun.kxcamera.CameraActivity
net.sourceforge.opencamera/.MainActivity
com.snapchat.android/com.snap.mushroom.MainActivity
Action: "android.media.action.STILL_IMAGE_CAMERA"
Category: "android.intent.category.DEFAULT"
Test: After reboot in dumpsys:
android.media.action.STILL_IMAGE_CAMERA:
aaf8ce5 com.google.android.GoogleCamera/com.android.camera.CameraImageActivity
mMatch=0x100000 mAlways=false
Action: "android.media.action.STILL_IMAGE_CAMERA"
Category: "android.intent.category.DEFAULT"
c249186 com.google.android.GoogleCamera/com.android.camera.CameraImageActivity
mMatch=0x100000 mAlways=true
Selected from:
com.google.android.GoogleCamera/com.android.camera.CameraImageActivity
photo.android.hd.camera/com.android.camera.activity.SplashActivity
filter.camera.snap.photo.video.panorama/cn.kuxun.kxcamera.CameraActivity
net.sourceforge.opencamera/.MainActivity
com.snapchat.android/com.snap.mushroom.MainActivity
Action: "android.media.action.STILL_IMAGE_CAMERA"
Category: "android.intent.category.DEFAULT"
BUG: 157548344
Change-Id: I4b6c23e25957138a0b38f4be074c24a4519df59f
1 file changed