Slide 76
Slide 76 text
createPackageContext
76
public Context createPackageContextAsUser String packageName, int flags, UserHandle user throws NameNotFoundException
if packageName.equals system packageName.equals android
return new ContextImpl this, mMainThread, mPackageInfo, mParams,
mAttributionSource.getAttributionTag ,
mAttributionSource.getNext ,
null, mToken, user, flags, null, null ;
LoadedApk pi mMainThread.getPackageInfo packageName, mResources.getCompatibilityInfo ,
flags CONTEXT REGISTER PACKAGE, user.getIdentifier ;
if pi !
ContextImpl c new ContextImpl this, mMainThread, pi, mParams,
mAttributionSource.getAttributionTag ,
mAttributionSource.getNext ,
null, mToken, user, flags, null, null ;
final int displayId getDisplayId ;
final Integer overrideDisplayId mForceDisplayOverrideInResources ? displayId : null;
c.setResources createResources mToken, pi, null, overrideDisplayId, null, getDisplayAdjustments displayId .getCompatibilityInfo , null ;
if c.mResources !
throw new PackageManager.NameNotFoundException Application package packageName not found ;
ContextImpl.java 컨텍스트 생성