1/*
2 * Copyright (C) 2012 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 */
16package com.android.layoutlib.bridge.android.view;
17
18import android.util.DisplayMetrics;
19import android.view.Display;
20import android.view.DisplayInfo;
21import android.view.View;
22import android.view.WindowManager;
23
24public class WindowManagerImpl implements WindowManager {
25
26    private final DisplayMetrics mMetrics;
27    private final Display mDisplay;
28
29    public WindowManagerImpl(DisplayMetrics metrics) {
30        mMetrics = metrics;
31
32        DisplayInfo info = new DisplayInfo();
33        info.logicalHeight = mMetrics.heightPixels;
34        info.logicalWidth = mMetrics.widthPixels;
35        mDisplay = new Display(null, Display.DEFAULT_DISPLAY, info, null);
36    }
37
38    @Override
39    public Display getDefaultDisplay() {
40        return mDisplay;
41    }
42
43
44    @Override
45    public void addView(View arg0, android.view.ViewGroup.LayoutParams arg1) {
46        // pass
47    }
48
49    @Override
50    public void removeView(View arg0) {
51        // pass
52    }
53
54    @Override
55    public void updateViewLayout(View arg0, android.view.ViewGroup.LayoutParams arg1) {
56        // pass
57    }
58
59
60    @Override
61    public void removeViewImmediate(View arg0) {
62        // pass
63    }
64}
65