Revert "Prevent getting data from Clipboard if device is locked"

This reverts commit e91b4d6d0173421f8d5bc1acc0659dd980d3a51f.
diff --git a/services/core/java/com/android/server/clipboard/ClipboardService.java b/services/core/java/com/android/server/clipboard/ClipboardService.java
index bdd2d2b..66aa403 100644
--- a/services/core/java/com/android/server/clipboard/ClipboardService.java
+++ b/services/core/java/com/android/server/clipboard/ClipboardService.java
@@ -20,7 +20,6 @@
 import android.app.AppGlobals;
 import android.app.AppOpsManager;
 import android.app.IActivityManager;
-import android.app.KeyguardManager;
 import android.content.BroadcastReceiver;
 import android.content.ClipData;
 import android.content.ClipDescription;
@@ -256,7 +255,7 @@
     public ClipData getPrimaryClip(String pkg) {
         synchronized (this) {
             if (mAppOps.noteOp(AppOpsManager.OP_READ_CLIPBOARD, Binder.getCallingUid(),
-                    pkg) != AppOpsManager.MODE_ALLOWED || isDeviceLocked()) {
+                    pkg) != AppOpsManager.MODE_ALLOWED) {
                 return null;
             }
             addActiveOwnerLocked(Binder.getCallingUid(), pkg);
@@ -267,7 +266,7 @@
     public ClipDescription getPrimaryClipDescription(String callingPackage) {
         synchronized (this) {
             if (mAppOps.checkOp(AppOpsManager.OP_READ_CLIPBOARD, Binder.getCallingUid(),
-                    callingPackage) != AppOpsManager.MODE_ALLOWED || isDeviceLocked()) {
+                    callingPackage) != AppOpsManager.MODE_ALLOWED) {
                 return null;
             }
             PerUserClipboard clipboard = getClipboard();
@@ -278,7 +277,7 @@
     public boolean hasPrimaryClip(String callingPackage) {
         synchronized (this) {
             if (mAppOps.checkOp(AppOpsManager.OP_READ_CLIPBOARD, Binder.getCallingUid(),
-                    callingPackage) != AppOpsManager.MODE_ALLOWED || isDeviceLocked()) {
+                    callingPackage) != AppOpsManager.MODE_ALLOWED) {
                 return false;
             }
             return getClipboard().primaryClip != null;
@@ -302,7 +301,7 @@
     public boolean hasClipboardText(String callingPackage) {
         synchronized (this) {
             if (mAppOps.checkOp(AppOpsManager.OP_READ_CLIPBOARD, Binder.getCallingUid(),
-                    callingPackage) != AppOpsManager.MODE_ALLOWED || isDeviceLocked()) {
+                    callingPackage) != AppOpsManager.MODE_ALLOWED) {
                 return false;
             }
             PerUserClipboard clipboard = getClipboard();
@@ -314,11 +313,6 @@
         }
     }
 
-    private boolean isDeviceLocked() {
-        final KeyguardManager keyguardManager = mContext.getSystemService(KeyguardManager.class);
-        return keyguardManager != null && keyguardManager.isDeviceLocked();
-    }
-
     private final void checkUriOwnerLocked(Uri uri, int uid) {
         if (!"content".equals(uri.getScheme())) {
             return;