InsightAlertActivity: fix deprecation

This commit is contained in:
Milos Kozak 2022-04-20 09:25:57 +02:00
parent 47bd050bb9
commit 4413bc2310

View file

@ -1,13 +1,13 @@
package info.nightscout.androidaps.plugins.pump.insight.activities; package info.nightscout.androidaps.plugins.pump.insight.activities;
import android.app.KeyguardManager;
import android.content.ComponentName; import android.content.ComponentName;
import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.ServiceConnection; import android.content.ServiceConnection;
import android.os.Bundle; import android.os.Bundle;
import android.os.IBinder; import android.os.IBinder;
import android.text.Html;
import android.view.View; import android.view.View;
import android.view.WindowManager;
import android.widget.Button; import android.widget.Button;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.TextView; import android.widget.TextView;
@ -69,10 +69,10 @@ public class InsightAlertActivity extends DaggerAppCompatActivity {
setFinishOnTouchOutside(false); setFinishOnTouchOutside(false);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON setShowWhenLocked(true);
| WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD setTurnScreenOn(true);
| WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED KeyguardManager keyguardManager = (KeyguardManager) getSystemService(Context.KEYGUARD_SERVICE);
| WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON); keyguardManager.requestDismissKeyguard(this, null);
} }
@Override @Override