blob: cf61209d6cd2f9329c23d13c4c23dd9505fde7bc [file] [log] [blame]
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -08001/*
2 * Copyright (C) 2008 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Vishnu Nair217d8e62018-09-12 16:34:49 -070017#define LOG_TAG "LayerState"
18
Ady Abrahamdd5bfa92021-01-07 17:56:08 -080019#include <apex/window.h>
Garfield Tan8a3083e2018-12-03 13:21:07 -080020#include <inttypes.h>
21
Marin Shalamanovc5986772021-03-16 16:09:49 +010022#include <android/native_window.h>
Mathias Agopianc5b2c0b2009-05-19 19:08:10 -070023#include <binder/Parcel.h>
Andy McFadden2adaf042012-12-18 09:49:45 -080024#include <gui/IGraphicBufferProducer.h>
Pablo Gamito11dcc222020-09-12 15:49:39 +000025#include <gui/ISurfaceComposerClient.h>
Robert Carr4cdc58f2017-08-23 14:22:20 -070026#include <gui/LayerState.h>
Marin Shalamanov3b1f7bc2021-03-16 15:51:53 +010027#include <private/gui/ParcelUtils.h>
Pablo Gamito11dcc222020-09-12 15:49:39 +000028#include <utils/Errors.h>
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080029
Steven Thomas62a4cf82020-01-31 12:04:03 -080030#include <cmath>
31
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080032namespace android {
33
chaviw98318de2021-05-19 16:45:23 -050034using gui::FocusRequest;
35using gui::WindowInfoHandle;
36
Pablo Gamito11dcc222020-09-12 15:49:39 +000037layer_state_t::layer_state_t()
38 : what(0),
39 x(0),
40 y(0),
41 z(0),
42 w(0),
43 h(0),
Pablo Gamito11dcc222020-09-12 15:49:39 +000044 alpha(0),
45 flags(0),
46 mask(0),
47 reserved(0),
Pablo Gamito11dcc222020-09-12 15:49:39 +000048 cornerRadius(0.0f),
49 backgroundBlurRadius(0),
Pablo Gamito11dcc222020-09-12 15:49:39 +000050 transform(0),
51 transformToDisplayInverse(false),
52 crop(Rect::INVALID_RECT),
53 orientedDisplaySpaceRect(Rect::INVALID_RECT),
54 dataspace(ui::Dataspace::UNKNOWN),
55 surfaceDamageRegion(),
56 api(-1),
57 colorTransform(mat4()),
58 bgColorAlpha(0),
59 bgColorDataspace(ui::Dataspace::UNKNOWN),
60 colorSpaceAgnostic(false),
61 shadowRadius(0.0f),
62 frameRateSelectionPriority(-1),
63 frameRate(0.0f),
64 frameRateCompatibility(ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_DEFAULT),
Marin Shalamanovc5986772021-03-16 16:09:49 +010065 changeFrameRateStrategy(ANATIVEWINDOW_CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS),
Pablo Gamito11dcc222020-09-12 15:49:39 +000066 fixedTransformHint(ui::Transform::ROT_INVALID),
Vishnu Nair1506b182021-02-22 14:35:15 -080067 autoRefresh(false),
Winson Chunga30f7c92021-06-29 15:42:56 -070068 isTrustedOverlay(false),
Vishnu Nair6bdec7d2021-05-10 15:01:13 -070069 bufferCrop(Rect::INVALID_RECT),
70 destinationFrame(Rect::INVALID_RECT),
Vishnu Nair9cf4a4d2021-09-17 12:16:08 -070071 dropInputMode(gui::DropInputMode::NONE) {
Pablo Gamito11dcc222020-09-12 15:49:39 +000072 matrix.dsdx = matrix.dtdy = 1.0f;
73 matrix.dsdy = matrix.dtdx = 0.0f;
74 hdrMetadata.validTypes = 0;
75}
76
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -080077status_t layer_state_t::write(Parcel& output) const
78{
chaviw308ddba2020-08-11 16:23:51 -070079 SAFE_PARCEL(output.writeStrongBinder, surface);
Pablo Gamitodbc31672020-09-01 18:28:58 +000080 SAFE_PARCEL(output.writeInt32, layerId);
chaviw308ddba2020-08-11 16:23:51 -070081 SAFE_PARCEL(output.writeUint64, what);
82 SAFE_PARCEL(output.writeFloat, x);
83 SAFE_PARCEL(output.writeFloat, y);
84 SAFE_PARCEL(output.writeInt32, z);
85 SAFE_PARCEL(output.writeUint32, w);
86 SAFE_PARCEL(output.writeUint32, h);
Dominik Laskowski29fa1462021-04-27 15:51:50 -070087 SAFE_PARCEL(output.writeUint32, layerStack.id);
chaviw308ddba2020-08-11 16:23:51 -070088 SAFE_PARCEL(output.writeFloat, alpha);
89 SAFE_PARCEL(output.writeUint32, flags);
90 SAFE_PARCEL(output.writeUint32, mask);
91 SAFE_PARCEL(matrix.write, output);
chaviw25714502021-02-11 10:01:08 -080092 SAFE_PARCEL(output.write, crop);
Pablo Gamito11dcc222020-09-12 15:49:39 +000093 SAFE_PARCEL(SurfaceControl::writeNullableToParcel, output, reparentSurfaceControl);
Pablo Gamito11dcc222020-09-12 15:49:39 +000094 SAFE_PARCEL(SurfaceControl::writeNullableToParcel, output, relativeLayerSurfaceControl);
95 SAFE_PARCEL(SurfaceControl::writeNullableToParcel, output, parentSurfaceControlForChild);
chaviw308ddba2020-08-11 16:23:51 -070096 SAFE_PARCEL(output.writeFloat, color.r);
97 SAFE_PARCEL(output.writeFloat, color.g);
98 SAFE_PARCEL(output.writeFloat, color.b);
chaviw98318de2021-05-19 16:45:23 -050099 SAFE_PARCEL(windowInfoHandle->writeToParcel, &output);
chaviw308ddba2020-08-11 16:23:51 -0700100 SAFE_PARCEL(output.write, transparentRegion);
101 SAFE_PARCEL(output.writeUint32, transform);
102 SAFE_PARCEL(output.writeBool, transformToDisplayInverse);
chaviw308ddba2020-08-11 16:23:51 -0700103 SAFE_PARCEL(output.write, orientedDisplaySpaceRect);
104
chaviw308ddba2020-08-11 16:23:51 -0700105 SAFE_PARCEL(output.writeUint32, static_cast<uint32_t>(dataspace));
106 SAFE_PARCEL(output.write, hdrMetadata);
107 SAFE_PARCEL(output.write, surfaceDamageRegion);
108 SAFE_PARCEL(output.writeInt32, api);
109
Marissa Wall61c58622018-07-18 10:12:20 -0700110 if (sidebandStream) {
chaviw308ddba2020-08-11 16:23:51 -0700111 SAFE_PARCEL(output.writeBool, true);
112 SAFE_PARCEL(output.writeNativeHandle, sidebandStream->handle());
Marissa Wall61c58622018-07-18 10:12:20 -0700113 } else {
chaviw308ddba2020-08-11 16:23:51 -0700114 SAFE_PARCEL(output.writeBool, false);
Marissa Wall61c58622018-07-18 10:12:20 -0700115 }
116
chaviw308ddba2020-08-11 16:23:51 -0700117 SAFE_PARCEL(output.write, colorTransform.asArray(), 16 * sizeof(float));
118 SAFE_PARCEL(output.writeFloat, cornerRadius);
119 SAFE_PARCEL(output.writeUint32, backgroundBlurRadius);
chaviw308ddba2020-08-11 16:23:51 -0700120 SAFE_PARCEL(output.writeParcelable, metadata);
121 SAFE_PARCEL(output.writeFloat, bgColorAlpha);
122 SAFE_PARCEL(output.writeUint32, static_cast<uint32_t>(bgColorDataspace));
123 SAFE_PARCEL(output.writeBool, colorSpaceAgnostic);
124 SAFE_PARCEL(output.writeVectorSize, listeners);
Valerie Hau9dab9732019-08-20 09:29:25 -0700125
126 for (auto listener : listeners) {
chaviw308ddba2020-08-11 16:23:51 -0700127 SAFE_PARCEL(output.writeStrongBinder, listener.transactionCompletedListener);
Vishnu Nairfc46c1e2021-04-21 08:31:32 -0700128 SAFE_PARCEL(output.writeParcelableVector, listener.callbackIds);
Valerie Hau9dab9732019-08-20 09:29:25 -0700129 }
chaviw308ddba2020-08-11 16:23:51 -0700130 SAFE_PARCEL(output.writeFloat, shadowRadius);
131 SAFE_PARCEL(output.writeInt32, frameRateSelectionPriority);
132 SAFE_PARCEL(output.writeFloat, frameRate);
133 SAFE_PARCEL(output.writeByte, frameRateCompatibility);
Marin Shalamanovc5986772021-03-16 16:09:49 +0100134 SAFE_PARCEL(output.writeByte, changeFrameRateStrategy);
chaviw308ddba2020-08-11 16:23:51 -0700135 SAFE_PARCEL(output.writeUint32, fixedTransformHint);
Vishnu Naircf26a0a2020-11-13 12:56:20 -0800136 SAFE_PARCEL(output.writeBool, autoRefresh);
Lucas Dupinc3800b82020-10-02 16:24:48 -0700137
138 SAFE_PARCEL(output.writeUint32, blurRegions.size());
139 for (auto region : blurRegions) {
140 SAFE_PARCEL(output.writeUint32, region.blurRadius);
141 SAFE_PARCEL(output.writeFloat, region.cornerRadiusTL);
142 SAFE_PARCEL(output.writeFloat, region.cornerRadiusTR);
143 SAFE_PARCEL(output.writeFloat, region.cornerRadiusBL);
144 SAFE_PARCEL(output.writeFloat, region.cornerRadiusBR);
145 SAFE_PARCEL(output.writeFloat, region.alpha);
146 SAFE_PARCEL(output.writeInt32, region.left);
147 SAFE_PARCEL(output.writeInt32, region.top);
148 SAFE_PARCEL(output.writeInt32, region.right);
149 SAFE_PARCEL(output.writeInt32, region.bottom);
150 }
John Reckcdb4ed72021-02-04 13:39:33 -0500151
152 SAFE_PARCEL(output.write, stretchEffect);
chaviwf3f40fe2021-04-27 15:54:02 -0500153 SAFE_PARCEL(output.write, bufferCrop);
Vishnu Nair6bdec7d2021-05-10 15:01:13 -0700154 SAFE_PARCEL(output.write, destinationFrame);
Winson Chunga30f7c92021-06-29 15:42:56 -0700155 SAFE_PARCEL(output.writeBool, isTrustedOverlay);
John Reckcdb4ed72021-02-04 13:39:33 -0500156
Vishnu Nair9cf4a4d2021-09-17 12:16:08 -0700157 SAFE_PARCEL(output.writeUint32, static_cast<uint32_t>(dropInputMode));
chaviwba4320c2021-09-15 15:20:53 -0500158 SAFE_PARCEL(bufferData.write, output);
Mathias Agopianac9fa422013-02-11 16:40:36 -0800159 return NO_ERROR;
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800160}
161
162status_t layer_state_t::read(const Parcel& input)
163{
chaviw308ddba2020-08-11 16:23:51 -0700164 SAFE_PARCEL(input.readNullableStrongBinder, &surface);
Pablo Gamitodbc31672020-09-01 18:28:58 +0000165 SAFE_PARCEL(input.readInt32, &layerId);
chaviw308ddba2020-08-11 16:23:51 -0700166 SAFE_PARCEL(input.readUint64, &what);
167 SAFE_PARCEL(input.readFloat, &x);
168 SAFE_PARCEL(input.readFloat, &y);
169 SAFE_PARCEL(input.readInt32, &z);
170 SAFE_PARCEL(input.readUint32, &w);
171 SAFE_PARCEL(input.readUint32, &h);
Dominik Laskowski29fa1462021-04-27 15:51:50 -0700172 SAFE_PARCEL(input.readUint32, &layerStack.id);
chaviw308ddba2020-08-11 16:23:51 -0700173 SAFE_PARCEL(input.readFloat, &alpha);
Robert Carr2c358bf2018-08-08 15:58:15 -0700174
Vishnu Nairf6eddb62021-01-27 22:02:11 -0800175 SAFE_PARCEL(input.readUint32, &flags);
chaviw308ddba2020-08-11 16:23:51 -0700176
Vishnu Nairf6eddb62021-01-27 22:02:11 -0800177 SAFE_PARCEL(input.readUint32, &mask);
chaviw308ddba2020-08-11 16:23:51 -0700178
179 SAFE_PARCEL(matrix.read, input);
chaviw25714502021-02-11 10:01:08 -0800180 SAFE_PARCEL(input.read, crop);
Pablo Gamito11dcc222020-09-12 15:49:39 +0000181 SAFE_PARCEL(SurfaceControl::readNullableFromParcel, input, &reparentSurfaceControl);
chaviw308ddba2020-08-11 16:23:51 -0700182
Pablo Gamito11dcc222020-09-12 15:49:39 +0000183 SAFE_PARCEL(SurfaceControl::readNullableFromParcel, input, &relativeLayerSurfaceControl);
184 SAFE_PARCEL(SurfaceControl::readNullableFromParcel, input, &parentSurfaceControlForChild);
185
chaviw308ddba2020-08-11 16:23:51 -0700186 float tmpFloat = 0;
chaviw308ddba2020-08-11 16:23:51 -0700187 SAFE_PARCEL(input.readFloat, &tmpFloat);
188 color.r = tmpFloat;
189 SAFE_PARCEL(input.readFloat, &tmpFloat);
190 color.g = tmpFloat;
191 SAFE_PARCEL(input.readFloat, &tmpFloat);
192 color.b = tmpFloat;
chaviw98318de2021-05-19 16:45:23 -0500193 SAFE_PARCEL(windowInfoHandle->readFromParcel, &input);
Robert Carr2c358bf2018-08-08 15:58:15 -0700194
chaviw308ddba2020-08-11 16:23:51 -0700195 SAFE_PARCEL(input.read, transparentRegion);
196 SAFE_PARCEL(input.readUint32, &transform);
197 SAFE_PARCEL(input.readBool, &transformToDisplayInverse);
chaviw308ddba2020-08-11 16:23:51 -0700198 SAFE_PARCEL(input.read, orientedDisplaySpaceRect);
199
Vishnu Nairf6eddb62021-01-27 22:02:11 -0800200 uint32_t tmpUint32 = 0;
chaviw308ddba2020-08-11 16:23:51 -0700201 SAFE_PARCEL(input.readUint32, &tmpUint32);
202 dataspace = static_cast<ui::Dataspace>(tmpUint32);
203
204 SAFE_PARCEL(input.read, hdrMetadata);
205 SAFE_PARCEL(input.read, surfaceDamageRegion);
206 SAFE_PARCEL(input.readInt32, &api);
chaviwba4320c2021-09-15 15:20:53 -0500207
208 bool tmpBool = false;
chaviw308ddba2020-08-11 16:23:51 -0700209 SAFE_PARCEL(input.readBool, &tmpBool);
210 if (tmpBool) {
Marissa Wall61c58622018-07-18 10:12:20 -0700211 sidebandStream = NativeHandle::create(input.readNativeHandle(), true);
212 }
213
chaviw308ddba2020-08-11 16:23:51 -0700214 SAFE_PARCEL(input.read, &colorTransform, 16 * sizeof(float));
215 SAFE_PARCEL(input.readFloat, &cornerRadius);
216 SAFE_PARCEL(input.readUint32, &backgroundBlurRadius);
chaviw308ddba2020-08-11 16:23:51 -0700217 SAFE_PARCEL(input.readParcelable, &metadata);
Marissa Wallebc2c052019-01-16 19:16:55 -0800218
chaviw308ddba2020-08-11 16:23:51 -0700219 SAFE_PARCEL(input.readFloat, &bgColorAlpha);
220 SAFE_PARCEL(input.readUint32, &tmpUint32);
221 bgColorDataspace = static_cast<ui::Dataspace>(tmpUint32);
222 SAFE_PARCEL(input.readBool, &colorSpaceAgnostic);
Valerie Haued54efa2019-01-11 20:03:14 -0800223
chaviw308ddba2020-08-11 16:23:51 -0700224 int32_t numListeners = 0;
225 SAFE_PARCEL_READ_SIZE(input.readInt32, &numListeners, input.dataSize());
Valerie Hau9dab9732019-08-20 09:29:25 -0700226 listeners.clear();
227 for (int i = 0; i < numListeners; i++) {
chaviw308ddba2020-08-11 16:23:51 -0700228 sp<IBinder> listener;
Valerie Hau9dab9732019-08-20 09:29:25 -0700229 std::vector<CallbackId> callbackIds;
chaviw308ddba2020-08-11 16:23:51 -0700230 SAFE_PARCEL(input.readNullableStrongBinder, &listener);
Vishnu Nairfc46c1e2021-04-21 08:31:32 -0700231 SAFE_PARCEL(input.readParcelableVector, &callbackIds);
Valerie Hau9dab9732019-08-20 09:29:25 -0700232 listeners.emplace_back(listener, callbackIds);
233 }
chaviw308ddba2020-08-11 16:23:51 -0700234 SAFE_PARCEL(input.readFloat, &shadowRadius);
235 SAFE_PARCEL(input.readInt32, &frameRateSelectionPriority);
236 SAFE_PARCEL(input.readFloat, &frameRate);
237 SAFE_PARCEL(input.readByte, &frameRateCompatibility);
Marin Shalamanovc5986772021-03-16 16:09:49 +0100238 SAFE_PARCEL(input.readByte, &changeFrameRateStrategy);
chaviw308ddba2020-08-11 16:23:51 -0700239 SAFE_PARCEL(input.readUint32, &tmpUint32);
240 fixedTransformHint = static_cast<ui::Transform::RotationFlags>(tmpUint32);
Vishnu Naircf26a0a2020-11-13 12:56:20 -0800241 SAFE_PARCEL(input.readBool, &autoRefresh);
Lucas Dupinc3800b82020-10-02 16:24:48 -0700242
243 uint32_t numRegions = 0;
244 SAFE_PARCEL(input.readUint32, &numRegions);
245 blurRegions.clear();
246 for (uint32_t i = 0; i < numRegions; i++) {
247 BlurRegion region;
248 SAFE_PARCEL(input.readUint32, &region.blurRadius);
249 SAFE_PARCEL(input.readFloat, &region.cornerRadiusTL);
250 SAFE_PARCEL(input.readFloat, &region.cornerRadiusTR);
251 SAFE_PARCEL(input.readFloat, &region.cornerRadiusBL);
252 SAFE_PARCEL(input.readFloat, &region.cornerRadiusBR);
253 SAFE_PARCEL(input.readFloat, &region.alpha);
254 SAFE_PARCEL(input.readInt32, &region.left);
255 SAFE_PARCEL(input.readInt32, &region.top);
256 SAFE_PARCEL(input.readInt32, &region.right);
257 SAFE_PARCEL(input.readInt32, &region.bottom);
258 blurRegions.push_back(region);
259 }
John Reckcdb4ed72021-02-04 13:39:33 -0500260
261 SAFE_PARCEL(input.read, stretchEffect);
chaviwf3f40fe2021-04-27 15:54:02 -0500262 SAFE_PARCEL(input.read, bufferCrop);
Vishnu Nair6bdec7d2021-05-10 15:01:13 -0700263 SAFE_PARCEL(input.read, destinationFrame);
Winson Chunga30f7c92021-06-29 15:42:56 -0700264 SAFE_PARCEL(input.readBool, &isTrustedOverlay);
John Reckcdb4ed72021-02-04 13:39:33 -0500265
Vishnu Nair9cf4a4d2021-09-17 12:16:08 -0700266 uint32_t mode;
267 SAFE_PARCEL(input.readUint32, &mode);
268 dropInputMode = static_cast<gui::DropInputMode>(mode);
chaviwba4320c2021-09-15 15:20:53 -0500269 SAFE_PARCEL(bufferData.read, input);
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800270 return NO_ERROR;
271}
272
Mathias Agopian698c0872011-06-28 19:09:31 -0700273status_t ComposerState::write(Parcel& output) const {
Mathias Agopian698c0872011-06-28 19:09:31 -0700274 return state.write(output);
275}
276
277status_t ComposerState::read(const Parcel& input) {
Mathias Agopian698c0872011-06-28 19:09:31 -0700278 return state.read(input);
279}
280
Dominik Laskowski29fa1462021-04-27 15:51:50 -0700281DisplayState::DisplayState() = default;
Pablo Ceballos60d69222015-08-07 14:47:20 -0700282
Mathias Agopian8b33f032012-07-24 20:43:54 -0700283status_t DisplayState::write(Parcel& output) const {
chaviw308ddba2020-08-11 16:23:51 -0700284 SAFE_PARCEL(output.writeStrongBinder, token);
285 SAFE_PARCEL(output.writeStrongBinder, IInterface::asBinder(surface));
286 SAFE_PARCEL(output.writeUint32, what);
Evan Rosky2239b372021-05-20 13:43:47 -0700287 SAFE_PARCEL(output.writeUint32, flags);
Dominik Laskowski29fa1462021-04-27 15:51:50 -0700288 SAFE_PARCEL(output.writeUint32, layerStack.id);
chaviw308ddba2020-08-11 16:23:51 -0700289 SAFE_PARCEL(output.writeUint32, toRotationInt(orientation));
290 SAFE_PARCEL(output.write, layerStackSpaceRect);
291 SAFE_PARCEL(output.write, orientedDisplaySpaceRect);
292 SAFE_PARCEL(output.writeUint32, width);
293 SAFE_PARCEL(output.writeUint32, height);
Mathias Agopian8b33f032012-07-24 20:43:54 -0700294 return NO_ERROR;
295}
296
297status_t DisplayState::read(const Parcel& input) {
chaviw308ddba2020-08-11 16:23:51 -0700298 SAFE_PARCEL(input.readStrongBinder, &token);
299 sp<IBinder> tmpBinder;
300 SAFE_PARCEL(input.readNullableStrongBinder, &tmpBinder);
301 surface = interface_cast<IGraphicBufferProducer>(tmpBinder);
302
303 SAFE_PARCEL(input.readUint32, &what);
Evan Rosky2239b372021-05-20 13:43:47 -0700304 SAFE_PARCEL(input.readUint32, &flags);
Dominik Laskowski29fa1462021-04-27 15:51:50 -0700305 SAFE_PARCEL(input.readUint32, &layerStack.id);
chaviw308ddba2020-08-11 16:23:51 -0700306 uint32_t tmpUint = 0;
307 SAFE_PARCEL(input.readUint32, &tmpUint);
308 orientation = ui::toRotation(tmpUint);
309
310 SAFE_PARCEL(input.read, layerStackSpaceRect);
311 SAFE_PARCEL(input.read, orientedDisplaySpaceRect);
312 SAFE_PARCEL(input.readUint32, &width);
313 SAFE_PARCEL(input.readUint32, &height);
Mathias Agopian8b33f032012-07-24 20:43:54 -0700314 return NO_ERROR;
315}
316
Robert Carr2c5f6d22017-09-26 12:30:35 -0700317void DisplayState::merge(const DisplayState& other) {
318 if (other.what & eSurfaceChanged) {
319 what |= eSurfaceChanged;
320 surface = other.surface;
321 }
322 if (other.what & eLayerStackChanged) {
323 what |= eLayerStackChanged;
324 layerStack = other.layerStack;
325 }
Evan Rosky2239b372021-05-20 13:43:47 -0700326 if (other.what & eFlagsChanged) {
327 what |= eFlagsChanged;
328 flags = other.flags;
329 }
Robert Carr2c5f6d22017-09-26 12:30:35 -0700330 if (other.what & eDisplayProjectionChanged) {
331 what |= eDisplayProjectionChanged;
332 orientation = other.orientation;
Marin Shalamanov6ad317c2020-07-29 23:34:07 +0200333 layerStackSpaceRect = other.layerStackSpaceRect;
334 orientedDisplaySpaceRect = other.orientedDisplaySpaceRect;
Robert Carr2c5f6d22017-09-26 12:30:35 -0700335 }
336 if (other.what & eDisplaySizeChanged) {
337 what |= eDisplaySizeChanged;
338 width = other.width;
339 height = other.height;
340 }
341}
342
343void layer_state_t::merge(const layer_state_t& other) {
344 if (other.what & ePositionChanged) {
345 what |= ePositionChanged;
346 x = other.x;
347 y = other.y;
348 }
349 if (other.what & eLayerChanged) {
350 what |= eLayerChanged;
chaviw32377582019-05-13 11:15:19 -0700351 what &= ~eRelativeLayerChanged;
Robert Carr2c5f6d22017-09-26 12:30:35 -0700352 z = other.z;
353 }
354 if (other.what & eSizeChanged) {
355 what |= eSizeChanged;
356 w = other.w;
357 h = other.h;
358 }
359 if (other.what & eAlphaChanged) {
360 what |= eAlphaChanged;
361 alpha = other.alpha;
362 }
363 if (other.what & eMatrixChanged) {
364 what |= eMatrixChanged;
365 matrix = other.matrix;
366 }
367 if (other.what & eTransparentRegionChanged) {
368 what |= eTransparentRegionChanged;
369 transparentRegion = other.transparentRegion;
370 }
371 if (other.what & eFlagsChanged) {
372 what |= eFlagsChanged;
Vishnu Nair996bc422019-07-16 14:15:33 -0700373 flags &= ~other.mask;
374 flags |= (other.flags & other.mask);
375 mask |= other.mask;
Robert Carr2c5f6d22017-09-26 12:30:35 -0700376 }
377 if (other.what & eLayerStackChanged) {
378 what |= eLayerStackChanged;
379 layerStack = other.layerStack;
380 }
Lucas Dupin1b6531c2018-07-05 17:18:21 -0700381 if (other.what & eCornerRadiusChanged) {
382 what |= eCornerRadiusChanged;
383 cornerRadius = other.cornerRadius;
384 }
Lucas Dupin19c8f0e2019-11-25 17:55:44 -0800385 if (other.what & eBackgroundBlurRadiusChanged) {
386 what |= eBackgroundBlurRadiusChanged;
387 backgroundBlurRadius = other.backgroundBlurRadius;
388 }
Lucas Dupinc3800b82020-10-02 16:24:48 -0700389 if (other.what & eBlurRegionsChanged) {
390 what |= eBlurRegionsChanged;
391 blurRegions = other.blurRegions;
392 }
Robert Carr2c5f6d22017-09-26 12:30:35 -0700393 if (other.what & eRelativeLayerChanged) {
394 what |= eRelativeLayerChanged;
chaviw32377582019-05-13 11:15:19 -0700395 what &= ~eLayerChanged;
Robert Carr2c5f6d22017-09-26 12:30:35 -0700396 z = other.z;
Pablo Gamito11dcc222020-09-12 15:49:39 +0000397 relativeLayerSurfaceControl = other.relativeLayerSurfaceControl;
Robert Carr2c5f6d22017-09-26 12:30:35 -0700398 }
399 if (other.what & eReparent) {
400 what |= eReparent;
Pablo Gamito11dcc222020-09-12 15:49:39 +0000401 parentSurfaceControlForChild = other.parentSurfaceControlForChild;
Robert Carr2c5f6d22017-09-26 12:30:35 -0700402 }
chaviwca27f252018-02-06 16:46:39 -0800403 if (other.what & eDestroySurface) {
404 what |= eDestroySurface;
405 }
Marissa Wall61c58622018-07-18 10:12:20 -0700406 if (other.what & eTransformChanged) {
407 what |= eTransformChanged;
408 transform = other.transform;
409 }
410 if (other.what & eTransformToDisplayInverseChanged) {
411 what |= eTransformToDisplayInverseChanged;
412 transformToDisplayInverse = other.transformToDisplayInverse;
413 }
414 if (other.what & eCropChanged) {
415 what |= eCropChanged;
416 crop = other.crop;
417 }
418 if (other.what & eBufferChanged) {
419 what |= eBufferChanged;
chaviwba4320c2021-09-15 15:20:53 -0500420 bufferData = other.bufferData;
Marissa Wall61c58622018-07-18 10:12:20 -0700421 }
422 if (other.what & eDataspaceChanged) {
423 what |= eDataspaceChanged;
424 dataspace = other.dataspace;
425 }
426 if (other.what & eHdrMetadataChanged) {
427 what |= eHdrMetadataChanged;
428 hdrMetadata = other.hdrMetadata;
429 }
430 if (other.what & eSurfaceDamageRegionChanged) {
431 what |= eSurfaceDamageRegionChanged;
432 surfaceDamageRegion = other.surfaceDamageRegion;
433 }
434 if (other.what & eApiChanged) {
435 what |= eApiChanged;
436 api = other.api;
437 }
438 if (other.what & eSidebandStreamChanged) {
439 what |= eSidebandStreamChanged;
440 sidebandStream = other.sidebandStream;
441 }
Peiyong Lind3788632018-09-18 16:01:31 -0700442 if (other.what & eColorTransformChanged) {
443 what |= eColorTransformChanged;
444 colorTransform = other.colorTransform;
445 }
Marissa Wall3dad52d2019-03-22 14:03:19 -0700446 if (other.what & eHasListenerCallbacksChanged) {
447 what |= eHasListenerCallbacksChanged;
Marissa Wallc837b5e2018-10-12 10:04:44 -0700448 }
Robert Carr2c358bf2018-08-08 15:58:15 -0700449 if (other.what & eInputInfoChanged) {
450 what |= eInputInfoChanged;
chaviw98318de2021-05-19 16:45:23 -0500451 windowInfoHandle = new WindowInfoHandle(*other.windowInfoHandle);
Robert Carr2c358bf2018-08-08 15:58:15 -0700452 }
Valerie Haudd0b7572019-01-29 14:59:27 -0800453 if (other.what & eBackgroundColorChanged) {
454 what |= eBackgroundColorChanged;
455 color = other.color;
456 bgColorAlpha = other.bgColorAlpha;
457 bgColorDataspace = other.bgColorDataspace;
Valerie Haued54efa2019-01-11 20:03:14 -0800458 }
Evan Rosky1f6d6d52018-12-06 10:47:26 -0800459 if (other.what & eMetadataChanged) {
460 what |= eMetadataChanged;
461 metadata.merge(other.metadata);
462 }
Vishnu Nairc97b8db2019-10-29 18:19:35 -0700463 if (other.what & eShadowRadiusChanged) {
464 what |= eShadowRadiusChanged;
465 shadowRadius = other.shadowRadius;
466 }
Ana Krulecc84d09b2019-11-02 23:10:29 +0100467 if (other.what & eFrameRateSelectionPriority) {
468 what |= eFrameRateSelectionPriority;
469 frameRateSelectionPriority = other.frameRateSelectionPriority;
470 }
Steven Thomas3172e202020-01-06 19:25:30 -0800471 if (other.what & eFrameRateChanged) {
472 what |= eFrameRateChanged;
473 frameRate = other.frameRate;
Steven Thomas62a4cf82020-01-31 12:04:03 -0800474 frameRateCompatibility = other.frameRateCompatibility;
Marin Shalamanovc5986772021-03-16 16:09:49 +0100475 changeFrameRateStrategy = other.changeFrameRateStrategy;
Steven Thomas3172e202020-01-06 19:25:30 -0800476 }
Vishnu Nair6213bd92020-05-08 17:42:25 -0700477 if (other.what & eFixedTransformHintChanged) {
478 what |= eFixedTransformHintChanged;
479 fixedTransformHint = other.fixedTransformHint;
480 }
Vishnu Naircf26a0a2020-11-13 12:56:20 -0800481 if (other.what & eAutoRefreshChanged) {
482 what |= eAutoRefreshChanged;
483 autoRefresh = other.autoRefresh;
484 }
Winson Chunga30f7c92021-06-29 15:42:56 -0700485 if (other.what & eTrustedOverlayChanged) {
486 what |= eTrustedOverlayChanged;
487 isTrustedOverlay = other.isTrustedOverlay;
488 }
John Reckc00c6692021-02-16 11:37:33 -0500489 if (other.what & eStretchChanged) {
490 what |= eStretchChanged;
491 stretchEffect = other.stretchEffect;
492 }
chaviwf3f40fe2021-04-27 15:54:02 -0500493 if (other.what & eBufferCropChanged) {
494 what |= eBufferCropChanged;
495 bufferCrop = other.bufferCrop;
496 }
Vishnu Nair6bdec7d2021-05-10 15:01:13 -0700497 if (other.what & eDestinationFrameChanged) {
498 what |= eDestinationFrameChanged;
499 destinationFrame = other.destinationFrame;
500 }
Vishnu Nair0e816872021-07-14 10:53:04 -0700501 if (other.what & eProducerDisconnect) {
502 what |= eProducerDisconnect;
503 }
Vishnu Nair9cf4a4d2021-09-17 12:16:08 -0700504 if (other.what & eDropInputModeChanged) {
505 what |= eDropInputModeChanged;
506 dropInputMode = other.dropInputMode;
507 }
Vishnu Nair217d8e62018-09-12 16:34:49 -0700508 if ((other.what & what) != other.what) {
509 ALOGE("Unmerged SurfaceComposer Transaction properties. LayerState::merge needs updating? "
Vishnu Nair0e816872021-07-14 10:53:04 -0700510 "other.what=0x%" PRIX64 " what=0x%" PRIX64 " unmerged flags=0x%" PRIX64,
511 other.what, what, (other.what & what) ^ other.what);
Robert Carrd314f162018-08-15 13:12:42 -0700512 }
Robert Carr2c5f6d22017-09-26 12:30:35 -0700513}
Mathias Agopian8b33f032012-07-24 20:43:54 -0700514
Vishnu Nairddf9b5c2021-03-29 18:53:41 -0700515bool layer_state_t::hasBufferChanges() const {
chaviwba4320c2021-09-15 15:20:53 -0500516 return what & layer_state_t::eBufferChanged;
Vishnu Nairddf9b5c2021-03-29 18:53:41 -0700517}
518
Ady Abraham6e8e3642021-07-08 19:44:07 -0700519bool layer_state_t::hasValidBuffer() const {
chaviwba4320c2021-09-15 15:20:53 -0500520 return bufferData.buffer || bufferData.cachedBuffer.isValid();
Ady Abraham6e8e3642021-07-08 19:44:07 -0700521}
522
chaviw308ddba2020-08-11 16:23:51 -0700523status_t layer_state_t::matrix22_t::write(Parcel& output) const {
524 SAFE_PARCEL(output.writeFloat, dsdx);
525 SAFE_PARCEL(output.writeFloat, dtdx);
526 SAFE_PARCEL(output.writeFloat, dtdy);
527 SAFE_PARCEL(output.writeFloat, dsdy);
528 return NO_ERROR;
529}
530
531status_t layer_state_t::matrix22_t::read(const Parcel& input) {
532 SAFE_PARCEL(input.readFloat, &dsdx);
533 SAFE_PARCEL(input.readFloat, &dtdx);
534 SAFE_PARCEL(input.readFloat, &dtdy);
535 SAFE_PARCEL(input.readFloat, &dsdy);
536 return NO_ERROR;
537}
538
chaviw273171b2018-12-26 11:46:30 -0800539// ------------------------------- InputWindowCommands ----------------------------------------
540
Vishnu Naire798b472020-07-23 13:52:21 -0700541bool InputWindowCommands::merge(const InputWindowCommands& other) {
542 bool changes = false;
Vishnu Naire798b472020-07-23 13:52:21 -0700543 changes |= !other.focusRequests.empty();
544 focusRequests.insert(focusRequests.end(), std::make_move_iterator(other.focusRequests.begin()),
545 std::make_move_iterator(other.focusRequests.end()));
Vishnu Naire798b472020-07-23 13:52:21 -0700546 changes |= other.syncInputWindows && !syncInputWindows;
chaviwa911b102019-02-14 10:18:33 -0800547 syncInputWindows |= other.syncInputWindows;
Vishnu Naire798b472020-07-23 13:52:21 -0700548 return changes;
chaviw273171b2018-12-26 11:46:30 -0800549}
550
Vishnu Nair958da932020-08-21 17:12:37 -0700551bool InputWindowCommands::empty() const {
552 bool empty = true;
Vishnu Nair958da932020-08-21 17:12:37 -0700553 empty = focusRequests.empty() && !syncInputWindows;
Vishnu Nair958da932020-08-21 17:12:37 -0700554 return empty;
555}
556
chaviw273171b2018-12-26 11:46:30 -0800557void InputWindowCommands::clear() {
Vishnu Naire798b472020-07-23 13:52:21 -0700558 focusRequests.clear();
chaviwa911b102019-02-14 10:18:33 -0800559 syncInputWindows = false;
chaviw273171b2018-12-26 11:46:30 -0800560}
561
chaviw308ddba2020-08-11 16:23:51 -0700562status_t InputWindowCommands::write(Parcel& output) const {
chaviw308ddba2020-08-11 16:23:51 -0700563 SAFE_PARCEL(output.writeParcelableVector, focusRequests);
chaviw308ddba2020-08-11 16:23:51 -0700564 SAFE_PARCEL(output.writeBool, syncInputWindows);
565 return NO_ERROR;
chaviw273171b2018-12-26 11:46:30 -0800566}
567
chaviw308ddba2020-08-11 16:23:51 -0700568status_t InputWindowCommands::read(const Parcel& input) {
chaviw308ddba2020-08-11 16:23:51 -0700569 SAFE_PARCEL(input.readParcelableVector, &focusRequests);
chaviw308ddba2020-08-11 16:23:51 -0700570 SAFE_PARCEL(input.readBool, &syncInputWindows);
571 return NO_ERROR;
chaviw273171b2018-12-26 11:46:30 -0800572}
573
Marin Shalamanovc5986772021-03-16 16:09:49 +0100574bool ValidateFrameRate(float frameRate, int8_t compatibility, int8_t changeFrameRateStrategy,
575 const char* inFunctionName, bool privileged) {
Steven Thomas62a4cf82020-01-31 12:04:03 -0800576 const char* functionName = inFunctionName != nullptr ? inFunctionName : "call";
577 int floatClassification = std::fpclassify(frameRate);
578 if (frameRate < 0 || floatClassification == FP_INFINITE || floatClassification == FP_NAN) {
579 ALOGE("%s failed - invalid frame rate %f", functionName, frameRate);
580 return false;
581 }
582
583 if (compatibility != ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_DEFAULT &&
Ady Abrahamdd5bfa92021-01-07 17:56:08 -0800584 compatibility != ANATIVEWINDOW_FRAME_RATE_COMPATIBILITY_FIXED_SOURCE &&
585 (!privileged || compatibility != ANATIVEWINDOW_FRAME_RATE_EXACT)) {
586 ALOGE("%s failed - invalid compatibility value %d privileged: %s", functionName,
587 compatibility, privileged ? "yes" : "no");
Steven Thomas62a4cf82020-01-31 12:04:03 -0800588 return false;
589 }
590
Marin Shalamanovc5986772021-03-16 16:09:49 +0100591 if (changeFrameRateStrategy != ANATIVEWINDOW_CHANGE_FRAME_RATE_ONLY_IF_SEAMLESS &&
592 changeFrameRateStrategy != ANATIVEWINDOW_CHANGE_FRAME_RATE_ALWAYS) {
593 ALOGE("%s failed - invalid change frame rate strategy value %d", functionName,
594 changeFrameRateStrategy);
595 }
596
Steven Thomas62a4cf82020-01-31 12:04:03 -0800597 return true;
598}
599
chaviw618c42d2020-07-24 15:25:08 -0700600// ----------------------------------------------------------------------------
601
602status_t CaptureArgs::write(Parcel& output) const {
chaviw308ddba2020-08-11 16:23:51 -0700603 SAFE_PARCEL(output.writeInt32, static_cast<int32_t>(pixelFormat));
604 SAFE_PARCEL(output.write, sourceCrop);
chaviw17ac24b2021-01-28 18:50:05 -0800605 SAFE_PARCEL(output.writeFloat, frameScaleX);
606 SAFE_PARCEL(output.writeFloat, frameScaleY);
chaviw308ddba2020-08-11 16:23:51 -0700607 SAFE_PARCEL(output.writeBool, captureSecureLayers);
608 SAFE_PARCEL(output.writeInt32, uid);
Peiyong Lincd261472020-10-06 18:05:25 -0700609 SAFE_PARCEL(output.writeInt32, static_cast<int32_t>(dataspace));
Peiyong Lin05cc0112020-10-14 16:16:37 -0700610 SAFE_PARCEL(output.writeBool, allowProtected);
chaviw17ac24b2021-01-28 18:50:05 -0800611 SAFE_PARCEL(output.writeBool, grayscale);
chaviw308ddba2020-08-11 16:23:51 -0700612 return NO_ERROR;
chaviw618c42d2020-07-24 15:25:08 -0700613}
614
615status_t CaptureArgs::read(const Parcel& input) {
Peiyong Lincd261472020-10-06 18:05:25 -0700616 int32_t value = 0;
617 SAFE_PARCEL(input.readInt32, &value);
618 pixelFormat = static_cast<ui::PixelFormat>(value);
chaviw308ddba2020-08-11 16:23:51 -0700619 SAFE_PARCEL(input.read, sourceCrop);
chaviw17ac24b2021-01-28 18:50:05 -0800620 SAFE_PARCEL(input.readFloat, &frameScaleX);
621 SAFE_PARCEL(input.readFloat, &frameScaleY);
chaviw308ddba2020-08-11 16:23:51 -0700622 SAFE_PARCEL(input.readBool, &captureSecureLayers);
623 SAFE_PARCEL(input.readInt32, &uid);
Peiyong Lincd261472020-10-06 18:05:25 -0700624 SAFE_PARCEL(input.readInt32, &value);
625 dataspace = static_cast<ui::Dataspace>(value);
Peiyong Lin05cc0112020-10-14 16:16:37 -0700626 SAFE_PARCEL(input.readBool, &allowProtected);
chaviw17ac24b2021-01-28 18:50:05 -0800627 SAFE_PARCEL(input.readBool, &grayscale);
chaviw308ddba2020-08-11 16:23:51 -0700628 return NO_ERROR;
chaviw618c42d2020-07-24 15:25:08 -0700629}
630
631status_t DisplayCaptureArgs::write(Parcel& output) const {
chaviw308ddba2020-08-11 16:23:51 -0700632 SAFE_PARCEL(CaptureArgs::write, output);
chaviw618c42d2020-07-24 15:25:08 -0700633
chaviw308ddba2020-08-11 16:23:51 -0700634 SAFE_PARCEL(output.writeStrongBinder, displayToken);
635 SAFE_PARCEL(output.writeUint32, width);
636 SAFE_PARCEL(output.writeUint32, height);
637 SAFE_PARCEL(output.writeBool, useIdentityTransform);
638 return NO_ERROR;
chaviw618c42d2020-07-24 15:25:08 -0700639}
640
641status_t DisplayCaptureArgs::read(const Parcel& input) {
chaviw308ddba2020-08-11 16:23:51 -0700642 SAFE_PARCEL(CaptureArgs::read, input);
chaviw618c42d2020-07-24 15:25:08 -0700643
chaviw308ddba2020-08-11 16:23:51 -0700644 SAFE_PARCEL(input.readStrongBinder, &displayToken);
645 SAFE_PARCEL(input.readUint32, &width);
646 SAFE_PARCEL(input.readUint32, &height);
647 SAFE_PARCEL(input.readBool, &useIdentityTransform);
648 return NO_ERROR;
chaviw618c42d2020-07-24 15:25:08 -0700649}
650
651status_t LayerCaptureArgs::write(Parcel& output) const {
chaviw308ddba2020-08-11 16:23:51 -0700652 SAFE_PARCEL(CaptureArgs::write, output);
chaviw618c42d2020-07-24 15:25:08 -0700653
chaviw308ddba2020-08-11 16:23:51 -0700654 SAFE_PARCEL(output.writeStrongBinder, layerHandle);
655 SAFE_PARCEL(output.writeInt32, excludeHandles.size());
chaviw618c42d2020-07-24 15:25:08 -0700656 for (auto el : excludeHandles) {
chaviw308ddba2020-08-11 16:23:51 -0700657 SAFE_PARCEL(output.writeStrongBinder, el);
chaviw618c42d2020-07-24 15:25:08 -0700658 }
chaviw308ddba2020-08-11 16:23:51 -0700659 SAFE_PARCEL(output.writeBool, childrenOnly);
660 return NO_ERROR;
chaviw618c42d2020-07-24 15:25:08 -0700661}
662
663status_t LayerCaptureArgs::read(const Parcel& input) {
chaviw308ddba2020-08-11 16:23:51 -0700664 SAFE_PARCEL(CaptureArgs::read, input);
chaviw618c42d2020-07-24 15:25:08 -0700665
chaviw308ddba2020-08-11 16:23:51 -0700666 SAFE_PARCEL(input.readStrongBinder, &layerHandle);
chaviw618c42d2020-07-24 15:25:08 -0700667
George Burgess IV4d7aceb2020-07-30 10:01:56 -0700668 int32_t numExcludeHandles = 0;
chaviw308ddba2020-08-11 16:23:51 -0700669 SAFE_PARCEL_READ_SIZE(input.readInt32, &numExcludeHandles, input.dataSize());
chaviw618c42d2020-07-24 15:25:08 -0700670 excludeHandles.reserve(numExcludeHandles);
671 for (int i = 0; i < numExcludeHandles; i++) {
672 sp<IBinder> binder;
chaviw308ddba2020-08-11 16:23:51 -0700673 SAFE_PARCEL(input.readStrongBinder, &binder);
chaviw618c42d2020-07-24 15:25:08 -0700674 excludeHandles.emplace(binder);
675 }
676
chaviw308ddba2020-08-11 16:23:51 -0700677 SAFE_PARCEL(input.readBool, &childrenOnly);
678 return NO_ERROR;
chaviw618c42d2020-07-24 15:25:08 -0700679}
680
chaviwba4320c2021-09-15 15:20:53 -0500681status_t BufferData::write(Parcel& output) const {
682 SAFE_PARCEL(output.writeInt32, flags.get());
683
684 if (buffer) {
685 SAFE_PARCEL(output.writeBool, true);
686 SAFE_PARCEL(output.write, *buffer);
687 } else {
688 SAFE_PARCEL(output.writeBool, false);
689 }
690
691 if (acquireFence) {
692 SAFE_PARCEL(output.writeBool, true);
693 SAFE_PARCEL(output.write, *acquireFence);
694 } else {
695 SAFE_PARCEL(output.writeBool, false);
696 }
697
698 SAFE_PARCEL(output.writeUint64, frameNumber);
699 SAFE_PARCEL(output.writeStrongBinder, IInterface::asBinder(releaseBufferListener));
700 SAFE_PARCEL(output.writeStrongBinder, releaseBufferEndpoint);
701
702 SAFE_PARCEL(output.writeStrongBinder, cachedBuffer.token.promote());
703 SAFE_PARCEL(output.writeUint64, cachedBuffer.id);
704
705 return NO_ERROR;
706}
707
708status_t BufferData::read(const Parcel& input) {
709 int32_t tmpInt32;
710 SAFE_PARCEL(input.readInt32, &tmpInt32);
711 flags = Flags<BufferDataChange>(tmpInt32);
712
713 bool tmpBool = false;
714 SAFE_PARCEL(input.readBool, &tmpBool);
715 if (tmpBool) {
716 buffer = new GraphicBuffer();
717 SAFE_PARCEL(input.read, *buffer);
718 }
719
720 SAFE_PARCEL(input.readBool, &tmpBool);
721 if (tmpBool) {
722 acquireFence = new Fence();
723 SAFE_PARCEL(input.read, *acquireFence);
724 }
725
726 SAFE_PARCEL(input.readUint64, &frameNumber);
727
728 sp<IBinder> tmpBinder = nullptr;
729 SAFE_PARCEL(input.readNullableStrongBinder, &tmpBinder);
730 if (tmpBinder) {
731 releaseBufferListener = checked_interface_cast<ITransactionCompletedListener>(tmpBinder);
732 }
733 SAFE_PARCEL(input.readNullableStrongBinder, &releaseBufferEndpoint);
734
735 tmpBinder = nullptr;
736 SAFE_PARCEL(input.readNullableStrongBinder, &tmpBinder);
737 cachedBuffer.token = tmpBinder;
738 SAFE_PARCEL(input.readUint64, &cachedBuffer.id);
739
740 return NO_ERROR;
741}
742
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -0800743}; // namespace android