Reduce lock contention, removing unnecessary synchronization.

The value returned is purely a function of what's passed in, all
following final members.

BUG=2606839

Change-Id: I506fb9b1f3be965576c2b3317a30ff1f990ccda3
This commit is contained in:
Brad Fitzpatrick
2010-04-19 11:58:52 -07:00
parent afbf9f8d6d
commit b213d103d3

View File

@@ -6141,12 +6141,10 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
if (!(pendingResult instanceof PendingIntentRecord)) {
return null;
}
synchronized(this) {
try {
PendingIntentRecord res = (PendingIntentRecord)pendingResult;
return res.key.packageName;
} catch (ClassCastException e) {
}
try {
PendingIntentRecord res = (PendingIntentRecord)pendingResult;
return res.key.packageName;
} catch (ClassCastException e) {
}
return null;
}