Increment TeX counters for the HCT migration notification.
See the corresponding TeX change for more details.
Bug: 369906140
Flag: com.android.graphics.hwui.flags.high_contrast_text_small_text_rect
Test: run statsd_testdrive 644 and verify the output when the
notification appears
Test: ensure that rotating / restarting the activity does not trigger
multiple increments to the counter
Change-Id: Iea01962611e3e327cfbde6f3451f7f1ec54b955e
This commit is contained in:
@@ -36,6 +36,7 @@ import android.util.Log;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.android.graphics.hwui.flags.Flags;
|
||||
import com.android.modules.expresslog.Counter;
|
||||
import com.android.settings.R;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
@@ -166,6 +167,7 @@ public class HighContrastTextMigrationReceiver extends BroadcastReceiver {
|
||||
NotificationManager.IMPORTANCE_LOW);
|
||||
notificationManager.createNotificationChannel(notificationChannel);
|
||||
notificationManager.notify(NOTIFICATION_ID, notificationBuilder.build());
|
||||
Counter.logIncrement("accessibility.value_hct_notification_posted");
|
||||
}
|
||||
|
||||
private Intent createHighContrastTextSettingsIntent(Context context) {
|
||||
@@ -174,6 +176,8 @@ public class HighContrastTextMigrationReceiver extends BroadcastReceiver {
|
||||
Bundle fragmentArgs = new Bundle();
|
||||
fragmentArgs.putString(EXTRA_FRAGMENT_ARG_KEY,
|
||||
TextReadingPreferenceFragment.HIGH_TEXT_CONTRAST_KEY);
|
||||
fragmentArgs.putInt(TextReadingPreferenceFragment.EXTRA_LAUNCHED_FROM,
|
||||
TextReadingPreferenceFragment.EntryPoint.HIGH_CONTRAST_TEXT_NOTIFICATION);
|
||||
settingsIntent.putExtra(EXTRA_SHOW_FRAGMENT_ARGUMENTS, fragmentArgs);
|
||||
return settingsIntent;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user