Home / Specs / Clipboard Privacy
Settings v1.2.8

Clipboard Privacy

Password manager exclusion for clipboard history

Clipboard Privacy Specification

Status: Implemented

Version: 1.2.8

Last Updated: 2026-01-15

Overview

CleverKeys includes privacy features for the clipboard history system. The primary feature is automatic exclusion of clipboard entries from password managers, preventing sensitive credentials from being stored in clipboard history.

Password Manager Exclusion

Feature Description

When enabled, CleverKeys automatically detects when the foreground app is a password manager and skips storing clipboard content from those apps. This prevents passwords, usernames, and other sensitive data from appearing in clipboard history.

Supported Password Managers

The following package names are recognized (defined in Config.kt):

| App | Package Name |

|-----|--------------|

| Bitwarden | com.x8bit.bitwarden |

| 1Password | com.onepassword.android, com.agilebits.onepassword |

| LastPass | com.lastpass.lpandroid |

| Dashlane | com.dashlane |

| KeePass2Android | keepass2android.keepass2android, keepass2android.keepass2android_nonet |

| KeePassDX | com.kunzisoft.keepass.free, com.kunzisoft.keepass.pro |

| OpenKeePass | de.slackspace.openkeepass |

| Enpass | io.enpass.app |

| NordPass | com.nordpass.android.app.password.manager |

| RoboForm | com.siber.roboform |

| Keeper | com.callpod.android_apps.keeper |

| Proton Pass | proton.android.pass |

| SafeInCloud | com.safeincloud |

| mSecure | com.msecure |

| Zoho Vault | com.zoho.vault |

| Sticky Password | com.stickypassword.android |

Implementation

#### Config.kt

// Default setting

const val CLIPBOARD_EXCLUDE_PASSWORD_MANAGERS = true

// Package name list

val PASSWORD_MANAGER_PACKAGES = setOf(

"com.x8bit.bitwarden",

"com.onepassword.android",

// ... (20+ packages)

)

#### ClipboardHistoryService.kt

Key methods:

| Method | Purpose |

|--------|---------|

| getForegroundAppPackage() | Detects current foreground app |

| isPasswordManagerApp(packageName) | Checks if package is in exclusion list |

| addCurrentClip() | Skips storage if password manager detected |

Foreground App Detection:

// Primary: UsageStatsManager (Android 5.1+)

val usageStatsManager = context.getSystemService(Context.USAGE_STATS_SERVICE)

val usageStats = usageStatsManager.queryUsageStats(INTERVAL_DAILY, startTime, endTime)

val recentApp = usageStats.maxByOrNull { it.lastTimeUsed }

// Fallback: ActivityManager (deprecated but works)

val activityManager = context.getSystemService(Context.ACTIVITY_SERVICE)

val runningTasks = activityManager.getRunningTasks(1)

return runningTasks[0].topActivity?.packageName

#### SettingsActivity.kt

UI toggle in Clipboard section:

SettingsToggle(

title = "Exclude Password Managers",

description = "Don't store clipboard from Bitwarden, 1Password, LastPass, KeePass, etc.",

checked = clipboardExcludePasswordManagers,

onCheckedChange = { saveSetting("clipboard_exclude_password_managers", it) }

)

Settings

| Setting | Key | Default | Description |

|---------|-----|---------|-------------|

| Exclude Password Managers | clipboard_exclude_password_managers | true | Skip clipboard from password managers |

Security Considerations

Limitations

Future Enhancements

Related Files

References