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

Commit 4d2327b7 authored by Hyundo Moon's avatar Hyundo Moon Committed by Gerrit Code Review
Browse files

Merge "BluetoothPbapActivity: Log error metrics" into main

parents 2cfb225b 8ad697c9
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -36,6 +36,8 @@ import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTE

import android.bluetooth.AlertActivity;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothProfile;
import android.bluetooth.BluetoothProtoEnums;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
@@ -53,6 +55,7 @@ import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import com.android.bluetooth.BluetoothStatsLog;
import com.android.bluetooth.R;
import com.android.internal.annotations.VisibleForTesting;

@@ -61,6 +64,7 @@ import com.android.internal.annotations.VisibleForTesting;
 * the other prompts the user to enter a session key for authentication with a
 * remote Bluetooth device.
 */
// Next tag value for BluetoothStatsLog.BLUETOOTH_CONTENT_PROFILE_ERROR_REPORTED: 1
public class BluetoothPbapActivity extends AlertActivity
        implements Preference.OnPreferenceChangeListener, TextWatcher {
    private static final String TAG = "BluetoothPbapActivity";
@@ -118,6 +122,12 @@ public class BluetoothPbapActivity extends AlertActivity
        } else {
            Log.e(TAG, "Error: this activity may be started only with intent "
                    + "PBAP_ACCESS_REQUEST or PBAP_AUTH_CHALL ");
            BluetoothStatsLog.write(
                    BluetoothStatsLog.BLUETOOTH_CONTENT_PROFILE_ERROR_REPORTED,
                    BluetoothProfile.PBAP,
                    BluetoothProtoEnums.BLUETOOTH_PBAP_ACTIVITY,
                    BluetoothStatsLog.BLUETOOTH_CONTENT_PROFILE_ERROR_REPORTED__TYPE__LOG_ERROR,
                    0);
            finish();
        }
        IntentFilter filter = new IntentFilter(BluetoothPbapService.USER_CONFIRM_TIMEOUT_ACTION);