Merge "Fix issue #8582003: Evernote Camera Capture Failure" into jb-mr2-dev

This commit is contained in:
Dianne Hackborn
2013-04-12 00:58:24 +00:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 1 deletions

View File

@ -1593,6 +1593,12 @@ public final class ActivityThread {
}
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;

View File

@ -86,7 +86,7 @@ public class FakeApp extends Application {
@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