Skip to content

Commit 5ff07f3

Browse files
committed
update
1 parent e99e279 commit 5ff07f3

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

app/src/main/java/com/hardwork/fg607/relaxfinger/service/FloatingBallService.java

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2187,18 +2187,11 @@ public void run() {
21872187
FloatingBallUtils.openRecnetTask(mAccessibilityService.instance);
21882188
break;
21892189
case "切换上一个应用":
2190-
new Thread(new Runnable() {
2191-
@Override
2192-
public void run() {
2193-
2194-
try {
2195-
FloatingBallUtils.previousApp();
2196-
} catch (Exception e) {
2197-
e.printStackTrace();
2198-
}
2199-
}
2200-
}).start();
2201-
2190+
try {
2191+
FloatingBallUtils.previousApp();
2192+
} catch (Exception e) {
2193+
e.printStackTrace();
2194+
}
22022195
break;
22032196
case "休眠(需要开启锁屏功能)":
22042197
FloatingBallUtils.lockScreen(this);

app/src/main/java/com/hardwork/fg607/relaxfinger/utils/AppUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ public static String getPreviousNew() throws Exception {
315315
if (state != null) {
316316
ApplicationInfo info = getApplicationInfoByProcessName(app.processName);
317317

318-
if(info!= null){
318+
if(info!= null && !info.packageName.equals("com.hardwork.fg607.relaxfinger")){
319319
Log.i("task",info.packageName);
320320
return info.packageName;
321321
}

0 commit comments

Comments
 (0)