summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/java/android/app/ActivityThread.java7
-rw-r--r--services/java/com/android/server/am/ActivityManagerService.java7
2 files changed, 11 insertions, 3 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index cb1e903..acf41ee 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -114,6 +114,7 @@ public final class ActivityThread {
private static final boolean DEBUG = false;
private static final boolean localLOGV = DEBUG ? Config.LOGD : Config.LOGV;
private static final boolean DEBUG_BROADCAST = false;
+ private static final boolean DEBUG_RESULTS = false;
private static final long MIN_TIME_BETWEEN_GCS = 5*1000;
private static final Pattern PATTERN_SEMICOLON = Pattern.compile(";");
private static final int SQLITE_MEM_RELEASED_EVENT_LOG_TAG = 75003;
@@ -2118,6 +2119,8 @@ public final class ActivityThread {
public final void sendActivityResult(
IBinder token, String id, int requestCode,
int resultCode, Intent data) {
+ if (DEBUG_RESULTS) Log.v(TAG, "sendActivityResult: id=" + id
+ + " req=" + requestCode + " res=" + resultCode + " data=" + data);
ArrayList<ResultInfo> list = new ArrayList<ResultInfo>();
list.add(new ResultInfo(id, requestCode, resultCode, data));
mAppThread.scheduleSendResult(token, list);
@@ -2993,6 +2996,8 @@ public final class ActivityThread {
if (ri.mData != null) {
ri.mData.setExtrasClassLoader(r.activity.getClassLoader());
}
+ if (DEBUG_RESULTS) Log.v(TAG,
+ "Delivering result to activity " + r + " : " + ri);
r.activity.dispatchActivityResult(ri.mResultWho,
ri.mRequestCode, ri.mResultCode, ri.mData);
} catch (Exception e) {
@@ -3008,7 +3013,7 @@ public final class ActivityThread {
private final void handleSendResult(ResultData res) {
ActivityRecord r = mActivities.get(res.token);
- if (localLOGV) Log.v(TAG, "Handling send result to " + r);
+ if (DEBUG_RESULTS) Log.v(TAG, "Handling send result to " + r);
if (r != null) {
final boolean resumed = !r.paused;
if (!r.activity.mFinished && r.activity.mDecor != null
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index da567a8..a7dac61 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -3427,7 +3427,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
*/
private final boolean requestFinishActivityLocked(IBinder token, int resultCode,
Intent resultData, String reason) {
- if (localLOGV) Log.v(
+ if (DEBUG_RESULTS) Log.v(
TAG, "Finishing activity: token=" + token
+ ", result=" + resultCode + ", data=" + resultData);
@@ -3490,7 +3490,9 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
// send the result
HistoryRecord resultTo = r.resultTo;
if (resultTo != null) {
- if (DEBUG_RESULTS) Log.v(TAG, "Adding result to " + resultTo);
+ if (DEBUG_RESULTS) Log.v(TAG, "Adding result to " + resultTo
+ + " who=" + r.resultWho + " req=" + r.requestCode
+ + " res=" + resultCode + " data=" + resultData);
if (r.info.applicationInfo.uid > 0) {
grantUriPermissionFromIntentLocked(r.info.applicationInfo.uid,
r.packageName, resultData, r);
@@ -3499,6 +3501,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
resultData);
r.resultTo = null;
}
+ else if (DEBUG_RESULTS) Log.v(TAG, "No result destination from " + r);
// Make sure this HistoryRecord is not holding on to other resources,
// because clients have remote IPC references to this object so we