mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-21 12:25:57 +03:00
Fix #1461️ Keep the screen on
Signed-off-by: Stefan Niedermann <info@niedermann.it>
This commit is contained in:
parent
4cc3ca1038
commit
d721cb128d
3 changed files with 11 additions and 1 deletions
|
@ -1,12 +1,12 @@
|
|||
package it.niedermann.owncloud.notes.edit;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
@ -72,6 +72,8 @@ public class EditNoteActivity extends LockedActivity implements BaseNoteFragment
|
|||
return;
|
||||
}
|
||||
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
|
||||
categoryViewModel = new ViewModelProvider(this).get(CategoryViewModel.class);
|
||||
binding = ActivityEditBinding.inflate(getLayoutInflater());
|
||||
setContentView(binding.getRoot());
|
||||
|
@ -99,6 +101,12 @@ public class EditNoteActivity extends LockedActivity implements BaseNoteFragment
|
|||
launchNoteFragment();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
super.onStop();
|
||||
}
|
||||
|
||||
private long getNoteId() {
|
||||
return getIntent().getLongExtra(PARAM_NOTE_ID, 0);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
- 🐞 Detect missing Notes app on server when importing an account (#1475)
|
||||
- ⚙️ Remove incomplete and outdated translations
|
||||
- ⚙️ Updated dependencies
|
||||
- ⚙️ Requires Android ≥ 6.0 (matching the Nextcloud Android app)
|
1
fastlane/metadata/android/en-US/changelogs/3004020.txt
Normal file
1
fastlane/metadata/android/en-US/changelogs/3004020.txt
Normal file
|
@ -0,0 +1 @@
|
|||
- 📱️ Keep the screen on (#1461)
|
Loading…
Reference in a new issue