Skip to content

Commit 49b0246

Browse files
jsharkeyAndroid (Google) Code Review
authored andcommitted
Merge "System context should inherit base package name."
2 parents e93cccb + 816e4f7 commit 49b0246

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/java/android/app/ContextImpl.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1480,7 +1480,9 @@ public void enforceUriPermission(
14801480
public Context createPackageContext(String packageName, int flags)
14811481
throws PackageManager.NameNotFoundException {
14821482
if (packageName.equals("system") || packageName.equals("android")) {
1483-
return new ContextImpl(mMainThread.getSystemContext());
1483+
final ContextImpl context = new ContextImpl(mMainThread.getSystemContext());
1484+
context.mBasePackageName = mBasePackageName;
1485+
return context;
14841486
}
14851487

14861488
LoadedApk pi =

0 commit comments

Comments
 (0)