diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-12-22 17:44:14 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-12-22 17:44:14 -0800 |
commit | 00ee5b46854404a91d903e8bf42d9f900326326c (patch) | |
tree | 9746c237e496d25153ac79237fda7784a72d73d1 /services | |
parent | 7b3724dd306dcdfb07848d90e9e0a3d0456421c2 (diff) | |
parent | 3b99ede362568a3d213a2b3668126965ad80677e (diff) | |
download | frameworks_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.java | 4 |
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); |