Remove unused method for dictionarypack
Remove the showDictionaryAvailableNotification
method since there is no module use it.
Bug: 209479751
Test: presubmit
Change-Id: I4c88b4a2d0cb36761d9102ce35260f93303625d9
diff --git a/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java b/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java
index 0517bc8..bdea3e9 100644
--- a/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java
+++ b/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java
@@ -19,9 +19,6 @@
import android.app.DownloadManager;
import android.app.DownloadManager.Query;
import android.app.DownloadManager.Request;
-import android.app.Notification;
-import android.app.NotificationManager;
-import android.app.PendingIntent;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
@@ -36,10 +33,7 @@
import android.text.TextUtils;
import android.util.Log;
-import com.android.inputmethod.compat.ConnectivityManagerCompatUtils;
-import com.android.inputmethod.compat.NotificationCompatUtils;
import com.android.inputmethod.latin.R;
-import com.android.inputmethod.latin.common.LocaleUtils;
import com.android.inputmethod.latin.makedict.FormatSpec;
import com.android.inputmethod.latin.utils.ApplicationUtils;
import com.android.inputmethod.latin.utils.DebugLogUtils;
@@ -844,54 +838,6 @@
}
/**
- * Shows the notification that informs the user a dictionary is available.
- *
- * When this notification is clicked, the dialog for downloading the dictionary
- * over a metered connection is shown.
- */
- private static void showDictionaryAvailableNotification(final Context context,
- final String clientId, final ContentValues installCandidate) {
- final String localeString = installCandidate.getAsString(MetadataDbHelper.LOCALE_COLUMN);
- final Intent intent = new Intent();
- intent.setClass(context, DownloadOverMeteredDialog.class);
- intent.putExtra(DownloadOverMeteredDialog.CLIENT_ID_KEY, clientId);
- intent.putExtra(DownloadOverMeteredDialog.WORDLIST_TO_DOWNLOAD_KEY,
- installCandidate.getAsString(MetadataDbHelper.WORDLISTID_COLUMN));
- intent.putExtra(DownloadOverMeteredDialog.SIZE_KEY,
- installCandidate.getAsInteger(MetadataDbHelper.FILESIZE_COLUMN));
- intent.putExtra(DownloadOverMeteredDialog.LOCALE_KEY, localeString);
- intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
- final PendingIntent notificationIntent = PendingIntent.getActivity(context,
- 0 /* requestCode */, intent,
- PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_ONE_SHOT);
- final NotificationManager notificationManager =
- (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
- // None of those are expected to happen, but just in case...
- if (null == notificationIntent || null == notificationManager) return;
-
- final String language = (null == localeString) ? ""
- : LocaleUtils.constructLocaleFromString(localeString).getDisplayLanguage();
- final String titleFormat = context.getString(R.string.dict_available_notification_title);
- final String notificationTitle = String.format(titleFormat, language);
- final Notification.Builder builder = new Notification.Builder(context)
- .setAutoCancel(true)
- .setContentIntent(notificationIntent)
- .setContentTitle(notificationTitle)
- .setContentText(context.getString(R.string.dict_available_notification_description))
- .setTicker(notificationTitle)
- .setOngoing(false)
- .setOnlyAlertOnce(true)
- .setSmallIcon(R.drawable.ic_notify_dictionary);
- NotificationCompatUtils.setColor(builder,
- context.getResources().getColor(R.color.notification_accent_color));
- NotificationCompatUtils.setPriorityToLow(builder);
- NotificationCompatUtils.setVisibilityToSecret(builder);
- NotificationCompatUtils.setCategoryToRecommendation(builder);
- final Notification notification = NotificationCompatUtils.build(builder);
- notificationManager.notify(DICT_AVAILABLE_NOTIFICATION_ID, notification);
- }
-
- /**
* Installs a word list if it has never been requested.
*
* This is called when a word list is requested, and is available but not installed. It checks