merge in oc-release history after reset to oc-dev
diff --git a/src/com/android/stk/StkAppService.java b/src/com/android/stk/StkAppService.java
index 0033662..1c1b33a 100755
--- a/src/com/android/stk/StkAppService.java
+++ b/src/com/android/stk/StkAppService.java
@@ -576,8 +576,6 @@
for (int slot = PhoneConstants.SIM_ID_1; slot < mSimCount; slot++) {
checkForSetupEvent(LANGUAGE_SELECTION_EVENT, (Bundle) msg.obj, slot);
}
- // rename all registered notification channels on locale change
- createAllChannels();
break;
case OP_ALPHA_NOTIFY:
handleAlphaNotify((Bundle) msg.obj);
@@ -1574,7 +1572,15 @@
CatLog.d(LOG_TAG, "Add IdleMode text");
PendingIntent pendingIntent = PendingIntent.getService(mContext, 0,
new Intent(mContext, StkAppService.class), 0);
- createAllChannels();
+ /* Creates the notification channel and registers it with NotificationManager.
+ * If a channel with the same ID is already registered, NotificationManager will
+ * ignore this call.
+ */
+ mNotificationManager.createNotificationChannel(new NotificationChannel(
+ STK_NOTIFICATION_CHANNEL_ID,
+ getResources().getString(R.string.stk_channel_name),
+ NotificationManager.IMPORTANCE_MIN));
+
final Notification.Builder notificationBuilder = new Notification.Builder(
StkAppService.this, STK_NOTIFICATION_CHANNEL_ID);
if (mStkContext[slotId].mMainCmd != null &&
@@ -1607,17 +1613,6 @@
}
}
- /** Creates the notification channel and registers it with NotificationManager.
- * If a channel with the same ID is already registered, NotificationManager will
- * ignore this call.
- */
- private void createAllChannels() {
- mNotificationManager.createNotificationChannel(new NotificationChannel(
- STK_NOTIFICATION_CHANNEL_ID,
- getResources().getString(R.string.stk_channel_name),
- NotificationManager.IMPORTANCE_MIN));
- }
-
private void launchToneDialog(int slotId) {
Intent newIntent = new Intent(this, ToneDialog.class);
String uriString = STK_TONE_URI + slotId;