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

Commit 9b68a1d0 authored by Pablo Gamito's avatar Pablo Gamito Committed by Android (Google) Code Review
Browse files

Merge "Add intDef annotation processor to generate mapping"

parents 23ad68e2 c18f0a35
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -627,6 +627,9 @@ java_library {
        // Additional dependencies needed to build the ike API classes.
        "ike-internals",
    ],
    plugins: [
        "intdef-annotation-processor",
    ],
    libs: ["icing-java-proto-lite"],
    apex_available: ["//apex_available:platform"],
    visibility: [
@@ -887,6 +890,7 @@ java_library {
    exclude_srcs: [
        "core/proto/android/privacy.proto",
        "core/proto/android/section.proto",
        "core/proto/android/typedef.proto",
    ],
    sdk_version: "9",
    srcs: [
@@ -912,6 +916,7 @@ java_library {
    exclude_srcs: [
        "core/proto/android/privacy.proto",
        "core/proto/android/section.proto",
        "core/proto/android/typedef.proto",
    ],
    sdk_version: "core_current",
    // Protos have lots of MissingOverride and similar.
+37 −0
Original line number Diff line number Diff line
@@ -4329,8 +4329,45 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                    equals = STATUS_BAR_TRANSPARENT,
                    name = "STATUS_BAR_TRANSPARENT")
    }, formatToHexString = true)
    @SystemUiVisibility
    int mSystemUiVisibility;
    /**
     * @hide
     */
    @IntDef(flag = true, prefix = "", value = {
            SYSTEM_UI_FLAG_LOW_PROFILE,
            SYSTEM_UI_FLAG_HIDE_NAVIGATION,
            SYSTEM_UI_FLAG_FULLSCREEN,
            SYSTEM_UI_FLAG_LAYOUT_STABLE,
            SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION,
            SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN,
            SYSTEM_UI_FLAG_IMMERSIVE,
            SYSTEM_UI_FLAG_IMMERSIVE_STICKY,
            SYSTEM_UI_FLAG_LIGHT_STATUS_BAR,
            SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR,
            STATUS_BAR_DISABLE_EXPAND,
            STATUS_BAR_DISABLE_NOTIFICATION_ICONS,
            STATUS_BAR_DISABLE_NOTIFICATION_ALERTS,
            STATUS_BAR_DISABLE_NOTIFICATION_TICKER,
            STATUS_BAR_DISABLE_SYSTEM_INFO,
            STATUS_BAR_DISABLE_HOME,
            STATUS_BAR_DISABLE_BACK,
            STATUS_BAR_DISABLE_CLOCK,
            STATUS_BAR_DISABLE_RECENT,
            STATUS_BAR_DISABLE_SEARCH,
            STATUS_BAR_TRANSIENT,
            NAVIGATION_BAR_TRANSIENT,
            STATUS_BAR_UNHIDE,
            NAVIGATION_BAR_UNHIDE,
            STATUS_BAR_TRANSLUCENT,
            NAVIGATION_BAR_TRANSLUCENT,
            NAVIGATION_BAR_TRANSPARENT,
            STATUS_BAR_TRANSPARENT,
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface SystemUiVisibility {}
    /**
     * Reference count for transient state.
     * @see #setHasTransientState(boolean)
+119 −18
Original line number Diff line number Diff line
@@ -1229,32 +1229,54 @@ public interface WindowManager extends ViewManager {
         * @hide
         */
        @IntDef(prefix = "TYPE_", value = {
                TYPE_ACCESSIBILITY_OVERLAY,
                TYPE_BASE_APPLICATION,
                TYPE_APPLICATION,
                TYPE_APPLICATION_ATTACHED_DIALOG,
                TYPE_APPLICATION_MEDIA,
                TYPE_APPLICATION_OVERLAY,
                TYPE_APPLICATION_PANEL,
                TYPE_APPLICATION_STARTING,
                TYPE_APPLICATION_SUB_PANEL,
                TYPE_BASE_APPLICATION,
                TYPE_DRAWN_APPLICATION,
                TYPE_INPUT_METHOD,
                TYPE_INPUT_METHOD_DIALOG,
                TYPE_KEYGUARD,
                TYPE_KEYGUARD_DIALOG,
                TYPE_PHONE,
                TYPE_PRIORITY_PHONE,
                TYPE_PRIVATE_PRESENTATION,
                TYPE_SEARCH_BAR,
                TYPE_APPLICATION_PANEL,
                TYPE_APPLICATION_MEDIA,
                TYPE_APPLICATION_SUB_PANEL,
                TYPE_APPLICATION_ATTACHED_DIALOG,
                TYPE_APPLICATION_MEDIA_OVERLAY,
                TYPE_APPLICATION_ABOVE_SUB_PANEL,
                TYPE_STATUS_BAR,
                TYPE_STATUS_BAR_PANEL,
                TYPE_SEARCH_BAR,
                TYPE_PHONE,
                TYPE_SYSTEM_ALERT,
                TYPE_KEYGUARD,
                TYPE_TOAST,
                TYPE_SYSTEM_OVERLAY,
                TYPE_PRIORITY_PHONE,
                TYPE_SYSTEM_DIALOG,
                TYPE_KEYGUARD_DIALOG,
                TYPE_SYSTEM_ERROR,
                TYPE_SYSTEM_OVERLAY,
                TYPE_TOAST,
                TYPE_INPUT_METHOD,
                TYPE_INPUT_METHOD_DIALOG,
                TYPE_WALLPAPER,
                TYPE_STATUS_BAR_PANEL,
                TYPE_SECURE_SYSTEM_OVERLAY,
                TYPE_DRAG,
                TYPE_STATUS_BAR_SUB_PANEL,
                TYPE_POINTER,
                TYPE_NAVIGATION_BAR,
                TYPE_VOLUME_OVERLAY,
                TYPE_BOOT_PROGRESS,
                TYPE_INPUT_CONSUMER,
                TYPE_NAVIGATION_BAR_PANEL,
                TYPE_DISPLAY_OVERLAY,
                TYPE_MAGNIFICATION_OVERLAY,
                TYPE_PRIVATE_PRESENTATION,
                TYPE_VOICE_INTERACTION,
                TYPE_ACCESSIBILITY_OVERLAY,
                TYPE_VOICE_INTERACTION_STARTING,
                TYPE_DOCK_DIVIDER,
                TYPE_QS_DIALOG,
                TYPE_SCREENSHOT,
                TYPE_PRESENTATION,
                TYPE_APPLICATION_OVERLAY,
                TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY,
                TYPE_NOTIFICATION_SHADE,
                TYPE_STATUS_BAR_ADDITIONAL
        })
        @Retention(RetentionPolicy.SOURCE)
        public @interface WindowType {}
@@ -1714,6 +1736,46 @@ public interface WindowManager extends ViewManager {
         */
        public static final int FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS = 0x80000000;

        /**
         * @hide
         */
        @IntDef(flag = true, prefix = "FLAG_", value = {
                FLAG_ALLOW_LOCK_WHILE_SCREEN_ON,
                FLAG_DIM_BEHIND,
                FLAG_BLUR_BEHIND,
                FLAG_NOT_FOCUSABLE,
                FLAG_NOT_TOUCHABLE,
                FLAG_NOT_TOUCH_MODAL,
                FLAG_TOUCHABLE_WHEN_WAKING,
                FLAG_KEEP_SCREEN_ON,
                FLAG_LAYOUT_IN_SCREEN,
                FLAG_LAYOUT_NO_LIMITS,
                FLAG_FULLSCREEN,
                FLAG_FORCE_NOT_FULLSCREEN,
                FLAG_DITHER,
                FLAG_SECURE,
                FLAG_SCALED,
                FLAG_IGNORE_CHEEK_PRESSES,
                FLAG_LAYOUT_INSET_DECOR,
                FLAG_ALT_FOCUSABLE_IM,
                FLAG_WATCH_OUTSIDE_TOUCH,
                FLAG_SHOW_WHEN_LOCKED,
                FLAG_SHOW_WALLPAPER,
                FLAG_TURN_SCREEN_ON,
                FLAG_DISMISS_KEYGUARD,
                FLAG_SPLIT_TOUCH,
                FLAG_HARDWARE_ACCELERATED,
                FLAG_LAYOUT_IN_OVERSCAN,
                FLAG_TRANSLUCENT_STATUS,
                FLAG_TRANSLUCENT_NAVIGATION,
                FLAG_LOCAL_FOCUS_MODE,
                FLAG_SLIPPERY,
                FLAG_LAYOUT_ATTACHED_IN_DECOR,
                FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS,
        })
        @Retention(RetentionPolicy.SOURCE)
        public @interface Flags {}

        /**
         * Various behavioral options/flags.  Default is none.
         *
@@ -1809,6 +1871,7 @@ public interface WindowManager extends ViewManager {
            @ViewDebug.FlagToString(mask = FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, equals = FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS,
                    name = "DRAWS_SYSTEM_BAR_BACKGROUNDS")
        }, formatToHexString = true)
        @Flags
        public int flags;

        /**
@@ -2027,6 +2090,7 @@ public interface WindowManager extends ViewManager {
         * @hide
         */
        public static final int PRIVATE_FLAG_TRUSTED_OVERLAY = 0x20000000;

        /**
         * An internal annotation for flags that can be specified to {@link #softInputMode}.
         *
@@ -2040,6 +2104,38 @@ public interface WindowManager extends ViewManager {
        })
        public @interface SystemFlags {}

        /**
         * @hide
         */
        @IntDef(flag = true, prefix="PRIVATE_FLAG_", value = {
                PRIVATE_FLAG_FAKE_HARDWARE_ACCELERATED,
                PRIVATE_FLAG_FORCE_HARDWARE_ACCELERATED,
                PRIVATE_FLAG_WANTS_OFFSET_NOTIFICATIONS,
                SYSTEM_FLAG_SHOW_FOR_ALL_USERS,
                PRIVATE_FLAG_NO_MOVE_ANIMATION,
                PRIVATE_FLAG_COMPATIBLE_WINDOW,
                PRIVATE_FLAG_SYSTEM_ERROR,
                PRIVATE_FLAG_DISABLE_WALLPAPER_TOUCH_EVENTS,
                PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR,
                PRIVATE_FLAG_PRESERVE_GEOMETRY,
                PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY,
                PRIVATE_FLAG_WILL_NOT_REPLACE_ON_RELAUNCH,
                PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME,
                PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS,
                PRIVATE_FLAG_SUSTAINED_PERFORMANCE_MODE,
                SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS,
                PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY,
                PRIVATE_FLAG_IS_SCREEN_DECOR,
                PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION,
                PRIVATE_FLAG_COLOR_SPACE_AGNOSTIC,
                PRIVATE_FLAG_USE_BLAST,
                PRIVATE_FLAG_APPEARANCE_CONTROLLED,
                PRIVATE_FLAG_BEHAVIOR_CONTROLLED,
                PRIVATE_FLAG_FIT_INSETS_CONTROLLED,
                PRIVATE_FLAG_TRUSTED_OVERLAY,
        })
        public @interface PrivateFlags {}

        /**
         * Control flags that are private to the platform.
         * @hide
@@ -2126,6 +2222,10 @@ public interface WindowManager extends ViewManager {
                        mask = PRIVATE_FLAG_COLOR_SPACE_AGNOSTIC,
                        equals = PRIVATE_FLAG_COLOR_SPACE_AGNOSTIC,
                        name = "COLOR_SPACE_AGNOSTIC"),
                @ViewDebug.FlagToString(
                        mask = PRIVATE_FLAG_USE_BLAST,
                        equals = PRIVATE_FLAG_USE_BLAST,
                        name = "USE_BLAST"),
                @ViewDebug.FlagToString(
                        mask = PRIVATE_FLAG_APPEARANCE_CONTROLLED,
                        equals = PRIVATE_FLAG_APPEARANCE_CONTROLLED,
@@ -2143,6 +2243,7 @@ public interface WindowManager extends ViewManager {
                        equals = PRIVATE_FLAG_TRUSTED_OVERLAY,
                        name = "TRUSTED_OVERLAY")
        })
        @PrivateFlags
        @TestApi
        public int privateFlags;

+8 −7
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import "frameworks/base/core/proto/android/view/enums.proto";
import "frameworks/base/core/proto/android/view/surface.proto";
import "frameworks/base/core/proto/android/view/windowlayoutparams.proto";
import "frameworks/base/core/proto/android/privacy.proto";
import "frameworks/base/core/proto/android/typedef.proto";

package com.android.server.wm;

@@ -43,8 +44,8 @@ message WindowManagerServiceDumpProto {
    optional string focused_app = 4;
    optional IdentifierProto input_method_window = 5;
    optional bool display_frozen = 6;
    optional int32 rotation = 7;
    optional int32 last_orientation = 8;
    optional int32 rotation = 7 [(.android.typedef) = "android.view.Surface.Rotation"];
    optional int32 last_orientation = 8 [(.android.typedef) = "android.content.pm.ActivityInfo.ScreenOrientation"];
    optional int32 focused_display_id = 9;
}

@@ -177,7 +178,7 @@ message DisplayContentProto {
    repeated WindowTokenProto ime_windows = 8 [deprecated=true];
    optional int32 dpi = 9;
    optional .android.view.DisplayInfoProto display_info = 10;
    optional int32 rotation = 11;
    optional int32 rotation = 11 [(.android.typedef) = "android.view.Surface.Rotation"];
    optional ScreenRotationAnimationProto screen_rotation_animation = 12;
    optional DisplayFramesProto display_frames = 13;
    optional int32 surface_size = 14 [deprecated=true];
@@ -264,8 +265,8 @@ message TaskProto {

    optional int32 display_id = 15;
    optional int32 root_task_id = 16;
    optional int32 activity_type = 17;
    optional int32 resize_mode = 18;
    optional int32 activity_type = 17 [(.android.typedef) = "android.app.WindowConfiguration.ActivityType"];
    optional int32 resize_mode = 18 [(.android.typedef) = "android.appwidget.AppWidgetProviderInfo.ResizeModeFlags"];
    optional int32 min_width = 19;
    optional int32 min_height = 20;

@@ -351,7 +352,7 @@ message WindowStateProto {
    optional .android.graphics.RectProto surface_position = 16;
    optional int32 requested_width = 18;
    optional int32 requested_height = 19;
    optional int32 view_visibility = 20;
    optional int32 view_visibility = 20 [(.android.typedef) = "android.view.View.Visibility"];
    optional int32 system_ui_visibility = 21;
    optional bool has_surface = 22;
    optional bool is_ready_for_display = 23;
@@ -424,7 +425,7 @@ message WindowContainerProto {
    option (.android.msg_privacy).dest = DEST_AUTOMATIC;

    optional ConfigurationContainerProto configuration_container = 1;
    optional int32 orientation = 2;
    optional int32 orientation = 2 [(.android.typedef) = "android.content.pm.ActivityInfo.ScreenOrientation"];
    optional bool visible = 3;
    optional SurfaceAnimatorProto surface_animator = 4;
    repeated WindowContainerChildProto children = 5;
+30 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2020 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;

import "google/protobuf/descriptor.proto";

extend google.protobuf.FieldOptions {
  // Used to specify the IntDef annotation type so that ints
  // can be associated with their string representation

  // 60001 is a random field numbers assigned to the custom options
  // numbers between 50000 and 99999 are reserved for internal use within individual organizations
  optional string typedef = 60001;
}
Loading