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

Commit 257046fa authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "incidentd: Updating PowerManagerService proto files."

parents fe0c2c45 e6b00c2a
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -501,7 +501,7 @@ public class ActivityManager {
    public static final int PROCESS_STATE_SERVICE = 11;

    /** @hide Process is in the background running a receiver.   Note that from the
     * perspective of oom_adj receivers run at a higher foreground level, but for our
     * perspective of oom_adj, receivers run at a higher foreground level, but for our
     * prioritization here that is not necessary and putting them below services means
     * many fewer changes in some process states as they receive broadcasts. */
    public static final int PROCESS_STATE_RECEIVER = 12;
@@ -525,6 +525,20 @@ public class ActivityManager {
    /** @hide Process does not exist. */
    public static final int PROCESS_STATE_NONEXISTENT = 18;

    // NOTE: If PROCESS_STATEs are added or changed, then new fields must be added
    // to frameworks/base/core/proto/android/app/activitymanager.proto and the following method must
    // be updated to correctly map between them.
    /**
     * Maps ActivityManager.PROCESS_STATE_ values to ActivityManagerProto.ProcessState enum.
     *
     * @param amInt a process state of the form ActivityManager.PROCESS_STATE_
     * @return the value of the corresponding android.app.ActivityManagerProto's ProcessState enum.
     * @hide
     */
    public static final int processStateAmToProto(int amInt) {
        return amInt * 100;
    }

    /** @hide The lowest process state number */
    public static final int MIN_PROCESS_STATE = PROCESS_STATE_PERSISTENT;

+80 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 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.
 */

syntax = "proto2";

package android.app;

option java_multiple_files = true;

message ActivityManagerProto {

    // ActivityManager.java PROCESS_STATEs
    enum ProcessState {
      // Order matters for process states, so values have been spaced to provide
      // room for future additions.

      // Not a real process state.
      PROCESS_STATE_UNKNOWN = -100;
      // Process is a persistent system process.
      PROCESS_STATE_PERSISTENT = 0;
      // Process is a persistent system process and is doing UI.
      PROCESS_STATE_PERSISTENT_UI = 100;
      // Process is hosting the current top activities. Note that this covers
      // all activities that are visible to the user.
      PROCESS_STATE_TOP = 200;
      // Process is hosting a foreground service due to a system binding.
      PROCESS_STATE_BOUND_FOREGROUND_SERVICE = 300;
      // Process is hosting a foreground service.
      PROCESS_STATE_FOREGROUND_SERVICE = 400;
      // Same as PROCESS_STATE_TOP but while device is sleeping.
      PROCESS_STATE_TOP_SLEEPING = 500;
      // Process is important to the user, and something they are aware of.
      PROCESS_STATE_IMPORTANT_FOREGROUND = 600;
      // Process is important to the user, but not something they are aware of.
      PROCESS_STATE_IMPORTANT_BACKGROUND = 700;
      // Process is in the background transient so we will try to keep running.
      PROCESS_STATE_TRANSIENT_BACKGROUND = 800;
      // Process is in the background running a backup/restore operation.
      PROCESS_STATE_BACKUP = 900;
      // Process is in the background, but it can't restore its state so we want
      // to try to avoid killing it.
      PROCESS_STATE_HEAVY_WEIGHT = 1000;
      // Process is in the background running a service. Unlike oom_adj, this
      // level is used for both the normal running in background state and the
      // executing operations state.
      PROCESS_STATE_SERVICE = 1100;
      // Process is in the background running a receiver. Note that from the
      // perspective of oom_adj, receivers run at a higher foreground level, but
      // for our prioritization here that is not necessary and putting them
      // below services means many fewer changes in some process states as they
      // receive broadcasts.
      PROCESS_STATE_RECEIVER = 1200;
      // Process is in the background but hosts the home activity.
      PROCESS_STATE_HOME = 1300;
      // Process is in the background but hosts the last shown activity.
      PROCESS_STATE_LAST_ACTIVITY = 1400;
      // Process is being cached for later use and contains activities.
      PROCESS_STATE_CACHED_ACTIVITY = 1500;
      // Process is being cached for later use and is a client of another cached
      // process that contains activities.
      PROCESS_STATE_CACHED_ACTIVITY_CLIENT = 1600;
      // Process is being cached for later use and is empty.
      PROCESS_STATE_CACHED_EMPTY = 1700;
      // Process does not exist.
      PROCESS_STATE_NONEXISTENT = 1800;
    }
}
+24 −2
Original line number Diff line number Diff line
@@ -15,15 +15,37 @@
 */

syntax = "proto2";
package android.content;

option java_package = "android.content";
option java_multiple_files = true;

import "frameworks/base/core/proto/android/os/patternmatcher.proto";

package android.content;

// Next Tag: 13
message IntentProto {
    enum DockState {
        // Used as an int value for Intent#EXTRA_DOCK_STATE to represent that
        // the phone is not in any dock.
        DOCK_STATE_UNDOCKED = 0;

        // Used as an int value for Intent#EXTRA_DOCK_STATE to represent that
        // the phone is in a desk dock.
        DOCK_STATE_DESK = 1;

        // Used as an int value for Intent#EXTRA_DOCK_STATE to represent that
        // the phone is in a car dock.
        DOCK_STATE_CAR = 2;

        // Used as an int value for Intent#EXTRA_DOCK_STATE to represent that
        // the phone is in a analog (low end) dock.
        DOCK_STATE_LE_DESK = 3;

        // Used as an int value for Intent#EXTRA_DOCK_STATE to represent that
        // the phone is in a digital (high end) dock.
        DOCK_STATE_HE_DESK = 4;
    }

    optional string action = 1;
    repeated string categories = 2;
    optional string data = 3;
+29 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2017 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.
 */

syntax = "proto2";
package android.os;

option java_multiple_files = true;

message BatteryManagerProto {
    enum PlugType {
        PLUG_TYPE_NONE = 0;
        PLUG_TYPE_AC = 1;
        PLUG_TYPE_USB = 2;
        PLUG_TYPE_WIRELESS = 4;
    }
}
+6 −2
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ option java_outer_classname = "IncidentProtoMetadata";

import "frameworks/base/libs/incident/proto/android/privacy.proto";
import "frameworks/base/libs/incident/proto/android/section.proto";
import "frameworks/base/core/proto/android/server/powermanagerservice.proto";
import "frameworks/base/core/proto/android/service/appwidget.proto";
import "frameworks/base/core/proto/android/service/battery.proto";
import "frameworks/base/core/proto/android/service/batterystats.proto";
@@ -28,7 +29,6 @@ import "frameworks/base/core/proto/android/service/diskstats.proto";
import "frameworks/base/core/proto/android/service/netstats.proto";
import "frameworks/base/core/proto/android/service/notification.proto";
import "frameworks/base/core/proto/android/service/package.proto";
import "frameworks/base/core/proto/android/service/power.proto";
import "frameworks/base/core/proto/android/service/print.proto";
import "frameworks/base/core/proto/android/service/procstats.proto";
import "frameworks/base/core/proto/android/server/activitymanagerservice.proto";
@@ -106,7 +106,11 @@ message IncidentProto {
        (section).args = "package --proto"
    ];

    optional android.service.power.PowerServiceDumpProto power = 3009;
    optional com.android.server.power.PowerManagerServiceDumpProto power = 3009 [
        (section).type = SECTION_DUMPSYS,
        (section).args = "power --proto"
    ];

    optional android.service.print.PrintServiceDumpProto print = 3010;

    optional android.service.procstats.ProcessStatsServiceDumpProto procstats = 3011 [
Loading