summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-12-22 17:44:14 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-12-22 17:44:14 -0800
commit00ee5b46854404a91d903e8bf42d9f900326326c (patch)
tree9746c237e496d25153ac79237fda7784a72d73d1 /services
parent7b3724dd306dcdfb07848d90e9e0a3d0456421c2 (diff)
parent3b99ede362568a3d213a2b3668126965ad80677e (diff)
downloadframeworks_base-00ee5b46854404a91d903e8bf42d9f900326326c.zip
frameworks_base-00ee5b46854404a91d903e8bf42d9f900326326c.tar.gz
frameworks_base-00ee5b46854404a91d903e8bf42d9f900326326c.tar.bz2
Merge "Fix issue #3299143: Problem report for Hanping Chinese Dictionary Pro"
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/ClipboardService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/java/com/android/server/ClipboardService.java b/services/java/com/android/server/ClipboardService.java
index 30ea48c..bec35d1 100644
--- a/services/java/com/android/server/ClipboardService.java
+++ b/services/java/com/android/server/ClipboardService.java
@@ -115,7 +115,7 @@ public class ClipboardService extends IClipboard.Stub {
public ClipDescription getPrimaryClipDescription() {
synchronized (this) {
- return mPrimaryClip.getDescription();
+ return mPrimaryClip != null ? mPrimaryClip.getDescription() : null;
}
}
@@ -211,7 +211,7 @@ public class ClipboardService extends IClipboard.Stub {
} catch (NameNotFoundException e) {
throw new IllegalArgumentException("Unknown package " + pkg, e);
}
- if (!mActivePermissionOwners.contains(pkg)) {
+ if (mPrimaryClip != null && !mActivePermissionOwners.contains(pkg)) {
final int N = mPrimaryClip.getItemCount();
for (int i=0; i<N; i++) {
grantItemLocked(mPrimaryClip.getItem(i), pkg);