Add the intent EXTRA for settings metrics

1. Extra name: EXTRA_ENTRYPOINT
2. Value: Value: integer which is from SettingsEnums.EntryPointType

Bug: 271391879
Test: manual and check the device log.
Change-Id: Icf9f74aa9d2a1b1ba9abcd5c2d18c751e693d5ef
This commit is contained in:
danielwbhuang
2023-07-06 20:38:41 +08:00
parent 65599805dc
commit 2cc7f546fb
2 changed files with 13 additions and 0 deletions

View File

@@ -2185,6 +2185,16 @@ public final class Settings {
public static final String ACTION_APP_NOTIFICATION_BUBBLE_SETTINGS
= "android.settings.APP_NOTIFICATION_BUBBLE_SETTINGS";
/**
* Intent Extra: The value of {@link android.app.settings.SettingsEnums#EntryPointType} for
* settings metrics that logs the entry point about physical keyboard settings.
* <p>
* This must be passed as an extra field to the {@link #ACTION_HARD_KEYBOARD_SETTINGS}.
* @hide
*/
public static final String EXTRA_ENTRYPOINT =
"com.android.settings.inputmethod.EXTRA_ENTRYPOINT";
/**
* Activity Extra: The package owner of the notification channel settings to display.
* <p>

View File

@@ -28,6 +28,7 @@ import android.annotation.UserIdInt;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.settings.SettingsEnums;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
@@ -1168,6 +1169,8 @@ final class KeyboardLayoutManager implements InputManager.InputDeviceListener {
if (targetDevice != null) {
intent.putExtra(Settings.EXTRA_INPUT_DEVICE_IDENTIFIER, targetDevice.getIdentifier());
intent.putExtra(
Settings.EXTRA_ENTRYPOINT, SettingsEnums.KEYBOARD_CONFIGURED_NOTIFICATION);
}
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK