Use EXTRA_ENTRYPOINT to log entry point for metrics

1. Extra name: EXTRA_ENTRYPOINT
2. Value: integer which is from SettingsEnums.EntryPointType
// access physical keyboard settings through keyboard configured notification entry point
KEYBOARD_CONFIGURED_NOTIFICATION = 0;
// access physical keyboard settings through keyboard settings entry point
KEYBOARD_SETTINGS = 1;
// access physical keyboard settings through connected devices settings entry point
CONNECTED_DEVICES_SETTINGS = 2;

Bug: 271391879
Test: manual and check the device log.
Change-Id: I0d5144790e184eb3374d4615d8874619c372742a
This commit is contained in:
danielwbhuang
2023-07-06 20:28:44 +08:00
parent 2070808a62
commit f76c528e5b
4 changed files with 7 additions and 14 deletions

View File

@@ -16,6 +16,7 @@
package com.android.settings.inputmethod;
import android.app.settings.SettingsEnums;
import android.content.Context;
import android.content.Intent;
import android.provider.Settings;
@@ -53,8 +54,7 @@ public class KeyboardSettingsPreferenceController extends BasePreferenceControll
if (mCachedDevice.getAddress().equals(hardKeyboardDeviceInfo.mBluetoothAddress)) {
Intent intent = new Intent(Settings.ACTION_HARD_KEYBOARD_SETTINGS);
intent.putExtra(
NewKeyboardSettingsUtils.EXTRA_INTENT_FROM,
"com.android.settings.inputmethod.KeyboardSettingsPreferenceController");
Settings.EXTRA_ENTRYPOINT, SettingsEnums.CONNECTED_DEVICES_SETTINGS);
intent.putExtra(
Settings.EXTRA_INPUT_DEVICE_IDENTIFIER,
hardKeyboardDeviceInfo.mDeviceIdentifier);