Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/stefan-niedermann/nextcloud-notes.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Niedermann <info@niedermann.it>2020-06-22 14:59:07 +0300
committerNiedermann IT-Dienstleistungen <stefan-niedermann@users.noreply.github.com>2020-06-22 16:40:29 +0300
commita2718c397ab439bfd5f4f3f225d428f92ca4275b (patch)
tree7650f32603a20a8742dd4823c6165618231ccd39 /app/src/main/java/it/niedermann/owncloud/notes/android/quicksettings/NewNoteTileService.java
parenta848ddfe6a0ca3800c44a1d464e9dfc3c548d50c (diff)
Refactor packages to match actual use case
Diffstat (limited to 'app/src/main/java/it/niedermann/owncloud/notes/android/quicksettings/NewNoteTileService.java')
-rw-r--r--app/src/main/java/it/niedermann/owncloud/notes/android/quicksettings/NewNoteTileService.java34
1 files changed, 0 insertions, 34 deletions
diff --git a/app/src/main/java/it/niedermann/owncloud/notes/android/quicksettings/NewNoteTileService.java b/app/src/main/java/it/niedermann/owncloud/notes/android/quicksettings/NewNoteTileService.java
deleted file mode 100644
index ca101c88..00000000
--- a/app/src/main/java/it/niedermann/owncloud/notes/android/quicksettings/NewNoteTileService.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package it.niedermann.owncloud.notes.android.quicksettings;
-
-import android.annotation.TargetApi;
-import android.content.Intent;
-import android.os.Build;
-import android.service.quicksettings.Tile;
-import android.service.quicksettings.TileService;
-
-import it.niedermann.owncloud.notes.android.activity.EditNoteActivity;
-
-/**
- * This {@link TileService} adds a quick settings tile that leads to the new note view.
- */
-@TargetApi(Build.VERSION_CODES.N)
-public class NewNoteTileService extends TileService {
-
- @Override
- public void onStartListening() {
- Tile tile = getQsTile();
- tile.setState(Tile.STATE_ACTIVE);
-
- tile.updateTile();
- }
-
- @Override
- public void onClick() {
- // create new note intent
- final Intent newNoteIntent = new Intent(getApplicationContext(), EditNoteActivity.class);
- // ensure it won't open twice if already running
- newNoteIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
- // ask to unlock the screen if locked, then start new note intent
- unlockAndRun(() -> startActivityAndCollapse(newNoteIntent));
- }
-}