Merge "Fix issue #8582003: Evernote Camera Capture Failure" into jb-mr2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
c309ca4622
@ -1593,6 +1593,12 @@ public final class ActivityThread {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String currentPackageName() {
|
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();
|
ActivityThread am = currentActivityThread();
|
||||||
return (am != null && am.mBoundApplication != null)
|
return (am != null && am.mBoundApplication != null)
|
||||||
? am.mBoundApplication.processName : null;
|
? am.mBoundApplication.processName : null;
|
||||||
|
@ -86,7 +86,7 @@ public class FakeApp extends Application {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
String processName = ActivityThread.currentPackageName();
|
String processName = ActivityThread.currentProcessName();
|
||||||
Slog.i("FakeOEMFeatures", "Creating app in process: " + processName);
|
Slog.i("FakeOEMFeatures", "Creating app in process: " + processName);
|
||||||
if (!getApplicationInfo().packageName.equals(processName)) {
|
if (!getApplicationInfo().packageName.equals(processName)) {
|
||||||
// If we are not in the main process of the app, then don't do
|
// If we are not in the main process of the app, then don't do
|
||||||
|
Reference in New Issue
Block a user