Skip to content
Commit d2732995 authored by Winson's avatar Winson
Browse files

Skip no-state checkUseInstalled check inside PackageInfoUtils

PackageInfoWithoutStateUtils is designed for use in core when
the caller doesn't have a PackageSeting.

Because its generic generateApplicationInfo method does a simplified
checkUseInstalled check without the PackageSetting, this fails whenever
state must be taken into account.

This introduces method variants which skips the checks and defers to
PackageInfoUtils's own check.

Bug: 150328400

Test: manual verify call into PackageManager#setSystemAppState with
    SYSTEM_APP_STATE_UNINSTALLED and verify
    PackageManager#getApplicationInfo throws NameNotFoundException
    without fix and succeeds with fix
Test: atest com.android.server.pm.parsing
Test: TODO PackageInfo(WithoutState)Utils test in follow up change

Change-Id: Ie00984c2e1b80d2a3948923dc1293fbfddf01037
parent 5b55f124
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment