2 * Copyright (C) 2009 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package com.android.internal.view;
19 import android.content.res.Configuration;
20 import android.graphics.Rect;
21 import android.hardware.input.InputManager;
22 import android.os.Bundle;
23 import android.os.ParcelFileDescriptor;
24 import android.os.RemoteException;
25 import android.view.DragEvent;
26 import android.view.IWindow;
27 import android.view.IWindowSession;
28 import android.view.PointerIcon;
30 import com.android.internal.os.IResultReceiver;
32 public class BaseIWindow extends IWindow.Stub {
33 private IWindowSession mSession;
36 public void setSession(IWindowSession session) {
41 public void resized(Rect frame, Rect overscanInsets, Rect contentInsets, Rect visibleInsets,
42 Rect stableInsets, Rect outsets, boolean reportDraw, Configuration newConfig,
43 Rect backDropFrame, boolean forceLayout, boolean alwaysConsumeNavBar, int displayId) {
46 mSession.finishDrawing(this);
47 } catch (RemoteException e) {
53 public void moved(int newX, int newY) {
57 public void dispatchAppVisibility(boolean visible) {
61 public void dispatchGetNewSurface() {
65 public void windowFocusChanged(boolean hasFocus, boolean touchEnabled) {
69 public void executeCommand(String command, String parameters, ParcelFileDescriptor out) {
73 public void closeSystemDialogs(String reason) {
77 public void dispatchWallpaperOffsets(float x, float y, float xStep, float yStep, boolean sync) {
80 mSession.wallpaperOffsetsComplete(asBinder());
81 } catch (RemoteException e) {
87 public void dispatchDragEvent(DragEvent event) {
88 if (event.getAction() == DragEvent.ACTION_DROP) {
90 mSession.reportDropResult(this, false);
91 } catch (RemoteException e) {
97 public void updatePointerIcon(float x, float y) {
98 InputManager.getInstance().setPointerIconType(PointerIcon.TYPE_NOT_SPECIFIED);
102 public void dispatchSystemUiVisibilityChanged(int seq, int globalUi,
103 int localValue, int localChanges) {
108 public void dispatchWallpaperCommand(String action, int x, int y,
109 int z, Bundle extras, boolean sync) {
112 mSession.wallpaperCommandComplete(asBinder(), null);
113 } catch (RemoteException e) {
119 public void dispatchWindowShown() {
123 public void requestAppKeyboardShortcuts(IResultReceiver receiver, int deviceId) {
127 public void dispatchPointerCaptureChanged(boolean hasCapture) {