This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
57 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
21 changes: 21 additions & 0 deletions
21
app/src/main/java/com/zeapo/pwdstore/autofill/oreo/ChromeCompatFix.kt
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,21 @@ | ||
/* | ||
* Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved. | ||
* SPDX-License-Identifier: GPL-3.0-only | ||
*/ | ||
package com.zeapo.pwdstore.autofill.oreo | ||
|
||
import android.accessibilityservice.AccessibilityService | ||
import android.view.accessibility.AccessibilityEvent | ||
import com.github.ajalt.timberkt.d | ||
import kotlin.system.measureTimeMillis | ||
|
||
class ChromeCompatFix : AccessibilityService() { | ||
|
||
override fun onAccessibilityEvent(event: AccessibilityEvent) { | ||
val time = measureTimeMillis { rootInActiveWindow } | ||
d { "${event.packageName} (${AccessibilityEvent.eventTypeToString(event.eventType)}): $time ms" } | ||
} | ||
|
||
override fun onInterrupt() {} | ||
} | ||
|
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,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<bool name="enable_chrome_compat_fix">true</bool> | ||
</resources> |
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
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,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?><!-- | ||
~ Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved. | ||
~ SPDX-License-Identifier: GPL-3.0-only | ||
--> | ||
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:accessibilityEventTypes="typeWindowContentChanged|typeViewAccessibilityFocused" | ||
android:accessibilityFeedbackType="feedbackVisual" | ||
android:accessibilityFlags="flagDefault" | ||
android:canRetrieveWindowContent="true" | ||
android:description="@string/oreo_autofill_chrome_compat_fix_description" | ||
android:notificationTimeout="100" | ||
android:packageNames="com.android.chrome,com.chrome.beta,com.chrome.dev,com.chrome.canary" | ||
android:summary="@string/oreo_autofill_chrome_compat_fix_summary" /> |