blob: a649ee140d737d7cad8b912cdcf5926ef366e509 [file] [log] [blame]
Kenny Root15a4d2f2010-03-11 18:20:12 -08001/*
2 * Copyright (C) 2009 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
Dianne Hackborn4c62fc02009-08-08 20:40:27 -070017package com.android.internal.view;
18
Dianne Hackborne36d6e22010-02-17 19:46:25 -080019import android.content.res.Configuration;
Dianne Hackborn4c62fc02009-08-08 20:40:27 -070020import android.graphics.Rect;
Dianne Hackborn75804932009-10-20 20:15:20 -070021import android.os.Bundle;
Dianne Hackborn4c62fc02009-08-08 20:40:27 -070022import android.os.ParcelFileDescriptor;
23import android.os.RemoteException;
Christopher Tatea53146c2010-09-07 11:57:52 -070024import android.view.DragEvent;
Dianne Hackborn4c62fc02009-08-08 20:40:27 -070025import android.view.IWindow;
26import android.view.IWindowSession;
Dianne Hackborn4c62fc02009-08-08 20:40:27 -070027
28public class BaseIWindow extends IWindow.Stub {
29 private IWindowSession mSession;
Dianne Hackborn9a230e02011-10-06 11:51:27 -070030 public int mSeq;
Dianne Hackborn4c62fc02009-08-08 20:40:27 -070031
32 public void setSession(IWindowSession session) {
33 mSession = session;
34 }
35
36 public void resized(int w, int h, Rect coveredInsets,
Dianne Hackborne36d6e22010-02-17 19:46:25 -080037 Rect visibleInsets, boolean reportDraw, Configuration newConfig) {
Dianne Hackborn4c62fc02009-08-08 20:40:27 -070038 if (reportDraw) {
39 try {
40 mSession.finishDrawing(this);
41 } catch (RemoteException e) {
42 }
43 }
44 }
45
Dianne Hackborn4c62fc02009-08-08 20:40:27 -070046 public void dispatchAppVisibility(boolean visible) {
47 }
48
49 public void dispatchGetNewSurface() {
50 }
51
Romain Guybb9908b2012-03-08 11:14:07 -080052 public void dispatchScreenState(boolean on) {
Romain Guy7e4e5612012-03-05 14:37:29 -080053 }
54
Dianne Hackborn4c62fc02009-08-08 20:40:27 -070055 public void windowFocusChanged(boolean hasFocus, boolean touchEnabled) {
56 }
57
58 public void executeCommand(String command, String parameters, ParcelFileDescriptor out) {
59 }
Dianne Hackborn72c82ab2009-08-11 21:13:54 -070060
Dianne Hackbornffa42482009-09-23 22:20:11 -070061 public void closeSystemDialogs(String reason) {
62 }
63
Marco Nelissenbf6956b2009-11-09 15:21:13 -080064 public void dispatchWallpaperOffsets(float x, float y, float xStep, float yStep, boolean sync) {
Dianne Hackborn19382ac2009-09-11 21:13:37 -070065 if (sync) {
66 try {
67 mSession.wallpaperOffsetsComplete(asBinder());
68 } catch (RemoteException e) {
69 }
70 }
Dianne Hackborn72c82ab2009-08-11 21:13:54 -070071 }
Christopher Tatea53146c2010-09-07 11:57:52 -070072
73 public void dispatchDragEvent(DragEvent event) {
74 }
75
Dianne Hackborn9a230e02011-10-06 11:51:27 -070076 public void dispatchSystemUiVisibilityChanged(int seq, int globalUi,
77 int localValue, int localChanges) {
78 mSeq = seq;
Joe Onorato664644d2011-01-23 17:53:23 -080079 }
80
Dianne Hackborn75804932009-10-20 20:15:20 -070081 public void dispatchWallpaperCommand(String action, int x, int y,
82 int z, Bundle extras, boolean sync) {
83 if (sync) {
84 try {
85 mSession.wallpaperCommandComplete(asBinder(), null);
86 } catch (RemoteException e) {
87 }
88 }
89 }
Dianne Hackborn12d3a942012-04-27 14:16:30 -070090
91 public void doneAnimating() {
92 }
Dianne Hackborn4c62fc02009-08-08 20:40:27 -070093}