Loading aidl/gui/android/view/LayerMetadataKey.aidl 0 → 100644 +26 −0 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.view; /** @hide */ @Backing(type="int") enum LayerMetadataKey { METADATA_OWNER_UID = 1, METADATA_WINDOW_TYPE = 2, METADATA_TASK_ID = 3, METADATA_MOUSE_CURSOR = 4, } libs/gui/Android.bp +5 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ cc_library_shared { defaults: ["libgui_bufferqueue-defaults"], srcs: [ ":framework_native_aidl", ":libgui_bufferqueue_sources", "BitTube.cpp", Loading Loading @@ -106,6 +107,10 @@ cc_library_shared { "libdvr_headers", "libpdx_headers", ], aidl: { export_aidl_headers: true, } } // Used by media codec services exclusively as a static lib for Loading libs/gui/LayerMetadata.cpp +6 −4 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ #include <binder/Parcel.h> #include <gui/LayerMetadata.h> #include "android/view/LayerMetadataKey.h" using android::base::StringPrintf; namespace android { Loading Loading @@ -113,12 +115,12 @@ void LayerMetadata::setInt32(uint32_t key, int32_t value) { std::string LayerMetadata::itemToString(uint32_t key, const char* separator) const { if (!has(key)) return std::string(); switch (key) { case METADATA_OWNER_UID: switch (static_cast<view::LayerMetadataKey>(key)) { case view::LayerMetadataKey::METADATA_OWNER_UID: return StringPrintf("ownerUID%s%d", separator, getInt32(key, 0)); case METADATA_WINDOW_TYPE: case view::LayerMetadataKey::METADATA_WINDOW_TYPE: return StringPrintf("windowType%s%d", separator, getInt32(key, 0)); case METADATA_TASK_ID: case view::LayerMetadataKey::METADATA_TASK_ID: return StringPrintf("taskId%s%d", separator, getInt32(key, 0)); default: return StringPrintf("%d%s%dbytes", key, separator, Loading Loading
aidl/gui/android/view/LayerMetadataKey.aidl 0 → 100644 +26 −0 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.view; /** @hide */ @Backing(type="int") enum LayerMetadataKey { METADATA_OWNER_UID = 1, METADATA_WINDOW_TYPE = 2, METADATA_TASK_ID = 3, METADATA_MOUSE_CURSOR = 4, }
libs/gui/Android.bp +5 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ cc_library_shared { defaults: ["libgui_bufferqueue-defaults"], srcs: [ ":framework_native_aidl", ":libgui_bufferqueue_sources", "BitTube.cpp", Loading Loading @@ -106,6 +107,10 @@ cc_library_shared { "libdvr_headers", "libpdx_headers", ], aidl: { export_aidl_headers: true, } } // Used by media codec services exclusively as a static lib for Loading
libs/gui/LayerMetadata.cpp +6 −4 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ #include <binder/Parcel.h> #include <gui/LayerMetadata.h> #include "android/view/LayerMetadataKey.h" using android::base::StringPrintf; namespace android { Loading Loading @@ -113,12 +115,12 @@ void LayerMetadata::setInt32(uint32_t key, int32_t value) { std::string LayerMetadata::itemToString(uint32_t key, const char* separator) const { if (!has(key)) return std::string(); switch (key) { case METADATA_OWNER_UID: switch (static_cast<view::LayerMetadataKey>(key)) { case view::LayerMetadataKey::METADATA_OWNER_UID: return StringPrintf("ownerUID%s%d", separator, getInt32(key, 0)); case METADATA_WINDOW_TYPE: case view::LayerMetadataKey::METADATA_WINDOW_TYPE: return StringPrintf("windowType%s%d", separator, getInt32(key, 0)); case METADATA_TASK_ID: case view::LayerMetadataKey::METADATA_TASK_ID: return StringPrintf("taskId%s%d", separator, getInt32(key, 0)); default: return StringPrintf("%d%s%dbytes", key, separator, Loading