Commit a88dce78 authored by wanglei's avatar wanglei

Merge remote-tracking branch 'origin/master'

parents 98918230 8e8a159f
......@@ -247,17 +247,18 @@ object NotificationUiUtil {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
small = smallRemoteViews
}
builder.setContent(small)
builder.setCustomHeadsUpContentView(small)
builder.setCustomContentView(small)
// 设置小视图
builder.setCustomContentView(smallRemoteViews)
// 设置悬浮通知视图(Android 12 及以上)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
builder.setCustomHeadsUpContentView(bigRemoteViews)
}
// 设置大视图
builder.setCustomBigContentView(bigRemoteViews)
// Show the notification
// if (AppPreferences.getInstance().getString("actionS", "1").toInt() == 1) {
// notificationManager.notify(intent.getIntExtra("actionId", actionId), builder.build())
// } else {
// notificationManager.notify(actionId, builder.build())
// }
notificationManager.notify(actionId, builder.build())
AppPreferences.getInstance().put("last_notification_time", System.currentTimeMillis())
if (actionId == ID_JUNK_CLEANER) {
......
......@@ -7,6 +7,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Build;
import android.util.Log;
import com.base.browserwhite.utils.AppPreferences;
......@@ -48,6 +49,7 @@ public class ScreenStatusReceiver extends BroadcastReceiver {
if (isDeviceInteractive() && !isSecureLockActive()) {
int secureSetting = Integer.parseInt(AppPreferences.getInstance().getString("lockS", "1"));
if (secureSetting == 1) {
Log.d("glc","lockS");
NotificationPushUtil.INSTANCE.sendNotificationWhere(context, null, PUSH_WHERE_UNLOCK);
}
}
......
......@@ -103,7 +103,6 @@ object InstallHelps {
)
}
}
ScreenStatusReceiver.setupScreenStatusListener(MyApplication.context)
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment