mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-27 18:17:33 +01:00
WakeActivity: add start method
This commit is contained in:
parent
dae5a77b17
commit
594c409067
@ -35,6 +35,15 @@ public class WakeActivity extends Activity {
|
|||||||
First try to start the activity you want to start with an intent and then start this activity with a second intent, both initiated on the Bangle.js, or other device.
|
First try to start the activity you want to start with an intent and then start this activity with a second intent, both initiated on the Bangle.js, or other device.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
public static void start(final Context context) {
|
||||||
|
Intent intent = new Intent(context, WakeActivity.class);
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
|
||||||
|
context.startActivity(intent);
|
||||||
|
}
|
||||||
|
|
||||||
private void dismissKeyguard() {
|
private void dismissKeyguard() {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {
|
||||||
setTurnScreenOn(true);
|
setTurnScreenOn(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user