forked from extern/Unexpected-Keyboard
d5f36885c4
The feature is off by default for privacy reasons. The checkbox state is persisted in the configuration. The history is immediately cleared when it's disabled. The content of the system clipboard is visible when the history is enabled.
23 lines
559 B
Java
23 lines
559 B
Java
package juloo.keyboard2;
|
|
|
|
import android.content.Context;
|
|
import android.util.AttributeSet;
|
|
import android.widget.CheckBox;
|
|
import android.widget.CompoundButton;
|
|
|
|
final class ClipboardHistoryCheckBox extends CheckBox
|
|
implements CompoundButton.OnCheckedChangeListener
|
|
{
|
|
public ClipboardHistoryCheckBox(Context ctx, AttributeSet attrs)
|
|
{
|
|
super(ctx, attrs);
|
|
setOnCheckedChangeListener(this);
|
|
}
|
|
|
|
@Override
|
|
public void onCheckedChanged(CompoundButton _v, boolean isChecked)
|
|
{
|
|
ClipboardHistoryService.set_history_enabled(isChecked);
|
|
}
|
|
}
|