1
1
/*
2
- * Copyright (c) 2020, 2023 , Gluon
2
+ * Copyright (c) 2020, 2024 , Gluon
3
3
*
4
4
* This program is free software: you can redistribute it and/or modify
5
5
* it under the terms of the GNU General Public License as published by
@@ -47,9 +47,9 @@ public class Util {
47
47
private static boolean debug = false ;
48
48
49
49
public Util (Activity activity ) {
50
- Util .activity = activity ;
51
50
Log .v (TAG , "Util <init>" );
52
51
if (activity != null ) {
52
+ Util .activity = activity ;
53
53
new Handler (Util .activity .getMainLooper ()).postDelayed (new Runnable () {
54
54
55
55
@ Override
@@ -97,6 +97,9 @@ private static void syncClipboardFromOS() {
97
97
@ Override
98
98
public void run () {
99
99
if (Util .activity == null ) {
100
+ if (debug ) {
101
+ Log .v (TAG , "Util::syncClipboardFromOS failed, no activity" );
102
+ }
100
103
return ;
101
104
}
102
105
new Handler (Util .activity .getMainLooper ()).postDelayed (new Runnable () {
@@ -123,6 +126,9 @@ public void run() {
123
126
124
127
private static void syncClipboardToOS () {
125
128
if (Util .activity == null ) {
129
+ if (debug ) {
130
+ Log .v (TAG , "Util::syncClipboardToOS failed, no activity" );
131
+ }
126
132
return ;
127
133
}
128
134
final String text = nativeSyncClipboardToOS ();
0 commit comments