* commit '5ee2c9d20c0fbecf6b4a482eb8d8bfdf85d0d424': Work on issue #17656716: Unhandled exception in Window Manager
This commit is contained in:
commit
e4499526ee
@ -1037,10 +1037,13 @@ status_t IPCThreadState::executeCommand(int32_t cmd)
|
|||||||
|
|
||||||
const pid_t origPid = mCallingPid;
|
const pid_t origPid = mCallingPid;
|
||||||
const uid_t origUid = mCallingUid;
|
const uid_t origUid = mCallingUid;
|
||||||
|
const int32_t origStrictModePolicy = mStrictModePolicy;
|
||||||
|
const int32_t origTransactionBinderFlags = mLastTransactionBinderFlags;
|
||||||
|
|
||||||
mCallingPid = tr.sender_pid;
|
mCallingPid = tr.sender_pid;
|
||||||
mCallingUid = tr.sender_euid;
|
mCallingUid = tr.sender_euid;
|
||||||
|
mLastTransactionBinderFlags = tr.flags;
|
||||||
|
|
||||||
int curPrio = getpriority(PRIO_PROCESS, mMyThreadId);
|
int curPrio = getpriority(PRIO_PROCESS, mMyThreadId);
|
||||||
if (gDisableBackgroundScheduling) {
|
if (gDisableBackgroundScheduling) {
|
||||||
if (curPrio > ANDROID_PRIORITY_NORMAL) {
|
if (curPrio > ANDROID_PRIORITY_NORMAL) {
|
||||||
@ -1062,8 +1065,9 @@ status_t IPCThreadState::executeCommand(int32_t cmd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//ALOGI(">>>> TRANSACT from pid %d uid %d\n", mCallingPid, mCallingUid);
|
//ALOGI(">>>> TRANSACT from pid %d uid %d\n", mCallingPid, mCallingUid);
|
||||||
|
|
||||||
Parcel reply;
|
Parcel reply;
|
||||||
|
status_t error;
|
||||||
IF_LOG_TRANSACTIONS() {
|
IF_LOG_TRANSACTIONS() {
|
||||||
TextOutput::Bundle _b(alog);
|
TextOutput::Bundle _b(alog);
|
||||||
alog << "BR_TRANSACTION thr " << (void*)pthread_self()
|
alog << "BR_TRANSACTION thr " << (void*)pthread_self()
|
||||||
@ -1077,19 +1081,18 @@ status_t IPCThreadState::executeCommand(int32_t cmd)
|
|||||||
}
|
}
|
||||||
if (tr.target.ptr) {
|
if (tr.target.ptr) {
|
||||||
sp<BBinder> b((BBinder*)tr.cookie);
|
sp<BBinder> b((BBinder*)tr.cookie);
|
||||||
const status_t error = b->transact(tr.code, buffer, &reply, tr.flags);
|
error = b->transact(tr.code, buffer, &reply, tr.flags);
|
||||||
if (error < NO_ERROR) reply.setError(error);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
const status_t error = the_context_object->transact(tr.code, buffer, &reply, tr.flags);
|
error = the_context_object->transact(tr.code, buffer, &reply, tr.flags);
|
||||||
if (error < NO_ERROR) reply.setError(error);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//ALOGI("<<<< TRANSACT from pid %d restore pid %d uid %d\n",
|
//ALOGI("<<<< TRANSACT from pid %d restore pid %d uid %d\n",
|
||||||
// mCallingPid, origPid, origUid);
|
// mCallingPid, origPid, origUid);
|
||||||
|
|
||||||
if ((tr.flags & TF_ONE_WAY) == 0) {
|
if ((tr.flags & TF_ONE_WAY) == 0) {
|
||||||
LOG_ONEWAY("Sending reply to %d!", mCallingPid);
|
LOG_ONEWAY("Sending reply to %d!", mCallingPid);
|
||||||
|
if (error < NO_ERROR) reply.setError(error);
|
||||||
sendReply(reply, 0);
|
sendReply(reply, 0);
|
||||||
} else {
|
} else {
|
||||||
LOG_ONEWAY("NOT sending reply to %d!", mCallingPid);
|
LOG_ONEWAY("NOT sending reply to %d!", mCallingPid);
|
||||||
@ -1097,6 +1100,8 @@ status_t IPCThreadState::executeCommand(int32_t cmd)
|
|||||||
|
|
||||||
mCallingPid = origPid;
|
mCallingPid = origPid;
|
||||||
mCallingUid = origUid;
|
mCallingUid = origUid;
|
||||||
|
mStrictModePolicy = origStrictModePolicy;
|
||||||
|
mLastTransactionBinderFlags = origTransactionBinderFlags;
|
||||||
|
|
||||||
IF_LOG_TRANSACTIONS() {
|
IF_LOG_TRANSACTIONS() {
|
||||||
TextOutput::Bundle _b(alog);
|
TextOutput::Bundle _b(alog);
|
||||||
|
Loading…
Reference in New Issue
Block a user