Merge "Add the intent EXTRA for settings metrics" into udc-qpr-dev

This commit is contained in:
Daniel Huang
2023-07-11 09:09:02 +00:00
committed by Android (Google) Code Review
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