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

Commit 26ae351e authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge changes from topic "am-f11f18b2b65b466dba0b6a1e1313cdbf" into qt-dev-plus-aosp

* changes:
  Merge changes from topic "RemoveTempStatsLogWrite" into qt-dev am: a0ee2c4e
  Remove StatsLog.write am: b03d0518
parents 248f90bd 8636f43d
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -48570,7 +48570,6 @@ package android.util {
    method public static boolean logEvent(int);
    method public static boolean logStart(int);
    method public static boolean logStop(int);
    method public static void write(int, @NonNull java.lang.Object...);
  }
  public class StringBuilderPrinter implements android.util.Printer {
+0 −16
Original line number Diff line number Diff line
@@ -9462,22 +9462,6 @@ package android.util {
    method public static void writeRaw(@NonNull byte[], int);
  }
  public class StatsLogAtoms {
    field public static final int PERMISSION_GRANT_REQUEST_RESULT_REPORTED = 170; // 0xaa
    field public static final int PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__AUTO_DENIED = 8; // 0x8
    field public static final int PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__AUTO_GRANTED = 5; // 0x5
    field public static final int PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__IGNORED = 1; // 0x1
    field public static final int PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__IGNORED_POLICY_FIXED = 3; // 0x3
    field public static final int PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__IGNORED_RESTRICTED_PERMISSION = 9; // 0x9
    field public static final int PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__IGNORED_USER_FIXED = 2; // 0x2
    field public static final int PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__USER_DENIED = 6; // 0x6
    field public static final int PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__USER_DENIED_WITH_PREJUDICE = 7; // 0x7
    field public static final int PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__USER_GRANTED = 4; // 0x4
  }
  @java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.SOURCE) @IntDef(prefix="PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__", value={android.util.StatsLogAtoms.PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__IGNORED, android.util.StatsLogAtoms.PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__IGNORED_USER_FIXED, android.util.StatsLogAtoms.PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__IGNORED_POLICY_FIXED, android.util.StatsLogAtoms.PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__USER_GRANTED, android.util.StatsLogAtoms.PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__AUTO_GRANTED, android.util.StatsLogAtoms.PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__USER_DENIED, android.util.StatsLogAtoms.PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__USER_DENIED_WITH_PREJUDICE, android.util.StatsLogAtoms.PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__AUTO_DENIED}) public static @interface StatsLogAtoms.PermissionGrantRequestResultReported_Result {
  }
}
package android.view {
+2 −1
Original line number Diff line number Diff line
@@ -257,7 +257,8 @@ message Atom {
        BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported = 167;
        ScreenTimeoutExtensionReported screen_timeout_extension_reported = 168;
        ProcessStartTime process_start_time = 169;
        PermissionGrantRequestResultReported permission_grant_request_result_reported = 170;
        PermissionGrantRequestResultReported permission_grant_request_result_reported =
            170 [(log_from_module) = "permissioncontroller"];
        BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171;
        DeviceIdentifierAccessDenied device_identifier_access_denied = 172;
        BubbleDeveloperErrorReported bubble_developer_error_reported = 173;
+0 −15
Original line number Diff line number Diff line
@@ -186,21 +186,6 @@ public final class StatsLog extends StatsLogInternal {
        return sService;
    }

    /**
     * Add a log to the stats log.
     *
     * @param id     The id of the atom
     * @param params The parameters of the atom's message.
     */
    public static void write(int id, @NonNull Object... params) {
        switch (id) {
            case PERMISSION_GRANT_REQUEST_RESULT_REPORTED:
                write(id, (long) params[0], (int) params[1], (String) params[2], (String) params[3],
                        (boolean) params[4], (int) params[5]);
                break;
        }
    }

    /**
     * Write an event to stats log using the raw format.
     *
+0 −122
Original line number Diff line number Diff line
/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.util;

import static java.lang.annotation.RetentionPolicy.SOURCE;

import android.annotation.IntDef;
import android.annotation.SystemApi;

import java.lang.annotation.Retention;

/**
 * Exposed stats logs atom ids.
 *
 * @hide
 */
@SystemApi
public class StatsLogAtoms {
    private StatsLogAtoms() {
    }

    /**
     * Information about a permission grant request
     *
     * Usage: {@code StatsLog.write(PERMISSION_GRANT_REQUEST_RESULT_REPORTED, long request_id,
     * int requesting_uid, String requesting_package_name, String permission_name,
     * boolean is_implicit, @PermissionGrantRequestResultReported_Result int result)}
     */
    public static final int PERMISSION_GRANT_REQUEST_RESULT_REPORTED =
            StatsLogInternal.PERMISSION_GRANT_REQUEST_RESULT_REPORTED;

    @Retention(SOURCE)
    @IntDef(prefix = "PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__",
            value = {PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__IGNORED,
                    PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__IGNORED_USER_FIXED,
                    PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__IGNORED_POLICY_FIXED,
                    PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__USER_GRANTED,
                    PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__AUTO_GRANTED,
                    PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__USER_DENIED,
                    PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__USER_DENIED_WITH_PREJUDICE,
                    PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__AUTO_DENIED})
    public @interface PermissionGrantRequestResultReported_Result {}

    /**
     * Possible value of {@link PermissionGrantRequestResultReported_Result}:
     * permission request was ignored
     */
    public static final int PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__IGNORED =
            StatsLogInternal.PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__IGNORED;

    /**
     * Possible value of {@link PermissionGrantRequestResultReported_Result}:
     * permission request was ignored because it was user fixed
     */
    public static final int PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__IGNORED_USER_FIXED =
            StatsLogInternal.PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__IGNORED_USER_FIXED;

    /**
     * Possible value of {@link PermissionGrantRequestResultReported_Result}:
     * permission request was ignored because it was policy fixed
     */
    public static final int PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__IGNORED_POLICY_FIXED =
            StatsLogInternal.PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__IGNORED_POLICY_FIXED;

    /**
     * Possible value of {@link PermissionGrantRequestResultReported_Result}:
     * permission request was ignored because it was restricted
     */
    public static final int PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__IGNORED_RESTRICTED_PERMISSION =
            StatsLogInternal.PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__IGNORED_RESTRICTED_PERMISSION;

    /**
     * Possible value of {@link PermissionGrantRequestResultReported_Result}:
     * permission was granted by user action
     */
    public static final int PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__USER_GRANTED =
            StatsLogInternal.PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__USER_GRANTED;

    /**
     * Possible value of {@link PermissionGrantRequestResultReported_Result}:
     * permission was automatically granted
     */
    public static final int PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__AUTO_GRANTED =
            StatsLogInternal.PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__AUTO_GRANTED;

    /**
     * Possible value of {@link PermissionGrantRequestResultReported_Result}:
     * permission was denied by user action
     */
    public static final int PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__USER_DENIED =
            StatsLogInternal.PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__USER_DENIED;

    /**
     * Possible value of {@link PermissionGrantRequestResultReported_Result}:
     * permission was denied with prejudice by the user
     */
    public static final int
            PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__USER_DENIED_WITH_PREJUDICE =
            StatsLogInternal
                    .PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__USER_DENIED_WITH_PREJUDICE;

    /**
     * Possible value of {@link PermissionGrantRequestResultReported_Result}:
     * permission was automatically denied
     */
    public static final int PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__AUTO_DENIED =
            StatsLogInternal.PERMISSION_GRANT_REQUEST_RESULT_REPORTED__RESULT__AUTO_DENIED;
}