1/*
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
17package com.android.systemui.statusbar;
18
19import android.content.Context;
20import android.util.AttributeSet;
21import android.view.View;
22import android.view.accessibility.AccessibilityEvent;
23import android.widget.FrameLayout;
24
25public class LatestItemView extends FrameLayout {
26    public LatestItemView(Context context, AttributeSet attrs) {
27        super(context, attrs);
28    }
29
30    @Override
31    public void setOnClickListener(OnClickListener l) {
32        super.setOnClickListener(l);
33    }
34
35    @Override
36    public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
37        if (super.onRequestSendAccessibilityEvent(child, event)) {
38            // Add a record for the entire layout since its content is somehow small.
39            // The event comes from a leaf view that is interacted with.
40            AccessibilityEvent record = AccessibilityEvent.obtain();
41            onInitializeAccessibilityEvent(record);
42            dispatchPopulateAccessibilityEvent(record);
43            event.appendRecord(record);
44            return true;
45        }
46        return false;
47    }
48}
49