ActivityThread.currentPackageName() was actually returning
the process name. Change this to return the package name, and
fix the one spot using it I could find that was actually wanting
the process name.
Change-Id: I323b9c5987106b5a090968e545281fc0ba55b6b8
public static String currentPackageName() {
ActivityThread am = currentActivityThread();
return (am != null && am.mBoundApplication != null)
+ ? am.mBoundApplication.appInfo.packageName : null;
+ }
+
+ public static String currentProcessName() {
+ ActivityThread am = currentActivityThread();
+ return (am != null && am.mBoundApplication != null)
? am.mBoundApplication.processName : null;
}
@Override
public void onCreate() {
- String processName = ActivityThread.currentPackageName();
+ String processName = ActivityThread.currentProcessName();
Slog.i("FakeOEMFeatures", "Creating app in process: " + processName);
if (!getApplicationInfo().packageName.equals(processName)) {
// If we are not in the main process of the app, then don't do