Example usage for android.content ClipboardManager removePrimaryClipChangedListener

List of usage examples for android.content ClipboardManager removePrimaryClipChangedListener

Introduction

In this page you can find the example usage for android.content ClipboardManager removePrimaryClipChangedListener.

Prototype

public void removePrimaryClipChangedListener(OnPrimaryClipChangedListener what) 

Source Link

Usage

From source file:org.ulteo.ovd.AndRdpActivity.java

@Override
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
protected void onDestroy() {
    smHandler.unlistenSm();/*from  w w  w  . java 2 s  .  c  o  m*/
    smHandler.stopStatusPoll();
    NotificationManager mNotificationManager = (NotificationManager) context
            .getSystemService(Context.NOTIFICATION_SERVICE);
    mNotificationManager.cancel(1);

    if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB) {
        ClipboardManager clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
        clipboard.removePrimaryClipChangedListener(clipChangedListener);
    }

    super.onDestroy();
}