Skip to content

Commit ac042b1

Browse files
committed
fix float window not shown on keyguard, fixed #120, fixed #118. fixed #112, fixed #84
1 parent 0dabe8c commit ac042b1

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

app/src/androidTest/java/org/xdty/callerinfo/MainActivityTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import android.content.ComponentName;
44
import android.os.SystemClock;
55
import android.support.test.espresso.FailureHandler;
6-
import android.support.test.espresso.IdlingPolicies;
76
import android.support.test.espresso.NoMatchingRootException;
87
import android.support.test.espresso.contrib.RecyclerViewActions;
98
import android.support.test.filters.SdkSuppress;
@@ -20,15 +19,12 @@
2019
import android.widget.ImageButton;
2120

2221
import org.hamcrest.Matcher;
23-
import org.junit.Before;
2422
import org.junit.Test;
2523
import org.junit.runner.RunWith;
2624
import org.xdty.callerinfo.activity.SettingsActivity;
2725
import org.xdty.callerinfo.model.db.InCall;
2826
import org.xdty.callerinfo.utils.Utils;
2927

30-
import java.util.concurrent.TimeUnit;
31-
3228
import static android.support.test.InstrumentationRegistry.getTargetContext;
3329
import static android.support.test.espresso.Espresso.onView;
3430
import static android.support.test.espresso.Espresso.openActionBarOverflowOrOptionsMenu;

app/src/main/java/org/xdty/callerinfo/service/FloatWindow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public StandOutLayoutParams getParams(int id, Window window) {
121121
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
122122
params.type = StandOutLayoutParams.TYPE_APPLICATION_OVERLAY;
123123
} else {
124-
params.type = StandOutLayoutParams.TYPE_PHONE;
124+
params.type = StandOutLayoutParams.TYPE_SYSTEM_OVERLAY;
125125
}
126126
}
127127
return params;

0 commit comments

Comments
 (0)