Skip to content

Commit

Permalink
[android] Remove dead code from DownloaderNotifier
Browse files Browse the repository at this point in the history
`EXTRA_CANCEL_NOTIFICATION` is not used in the code
since 70a0ffa "Removed metrics and local notifications".

Signed-off-by: Roman Tsisyk <[email protected]>
  • Loading branch information
rtsisyk committed Sep 17, 2023
1 parent 38cf62b commit adb93c6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
3 changes: 0 additions & 3 deletions android/app/src/main/java/app/organicmaps/MwmActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import androidx.lifecycle.ViewModelProvider;
import app.organicmaps.Framework.PlacePageActivationListener;
import app.organicmaps.api.Const;
import app.organicmaps.downloader.DownloaderNotifier;
import app.organicmaps.base.BaseMwmFragmentActivity;
import app.organicmaps.base.CustomNavigateUpListener;
import app.organicmaps.base.NoConnectionListener;
Expand Down Expand Up @@ -953,8 +952,6 @@ private boolean processIntent(Intent intent)
if (intent == null)
return false;

DownloaderNotifier.processNotificationExtras(getApplicationContext(), intent);

if (intent.hasExtra(EXTRA_TASK))
{
addTask(intent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ public abstract class DownloaderNotifier
private static final String TAG = DownloaderNotifier.class.getSimpleName();

private static final String CHANNEL_ID = "downloader";

private static final String EXTRA_CANCEL_NOTIFICATION = "extra_cancel_downloader_notification";
private static final int NOTIFICATION_ID = 1;

public static void createNotificationChannel(@NonNull Context context)
Expand Down Expand Up @@ -89,14 +87,6 @@ static void cancelNotification(@NonNull Context context)
notificationManager.cancel(NOTIFICATION_ID);
}

public static void processNotificationExtras(@NonNull Context context, @Nullable Intent intent)
{
if (!intent.hasExtra(EXTRA_CANCEL_NOTIFICATION))
return;

cancelNotification(context);
}

@NonNull
private static CharSequence getTicker(@NonNull Context context, @NonNull String title, @NonNull String content)
{
Expand Down

0 comments on commit adb93c6

Please sign in to comment.