-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clipboard auto-clear timeout setting
1 parent
38a0b70
commit 38dd4d2
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/com/android/settings/privacy/ClipboardTimeoutController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.android.settings.privacy; | ||
|
||
import android.content.Context; | ||
import android.ext.settings.ExtSettings; | ||
|
||
import com.android.settings.ext.IntSettingPrefController; | ||
import com.android.settings.R; | ||
|
||
import static java.util.concurrent.TimeUnit.HOURS; | ||
import static java.util.concurrent.TimeUnit.MINUTES; | ||
import static java.util.concurrent.TimeUnit.SECONDS; | ||
|
||
public class ClipboardTimeoutController extends IntSettingPrefController { | ||
|
||
public ClipboardTimeoutController(Context ctx, String key) { | ||
super(ctx, key, ExtSettings.CLIPBOARD_AUTO_CLEAR_TIMEOUT); | ||
} | ||
|
||
@Override | ||
protected void getEntries(Entries entries) { | ||
entries.add(R.string.switch_off_text, 0); | ||
entries.add(10, SECONDS); | ||
entries.add(30, SECONDS); | ||
entries.add(1, MINUTES); | ||
entries.add(5, MINUTES); | ||
entries.add(10, MINUTES); | ||
entries.add(30, MINUTES); | ||
entries.add(1, HOURS); | ||
entries.add(2, HOURS); | ||
entries.add(4, HOURS); | ||
entries.add(8, HOURS); | ||
} | ||
} |