mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-03 08:52:58 +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.
|
||||
*/
|
||||
|
||||
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() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {
|
||||
setTurnScreenOn(true);
|
||||
|
Loading…
Reference in New Issue
Block a user