Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2cc7f546 authored by danielwbhuang's avatar danielwbhuang
Browse files

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
parent 65599805
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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>
+3 −0
Original line number Diff line number Diff line
@@ -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