Revert "[Regional Preference] Need to remove the metrics by the metrics concil"

This reverts commit ae32c8e8a5.

Reason for revert: <Add metrics>

Change-Id: I85631130b975df18e7f4f6056bae7f13cf56008f
This commit is contained in:
Zoey Chen
2023-11-01 07:41:02 +00:00
parent 1742fa2ed0
commit 026dfe0aa0
3 changed files with 23 additions and 0 deletions

View File

@@ -16,6 +16,7 @@
package com.android.settings.localepicker;
import android.app.settings.SettingsEnums;
import android.content.Context;
import android.graphics.Canvas;
import android.os.Bundle;
@@ -38,6 +39,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.android.internal.app.LocalePicker;
import com.android.internal.app.LocaleStore;
import com.android.settings.R;
import com.android.settings.overlay.FeatureFactory;
import com.android.settings.shortcut.ShortcutsUpdateTask;
import java.text.NumberFormat;
@@ -225,6 +227,12 @@ class LocaleDragAndDropAdapter
"Negative position in onItemMove %d -> %d", fromPosition, toPosition));
}
if (fromPosition != toPosition) {
FeatureFactory.getFeatureFactory().getMetricsFeatureProvider()
.action(mContext, SettingsEnums.ACTION_REORDER_LANGUAGE,
mDragLocale.getLocale().toLanguageTag() + " move to " + toPosition);
}
notifyItemChanged(fromPosition); // to update the numbers
notifyItemChanged(toPosition);
notifyItemMoved(fromPosition, toPosition);
@@ -263,6 +271,9 @@ class LocaleDragAndDropAdapter
for (int i = itemCount - 1; i >= 0; i--) {
localeInfo = mFeedItemList.get(i);
if (localeInfo.getChecked()) {
FeatureFactory.getFeatureFactory().getMetricsFeatureProvider()
.action(mContext, SettingsEnums.ACTION_REMOVE_LANGUAGE,
localeInfo.getLocale().toLanguageTag());
mFeedItemList.remove(i);
}
}