恢复浮窗权限,还有很多地方使用,需要统一处理

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2021-12-15 15:32:45 +08:00
parent 4cd08785fb
commit c88798fd98
7 changed files with 199 additions and 785 deletions

View File

@@ -1,28 +0,0 @@
package com.mogo.module.common;
import android.text.Editable;
import android.text.TextWatcher;
/**
* @author congtaowang
* @since 2019-10-02
* <p>
* 描述
*/
public class TextWatcherAdapter implements TextWatcher {
@Override
public void beforeTextChanged( CharSequence s, int start, int count, int after ) {
}
@Override
public void onTextChanged( CharSequence s, int start, int before, int count ) {
}
@Override
public void afterTextChanged( Editable s ) {
}
}

View File

@@ -34,11 +34,11 @@ public class BaseFloatDialog extends Dialog {
private void addFlag() {
// TODO 这里需要申请悬浮床权限
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
// getWindow().setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY);
// } else {
// getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
// }
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
getWindow().setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY);
} else {
getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
}
getWindow().addFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN
| WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION
| WindowManager.LayoutParams.FLAG_LOCAL_FOCUS_MODE);