Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 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 | |
| 17 | package com.android.systemui; |
| 18 | |
Matthew Ng | 30c0a02 | 2017-11-10 14:06:29 -0800 | [diff] [blame] | 19 | import android.content.BroadcastReceiver; |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 20 | import android.content.ComponentName; |
| 21 | import android.content.Context; |
| 22 | import android.content.Intent; |
Matthew Ng | 30c0a02 | 2017-11-10 14:06:29 -0800 | [diff] [blame] | 23 | import android.content.IntentFilter; |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 24 | import android.content.ServiceConnection; |
Winson Chung | 38d31c2 | 2017-11-08 14:32:32 -0800 | [diff] [blame] | 25 | import android.graphics.Rect; |
| 26 | import android.os.Binder; |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 27 | import android.os.Handler; |
| 28 | import android.os.IBinder; |
Matthew Ng | fac8783 | 2017-11-10 11:27:29 -0800 | [diff] [blame] | 29 | import android.os.Looper; |
Matthew Ng | 30c0a02 | 2017-11-10 14:06:29 -0800 | [diff] [blame] | 30 | import android.os.PatternMatcher; |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 31 | import android.os.RemoteException; |
| 32 | import android.os.UserHandle; |
| 33 | import android.util.Log; |
Winson Chung | 38d31c2 | 2017-11-08 14:32:32 -0800 | [diff] [blame] | 34 | import android.view.SurfaceControl; |
| 35 | |
Winson Chung | 11f53e9 | 2017-11-13 17:45:12 -0800 | [diff] [blame] | 36 | import com.android.systemui.OverviewProxyService.OverviewProxyListener; |
Winson Chung | c167427 | 2018-02-21 10:15:17 -0800 | [diff] [blame] | 37 | import com.android.systemui.recents.events.EventBus; |
| 38 | import com.android.systemui.recents.events.activity.DockedFirstAnimationFrameEvent; |
Matthew Ng | 1b1d346 | 2018-03-02 11:43:38 -0800 | [diff] [blame] | 39 | import com.android.systemui.recents.misc.SystemServicesProxy; |
Winson Chung | 38d31c2 | 2017-11-08 14:32:32 -0800 | [diff] [blame] | 40 | import com.android.systemui.shared.recents.IOverviewProxy; |
| 41 | import com.android.systemui.shared.recents.ISystemUiProxy; |
Winson Chung | 11f53e9 | 2017-11-13 17:45:12 -0800 | [diff] [blame] | 42 | import com.android.systemui.shared.system.GraphicBufferCompat; |
Winson Chung | caf2b81 | 2018-01-26 10:29:46 -0800 | [diff] [blame] | 43 | import com.android.systemui.statusbar.phone.StatusBar; |
Matthew Ng | 7d05e77 | 2017-11-09 14:41:07 -0800 | [diff] [blame] | 44 | import com.android.systemui.statusbar.policy.CallbackController; |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 45 | import com.android.systemui.statusbar.policy.DeviceProvisionedController; |
| 46 | import com.android.systemui.statusbar.policy.DeviceProvisionedController.DeviceProvisionedListener; |
Winson Chung | 11f53e9 | 2017-11-13 17:45:12 -0800 | [diff] [blame] | 47 | |
Matthew Ng | 1e43ebd | 2017-11-14 14:47:05 -0800 | [diff] [blame] | 48 | import java.io.FileDescriptor; |
| 49 | import java.io.PrintWriter; |
Matthew Ng | 7d05e77 | 2017-11-09 14:41:07 -0800 | [diff] [blame] | 50 | import java.util.ArrayList; |
| 51 | import java.util.List; |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 52 | |
Matthew Ng | 8f25fb96 | 2018-01-16 17:17:24 -0800 | [diff] [blame] | 53 | import static com.android.systemui.shared.system.NavigationBarCompat.InteractionType; |
| 54 | |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 55 | /** |
| 56 | * Class to send information from overview to launcher with a binder. |
| 57 | */ |
Matthew Ng | 1e43ebd | 2017-11-14 14:47:05 -0800 | [diff] [blame] | 58 | public class OverviewProxyService implements CallbackController<OverviewProxyListener>, Dumpable { |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 59 | |
Sunny Goyal | 09c12d7 | 2018-03-27 10:14:49 -0700 | [diff] [blame] | 60 | private static final String ACTION_QUICKSTEP = "android.intent.action.QUICKSTEP_SERVICE"; |
| 61 | |
Matthew Ng | bd82457 | 2018-01-17 16:25:56 -0800 | [diff] [blame] | 62 | public static final String TAG_OPS = "OverviewProxyService"; |
| 63 | public static final boolean DEBUG_OVERVIEW_PROXY = false; |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 64 | private static final long BACKOFF_MILLIS = 5000; |
| 65 | |
| 66 | private final Context mContext; |
| 67 | private final Handler mHandler; |
Matthew Ng | fac8783 | 2017-11-10 11:27:29 -0800 | [diff] [blame] | 68 | private final Runnable mConnectionRunnable = this::internalConnectToCurrentUser; |
Sunny Goyal | 09c12d7 | 2018-03-27 10:14:49 -0700 | [diff] [blame] | 69 | private final ComponentName mRecentsComponentName; |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 70 | private final DeviceProvisionedController mDeviceProvisionedController |
| 71 | = Dependency.get(DeviceProvisionedController.class); |
Matthew Ng | 7d05e77 | 2017-11-09 14:41:07 -0800 | [diff] [blame] | 72 | private final List<OverviewProxyListener> mConnectionCallbacks = new ArrayList<>(); |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 73 | |
| 74 | private IOverviewProxy mOverviewProxy; |
| 75 | private int mConnectionBackoffAttempts; |
Tony Wickham | 05c1f85 | 2018-02-06 12:32:54 -0800 | [diff] [blame] | 76 | private CharSequence mOnboardingText; |
Matthew Ng | 8f25fb96 | 2018-01-16 17:17:24 -0800 | [diff] [blame] | 77 | private @InteractionType int mInteractionFlags; |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 78 | |
Winson Chung | 38d31c2 | 2017-11-08 14:32:32 -0800 | [diff] [blame] | 79 | private ISystemUiProxy mSysUiProxy = new ISystemUiProxy.Stub() { |
Winson Chung | caf2b81 | 2018-01-26 10:29:46 -0800 | [diff] [blame] | 80 | |
Winson Chung | 11f53e9 | 2017-11-13 17:45:12 -0800 | [diff] [blame] | 81 | public GraphicBufferCompat screenshot(Rect sourceCrop, int width, int height, int minLayer, |
| 82 | int maxLayer, boolean useIdentityTransform, int rotation) { |
Winson Chung | 38d31c2 | 2017-11-08 14:32:32 -0800 | [diff] [blame] | 83 | long token = Binder.clearCallingIdentity(); |
| 84 | try { |
Winson Chung | 11f53e9 | 2017-11-13 17:45:12 -0800 | [diff] [blame] | 85 | return new GraphicBufferCompat(SurfaceControl.screenshotToBuffer(sourceCrop, width, |
| 86 | height, minLayer, maxLayer, useIdentityTransform, rotation)); |
Winson Chung | 38d31c2 | 2017-11-08 14:32:32 -0800 | [diff] [blame] | 87 | } finally { |
| 88 | Binder.restoreCallingIdentity(token); |
| 89 | } |
| 90 | } |
Winson Chung | cbb15a9 | 2018-01-25 17:46:16 +0000 | [diff] [blame] | 91 | |
Winson Chung | caf2b81 | 2018-01-26 10:29:46 -0800 | [diff] [blame] | 92 | public void startScreenPinning(int taskId) { |
| 93 | long token = Binder.clearCallingIdentity(); |
| 94 | try { |
| 95 | mHandler.post(() -> { |
| 96 | StatusBar statusBar = ((SystemUIApplication) mContext).getComponent( |
| 97 | StatusBar.class); |
| 98 | if (statusBar != null) { |
| 99 | statusBar.showScreenPinningRequest(taskId, false /* allowCancel */); |
| 100 | } |
| 101 | }); |
| 102 | } finally { |
| 103 | Binder.restoreCallingIdentity(token); |
| 104 | } |
| 105 | } |
| 106 | |
Winson Chung | c167427 | 2018-02-21 10:15:17 -0800 | [diff] [blame] | 107 | public void onSplitScreenInvoked() { |
| 108 | long token = Binder.clearCallingIdentity(); |
| 109 | try { |
| 110 | EventBus.getDefault().post(new DockedFirstAnimationFrameEvent()); |
| 111 | } finally { |
| 112 | Binder.restoreCallingIdentity(token); |
| 113 | } |
| 114 | } |
| 115 | |
Tony Wickham | 05c1f85 | 2018-02-06 12:32:54 -0800 | [diff] [blame] | 116 | public void setRecentsOnboardingText(CharSequence text) { |
| 117 | mOnboardingText = text; |
| 118 | } |
Matthew Ng | 8f25fb96 | 2018-01-16 17:17:24 -0800 | [diff] [blame] | 119 | |
| 120 | public void setInteractionState(@InteractionType int flags) { |
| 121 | long token = Binder.clearCallingIdentity(); |
| 122 | try { |
| 123 | if (mInteractionFlags != flags) { |
| 124 | mInteractionFlags = flags; |
| 125 | mHandler.post(() -> { |
| 126 | for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) { |
| 127 | mConnectionCallbacks.get(i).onInteractionFlagsChanged(flags); |
| 128 | } |
| 129 | }); |
| 130 | } |
| 131 | } finally { |
| 132 | Binder.restoreCallingIdentity(token); |
| 133 | } |
| 134 | } |
Winson Chung | 38d31c2 | 2017-11-08 14:32:32 -0800 | [diff] [blame] | 135 | }; |
| 136 | |
Matthew Ng | 30c0a02 | 2017-11-10 14:06:29 -0800 | [diff] [blame] | 137 | private final BroadcastReceiver mLauncherAddedReceiver = new BroadcastReceiver() { |
| 138 | @Override |
| 139 | public void onReceive(Context context, Intent intent) { |
| 140 | // Reconnect immediately, instead of waiting for resume to arrive. |
| 141 | startConnectionToCurrentUser(); |
| 142 | } |
| 143 | }; |
| 144 | |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 145 | private final ServiceConnection mOverviewServiceConnection = new ServiceConnection() { |
| 146 | @Override |
| 147 | public void onServiceConnected(ComponentName name, IBinder service) { |
| 148 | if (service != null) { |
| 149 | mConnectionBackoffAttempts = 0; |
| 150 | mOverviewProxy = IOverviewProxy.Stub.asInterface(service); |
| 151 | // Listen for launcher's death |
| 152 | try { |
| 153 | service.linkToDeath(mOverviewServiceDeathRcpt, 0); |
| 154 | } catch (RemoteException e) { |
Matthew Ng | bd82457 | 2018-01-17 16:25:56 -0800 | [diff] [blame] | 155 | Log.e(TAG_OPS, "Lost connection to launcher service", e); |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 156 | } |
Winson Chung | 38d31c2 | 2017-11-08 14:32:32 -0800 | [diff] [blame] | 157 | try { |
| 158 | mOverviewProxy.onBind(mSysUiProxy); |
| 159 | } catch (RemoteException e) { |
Matthew Ng | bd82457 | 2018-01-17 16:25:56 -0800 | [diff] [blame] | 160 | Log.e(TAG_OPS, "Failed to call onBind()", e); |
Winson Chung | 38d31c2 | 2017-11-08 14:32:32 -0800 | [diff] [blame] | 161 | } |
Matthew Ng | 7d05e77 | 2017-11-09 14:41:07 -0800 | [diff] [blame] | 162 | notifyConnectionChanged(); |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 163 | } |
| 164 | } |
| 165 | |
| 166 | @Override |
| 167 | public void onServiceDisconnected(ComponentName name) { |
| 168 | // Do nothing |
| 169 | } |
| 170 | }; |
| 171 | |
| 172 | private final DeviceProvisionedListener mDeviceProvisionedCallback = |
| 173 | new DeviceProvisionedListener() { |
| 174 | @Override |
Matthew Ng | dfab86c | 2017-11-07 15:46:51 -0800 | [diff] [blame] | 175 | public void onUserSetupChanged() { |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 176 | if (mDeviceProvisionedController.isCurrentUserSetup()) { |
Matthew Ng | fac8783 | 2017-11-10 11:27:29 -0800 | [diff] [blame] | 177 | internalConnectToCurrentUser(); |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 178 | } |
| 179 | } |
| 180 | |
| 181 | @Override |
| 182 | public void onUserSwitched() { |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 183 | mConnectionBackoffAttempts = 0; |
Matthew Ng | fac8783 | 2017-11-10 11:27:29 -0800 | [diff] [blame] | 184 | internalConnectToCurrentUser(); |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 185 | } |
| 186 | }; |
| 187 | |
| 188 | // This is the death handler for the binder from the launcher service |
Matthew Ng | 30c0a02 | 2017-11-10 14:06:29 -0800 | [diff] [blame] | 189 | private final IBinder.DeathRecipient mOverviewServiceDeathRcpt |
| 190 | = this::startConnectionToCurrentUser; |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 191 | |
| 192 | public OverviewProxyService(Context context) { |
| 193 | mContext = context; |
| 194 | mHandler = new Handler(); |
| 195 | mConnectionBackoffAttempts = 0; |
Sunny Goyal | 09c12d7 | 2018-03-27 10:14:49 -0700 | [diff] [blame] | 196 | mRecentsComponentName = ComponentName.unflattenFromString(context.getString( |
| 197 | com.android.internal.R.string.config_recentsComponentName)); |
Matthew Ng | 30c0a02 | 2017-11-10 14:06:29 -0800 | [diff] [blame] | 198 | |
| 199 | // Listen for the package update changes. |
Matthew Ng | 1b1d346 | 2018-03-02 11:43:38 -0800 | [diff] [blame] | 200 | if (SystemServicesProxy.getInstance(context) |
| 201 | .isSystemUser(mDeviceProvisionedController.getCurrentUser())) { |
| 202 | mDeviceProvisionedController.addCallback(mDeviceProvisionedCallback); |
| 203 | IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED); |
| 204 | filter.addDataScheme("package"); |
Sunny Goyal | 09c12d7 | 2018-03-27 10:14:49 -0700 | [diff] [blame] | 205 | filter.addDataSchemeSpecificPart(mRecentsComponentName.getPackageName(), |
Matthew Ng | 1b1d346 | 2018-03-02 11:43:38 -0800 | [diff] [blame] | 206 | PatternMatcher.PATTERN_LITERAL); |
| 207 | filter.addAction(Intent.ACTION_PACKAGE_CHANGED); |
| 208 | mContext.registerReceiver(mLauncherAddedReceiver, filter); |
| 209 | } |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 210 | } |
| 211 | |
| 212 | public void startConnectionToCurrentUser() { |
Matthew Ng | fac8783 | 2017-11-10 11:27:29 -0800 | [diff] [blame] | 213 | if (mHandler.getLooper() != Looper.myLooper()) { |
| 214 | mHandler.post(mConnectionRunnable); |
| 215 | } else { |
| 216 | internalConnectToCurrentUser(); |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | private void internalConnectToCurrentUser() { |
Matthew Ng | 1fa3f7e | 2017-11-07 11:50:36 -0800 | [diff] [blame] | 221 | disconnectFromLauncherService(); |
| 222 | |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 223 | // If user has not setup yet or already connected, do not try to connect |
Matthew Ng | 1fa3f7e | 2017-11-07 11:50:36 -0800 | [diff] [blame] | 224 | if (!mDeviceProvisionedController.isCurrentUserSetup()) { |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 225 | return; |
| 226 | } |
| 227 | mHandler.removeCallbacks(mConnectionRunnable); |
Sunny Goyal | 09c12d7 | 2018-03-27 10:14:49 -0700 | [diff] [blame] | 228 | Intent launcherServiceIntent = new Intent(ACTION_QUICKSTEP) |
| 229 | .setPackage(mRecentsComponentName.getPackageName()); |
Matthew Ng | 10b6c41a | 2018-03-26 18:01:37 -0700 | [diff] [blame^] | 230 | boolean bound = false; |
| 231 | try { |
| 232 | bound = mContext.bindServiceAsUser(launcherServiceIntent, |
| 233 | mOverviewServiceConnection, Context.BIND_AUTO_CREATE, |
| 234 | UserHandle.of(mDeviceProvisionedController.getCurrentUser())); |
| 235 | } catch (SecurityException e) { |
| 236 | Log.e(TAG_OPS, "Unable to bind because of security error", e); |
| 237 | } |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 238 | if (!bound) { |
| 239 | // Retry after exponential backoff timeout |
| 240 | final long timeoutMs = (long) Math.scalb(BACKOFF_MILLIS, mConnectionBackoffAttempts); |
| 241 | mHandler.postDelayed(mConnectionRunnable, timeoutMs); |
| 242 | mConnectionBackoffAttempts++; |
| 243 | } |
| 244 | } |
| 245 | |
Matthew Ng | 7d05e77 | 2017-11-09 14:41:07 -0800 | [diff] [blame] | 246 | @Override |
| 247 | public void addCallback(OverviewProxyListener listener) { |
| 248 | mConnectionCallbacks.add(listener); |
| 249 | listener.onConnectionChanged(mOverviewProxy != null); |
| 250 | } |
| 251 | |
| 252 | @Override |
| 253 | public void removeCallback(OverviewProxyListener listener) { |
| 254 | mConnectionCallbacks.remove(listener); |
| 255 | } |
| 256 | |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 257 | public IOverviewProxy getProxy() { |
| 258 | return mOverviewProxy; |
| 259 | } |
| 260 | |
Tony Wickham | 05c1f85 | 2018-02-06 12:32:54 -0800 | [diff] [blame] | 261 | public CharSequence getOnboardingText() { |
| 262 | return mOnboardingText; |
Tony Wickham | fb63fe8 | 2018-01-16 12:14:06 -0800 | [diff] [blame] | 263 | } |
| 264 | |
Matthew Ng | 8f25fb96 | 2018-01-16 17:17:24 -0800 | [diff] [blame] | 265 | public int getInteractionFlags() { |
| 266 | return mInteractionFlags; |
| 267 | } |
| 268 | |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 269 | private void disconnectFromLauncherService() { |
Matthew Ng | 1fa3f7e | 2017-11-07 11:50:36 -0800 | [diff] [blame] | 270 | if (mOverviewProxy != null) { |
Matthew Ng | eb6893b | 2017-11-09 17:15:33 -0800 | [diff] [blame] | 271 | mOverviewProxy.asBinder().unlinkToDeath(mOverviewServiceDeathRcpt, 0); |
Matthew Ng | 1fa3f7e | 2017-11-07 11:50:36 -0800 | [diff] [blame] | 272 | mContext.unbindService(mOverviewServiceConnection); |
| 273 | mOverviewProxy = null; |
Matthew Ng | 7d05e77 | 2017-11-09 14:41:07 -0800 | [diff] [blame] | 274 | notifyConnectionChanged(); |
Matthew Ng | 1fa3f7e | 2017-11-07 11:50:36 -0800 | [diff] [blame] | 275 | } |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 276 | } |
Matthew Ng | 7d05e77 | 2017-11-09 14:41:07 -0800 | [diff] [blame] | 277 | |
| 278 | private void notifyConnectionChanged() { |
| 279 | for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) { |
| 280 | mConnectionCallbacks.get(i).onConnectionChanged(mOverviewProxy != null); |
| 281 | } |
| 282 | } |
| 283 | |
Matthew Ng | 2ea93b7 | 2018-03-14 19:43:18 +0000 | [diff] [blame] | 284 | public void notifyQuickStepStarted() { |
Winson Chung | cbb15a9 | 2018-01-25 17:46:16 +0000 | [diff] [blame] | 285 | for (int i = mConnectionCallbacks.size() - 1; i >= 0; --i) { |
Matthew Ng | 2ea93b7 | 2018-03-14 19:43:18 +0000 | [diff] [blame] | 286 | mConnectionCallbacks.get(i).onQuickStepStarted(); |
Winson Chung | cbb15a9 | 2018-01-25 17:46:16 +0000 | [diff] [blame] | 287 | } |
| 288 | } |
| 289 | |
Matthew Ng | 1e43ebd | 2017-11-14 14:47:05 -0800 | [diff] [blame] | 290 | @Override |
| 291 | public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { |
Matthew Ng | bd82457 | 2018-01-17 16:25:56 -0800 | [diff] [blame] | 292 | pw.println(TAG_OPS + " state:"); |
Matthew Ng | 1e43ebd | 2017-11-14 14:47:05 -0800 | [diff] [blame] | 293 | pw.print(" mConnectionBackoffAttempts="); pw.println(mConnectionBackoffAttempts); |
| 294 | pw.print(" isCurrentUserSetup="); pw.println(mDeviceProvisionedController |
| 295 | .isCurrentUserSetup()); |
| 296 | pw.print(" isConnected="); pw.println(mOverviewProxy != null); |
| 297 | } |
| 298 | |
Matthew Ng | 7d05e77 | 2017-11-09 14:41:07 -0800 | [diff] [blame] | 299 | public interface OverviewProxyListener { |
Winson Chung | cbb15a9 | 2018-01-25 17:46:16 +0000 | [diff] [blame] | 300 | default void onConnectionChanged(boolean isConnected) {} |
Matthew Ng | 2ea93b7 | 2018-03-14 19:43:18 +0000 | [diff] [blame] | 301 | default void onQuickStepStarted() {} |
Matthew Ng | 8f25fb96 | 2018-01-16 17:17:24 -0800 | [diff] [blame] | 302 | default void onInteractionFlagsChanged(@InteractionType int flags) {} |
Matthew Ng | 7d05e77 | 2017-11-09 14:41:07 -0800 | [diff] [blame] | 303 | } |
Matthew Ng | 13dbf87 | 2017-10-27 11:02:14 -0700 | [diff] [blame] | 304 | } |