fix: detect passwords app (closes #3545)
This commit is contained in:
1 parent
9d5f11aed5
commit
d0cd206f51
1 file changed
+5
-1
@@ -109,7 +109,7 @@ class Applications {
|
|||||||
private static func isActualApplication(_ app: NSRunningApplication) -> Bool {
|
private static func isActualApplication(_ app: NSRunningApplication) -> Bool {
|
||||||
// an app can start with .activationPolicy == .prohibited, then transition to != .prohibited later
|
// an app can start with .activationPolicy == .prohibited, then transition to != .prohibited later
|
||||||
// an app can be both activationPolicy == .accessory and XPC (e.g. com.apple.dock.etci)
|
// an app can be both activationPolicy == .accessory and XPC (e.g. com.apple.dock.etci)
|
||||||
return (isNotXpc(app) || isAndroidEmulator(app)) && !app.processIdentifier.isZombie()
|
return (isNotXpc(app) || isPasswords(app) || isAndroidEmulator(app)) && !app.processIdentifier.isZombie()
|
||||||
}
|
}
|
||||||
|
|
||||||
private static func isNotXpc(_ app: NSRunningApplication) -> Bool {
|
private static func isNotXpc(_ app: NSRunningApplication) -> Bool {
|
||||||
@@ -126,6 +126,10 @@ class Applications {
|
|||||||
private static func notAltTab(_ app: NSRunningApplication) -> Bool {
|
private static func notAltTab(_ app: NSRunningApplication) -> Bool {
|
||||||
return app.processIdentifier != ProcessInfo.processInfo.processIdentifier
|
return app.processIdentifier != ProcessInfo.processInfo.processIdentifier
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static func isPasswords(_ app: NSRunningApplication) -> Bool {
|
||||||
|
return app.bundleIdentifier == "com.apple.Passwords"
|
||||||
|
}
|
||||||
|
|
||||||
static func isAndroidEmulator(_ app: NSRunningApplication) -> Bool {
|
static func isAndroidEmulator(_ app: NSRunningApplication) -> Bool {
|
||||||
// NSRunningApplication provides no way to identify the emulator; we pattern match on its KERN_PROCARGS
|
// NSRunningApplication provides no way to identify the emulator; we pattern match on its KERN_PROCARGS
|
||||||
|
|||||||
Reference in new issue
Block a user