blob: 2fffb892c5f00fe8e254534dd69b437b144bf5f5 [file] [log] [blame]
Bryce Leeaf691c02017-03-20 14:20:22 -07001/*
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
17package com.android.server.am;
18
Bryce Lee18d51592017-10-25 10:22:19 -070019import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD;
20import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
Wale Ogunwale04a05ac2017-09-17 21:35:02 -070021import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
Bryce Leef3c6a472017-11-14 14:53:06 -080022import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
Wale Ogunwale9dcf9462017-09-19 15:13:01 -070023import static android.view.Display.DEFAULT_DISPLAY;
Bryce Leeaf691c02017-03-20 14:20:22 -070024import static org.mockito.Mockito.mock;
Bryce Lee2a3cc462017-10-27 10:57:35 -070025import static org.mockito.Mockito.doNothing;
Bryce Lee04ab3462017-04-10 15:06:33 -070026import static org.mockito.Mockito.doReturn;
27import static org.mockito.Mockito.any;
Bryce Lee2a3cc462017-10-27 10:57:35 -070028import static org.mockito.Mockito.anyBoolean;
29import static org.mockito.Mockito.anyInt;
Bryce Lee04ab3462017-04-10 15:06:33 -070030import static org.mockito.Mockito.doAnswer;
Bryce Lee4e4a3ec2017-09-27 08:25:03 -070031import static org.mockito.Mockito.spy;
Bryce Lee04ab3462017-04-10 15:06:33 -070032
33import org.mockito.invocation.InvocationOnMock;
Bryce Leeaf691c02017-03-20 14:20:22 -070034
35import android.content.ComponentName;
36import android.content.Context;
37import android.content.Intent;
38import android.content.pm.ActivityInfo;
39import android.content.pm.ApplicationInfo;
Bryce Leeba8f4422017-11-20 12:35:57 -080040import android.content.pm.IPackageManager;
Bryce Leeaf691c02017-03-20 14:20:22 -070041import android.content.res.Configuration;
42import android.graphics.Rect;
Wale Ogunwale9dcf9462017-09-19 15:13:01 -070043import android.hardware.display.DisplayManager;
Bryce Lee3115bdf2017-04-05 08:39:40 -070044import android.os.HandlerThread;
Bryce Leeaf691c02017-03-20 14:20:22 -070045import android.os.Looper;
Bryce Lee93e7f792017-10-25 15:54:55 -070046import android.service.voice.IVoiceInteractionSession;
Bryce Leeaf691c02017-03-20 14:20:22 -070047import android.support.test.InstrumentationRegistry;
48import com.android.server.AttributeCache;
49import com.android.server.wm.AppWindowContainerController;
Bryce Lee4e4a3ec2017-09-27 08:25:03 -070050import com.android.server.wm.PinnedStackWindowController;
Bryce Leeaf691c02017-03-20 14:20:22 -070051import com.android.server.wm.StackWindowController;
Bryce Lee04ab3462017-04-10 15:06:33 -070052import com.android.server.wm.TaskWindowContainerController;
Bryce Leeaf691c02017-03-20 14:20:22 -070053import com.android.server.wm.WindowManagerService;
54import com.android.server.wm.WindowTestUtils;
Bryce Lee3115bdf2017-04-05 08:39:40 -070055import org.junit.After;
Bryce Leeaf691c02017-03-20 14:20:22 -070056import org.junit.Before;
57import org.mockito.MockitoAnnotations;
58
59/**
60 * A base class to handle common operations in activity related unit tests.
61 */
62public class ActivityTestsBase {
Bryce Lee939a9a32017-10-23 10:01:21 -070063 private static boolean sOneTimeSetupDone = false;
64
Bryce Leeaf691c02017-03-20 14:20:22 -070065 private final Context mContext = InstrumentationRegistry.getContext();
Bryce Lee3115bdf2017-04-05 08:39:40 -070066 private HandlerThread mHandlerThread;
Bryce Leeaf691c02017-03-20 14:20:22 -070067
Bryce Leeaf691c02017-03-20 14:20:22 -070068 @Before
69 public void setUp() throws Exception {
Bryce Lee939a9a32017-10-23 10:01:21 -070070 if (!sOneTimeSetupDone) {
71 sOneTimeSetupDone = true;
72
73 // Allows to mock package local classes and methods
74 System.setProperty("dexmaker.share_classloader", "true");
75 MockitoAnnotations.initMocks(this);
76 }
Bryce Lee3115bdf2017-04-05 08:39:40 -070077 mHandlerThread = new HandlerThread("ActivityTestsBaseThread");
78 mHandlerThread.start();
79 }
Bryce Leeaf691c02017-03-20 14:20:22 -070080
Bryce Lee3115bdf2017-04-05 08:39:40 -070081 @After
82 public void tearDown() {
83 mHandlerThread.quitSafely();
Bryce Leeaf691c02017-03-20 14:20:22 -070084 }
85
86 protected ActivityManagerService createActivityManagerService() {
Bryce Lee93e7f792017-10-25 15:54:55 -070087 final ActivityManagerService service =
88 setupActivityManagerService(new TestActivityManagerService(mContext));
89 AttributeCache.init(mContext);
90 return service;
Winson Chung3f0e59a2017-10-25 10:19:05 -070091 }
92
93 protected ActivityManagerService setupActivityManagerService(ActivityManagerService service) {
94 service = spy(service);
Bryce Leeba8f4422017-11-20 12:35:57 -080095 doReturn(mock(IPackageManager.class)).when(service).getPackageManager();
Bryce Lee4e4a3ec2017-09-27 08:25:03 -070096 service.mWindowManager = prepareMockWindowManager();
Bryce Lee840c5662017-04-13 10:02:51 -070097 return service;
Bryce Leeaf691c02017-03-20 14:20:22 -070098 }
99
Bryce Lee18d51592017-10-25 10:22:19 -0700100 /**
101 * Builder for creating new activities.
102 */
103 protected static class ActivityBuilder {
104 // An id appended to the end of the component name to make it unique
105 private static int sCurrentActivityId = 0;
Bryce Lee9f6affd2017-09-01 09:18:35 -0700106
Bryce Lee18d51592017-10-25 10:22:19 -0700107 // Default package name
Bryce Lee93e7f792017-10-25 15:54:55 -0700108 static final String DEFAULT_PACKAGE = "com.foo";
Bryce Leeaf691c02017-03-20 14:20:22 -0700109
Bryce Lee18d51592017-10-25 10:22:19 -0700110 // Default base activity name
111 private static final String DEFAULT_BASE_ACTIVITY_NAME = ".BarActivity";
112
113 private final ActivityManagerService mService;
114
115 private ComponentName mComponent;
116 private TaskRecord mTaskRecord;
117 private int mUid;
118 private boolean mCreateTask;
119 private ActivityStack mStack;
120
121 ActivityBuilder(ActivityManagerService service) {
122 mService = service;
Bryce Leeaf691c02017-03-20 14:20:22 -0700123 }
124
Bryce Lee18d51592017-10-25 10:22:19 -0700125 ActivityBuilder setComponent(ComponentName component) {
126 mComponent = component;
127 return this;
128 }
129
130 ActivityBuilder setTask(TaskRecord task) {
131 mTaskRecord = task;
132 return this;
133 }
134
135 ActivityBuilder setStack(ActivityStack stack) {
136 mStack = stack;
137 return this;
138 }
139
140 ActivityBuilder setCreateTask(boolean createTask) {
141 mCreateTask = createTask;
142 return this;
143 }
144
145 ActivityBuilder setUid(int uid) {
146 mUid = uid;
147 return this;
148 }
149
150 ActivityRecord build() {
151 if (mComponent == null) {
152 final int id = sCurrentActivityId++;
153 mComponent = ComponentName.createRelative(DEFAULT_PACKAGE,
154 DEFAULT_BASE_ACTIVITY_NAME + id);
155 }
156
157 if (mCreateTask) {
158 mTaskRecord = new TaskBuilder(mService.mStackSupervisor)
159 .setComponent(mComponent)
160 .setStack(mStack).build();
161 }
162
163 Intent intent = new Intent();
164 intent.setComponent(mComponent);
165 final ActivityInfo aInfo = new ActivityInfo();
166 aInfo.applicationInfo = new ApplicationInfo();
167 aInfo.applicationInfo.packageName = mComponent.getPackageName();
168 aInfo.applicationInfo.uid = mUid;
Bryce Lee18d51592017-10-25 10:22:19 -0700169 final ActivityRecord activity = new ActivityRecord(mService, null /* caller */,
170 0 /* launchedFromPid */, 0, null, intent, null,
171 aInfo /*aInfo*/, new Configuration(), null /* resultTo */, null /* resultWho */,
172 0 /* reqCode */, false /*componentSpecified*/, false /* rootVoiceInteraction */,
173 mService.mStackSupervisor, null /* options */, null /* sourceRecord */);
174 activity.mWindowContainerController = mock(AppWindowContainerController.class);
175
176 if (mTaskRecord != null) {
177 mTaskRecord.addActivityToTop(activity);
178 }
179
180 return activity;
181 }
Bryce Leeaf691c02017-03-20 14:20:22 -0700182 }
183
Bryce Lee18d51592017-10-25 10:22:19 -0700184 /**
185 * Builder for creating new tasks.
186 */
187 protected static class TaskBuilder {
188 private final ActivityStackSupervisor mSupervisor;
Winson Chung1dbc8112017-09-28 18:05:31 -0700189
Bryce Lee18d51592017-10-25 10:22:19 -0700190 private ComponentName mComponent;
191 private String mPackage;
192 private int mFlags = 0;
193 private int mTaskId = 0;
Bryce Lee93e7f792017-10-25 15:54:55 -0700194 private IVoiceInteractionSession mVoiceSession;
Bryce Leeaf691c02017-03-20 14:20:22 -0700195
Bryce Lee18d51592017-10-25 10:22:19 -0700196 private ActivityStack mStack;
Bryce Leeaf691c02017-03-20 14:20:22 -0700197
Bryce Lee18d51592017-10-25 10:22:19 -0700198 TaskBuilder(ActivityStackSupervisor supervisor) {
199 mSupervisor = supervisor;
200 }
Bryce Leeaf691c02017-03-20 14:20:22 -0700201
Bryce Lee18d51592017-10-25 10:22:19 -0700202 TaskBuilder setComponent(ComponentName component) {
203 mComponent = component;
204 return this;
205 }
206
207 TaskBuilder setPackage(String packageName) {
208 mPackage = packageName;
209 return this;
210 }
211
Bryce Lee93e7f792017-10-25 15:54:55 -0700212 TaskBuilder setVoiceSession(IVoiceInteractionSession session) {
213 mVoiceSession = session;
214 return this;
215 }
216
Bryce Lee18d51592017-10-25 10:22:19 -0700217 TaskBuilder setFlags(int flags) {
218 mFlags = flags;
219 return this;
220 }
221
222 TaskBuilder setTaskId(int taskId) {
223 mTaskId = taskId;
224 return this;
225 }
226
227 TaskBuilder setStack(ActivityStack stack) {
228 mStack = stack;
229 return this;
230 }
231
232 TaskRecord build() {
233 if (mStack == null) {
234 mStack = mSupervisor.getDefaultDisplay().createStack(
235 WINDOWING_MODE_FULLSCREEN, ACTIVITY_TYPE_STANDARD, true /* onTop */);
236 }
237
238 final ActivityInfo aInfo = new ActivityInfo();
239 aInfo.applicationInfo = new ApplicationInfo();
240 aInfo.applicationInfo.packageName = mPackage;
241
242 Intent intent = new Intent();
243 intent.setComponent(mComponent);
244 intent.setFlags(mFlags);
245
246 final TaskRecord task = new TaskRecord(mSupervisor.mService, mTaskId, aInfo,
Bryce Lee93e7f792017-10-25 15:54:55 -0700247 intent /*intent*/, mVoiceSession, null /*_voiceInteractor*/);
Bryce Lee18d51592017-10-25 10:22:19 -0700248 mSupervisor.setFocusStackUnchecked("test", mStack);
249 mStack.addTask(task, true, "creating test task");
250 task.setStack(mStack);
251 task.setWindowContainerController(mock(TaskWindowContainerController.class));
252
253 return task;
254 }
Bryce Leeaf691c02017-03-20 14:20:22 -0700255 }
256
257 /**
258 * An {@link ActivityManagerService} subclass which provides a test
259 * {@link ActivityStackSupervisor}.
260 */
261 protected static class TestActivityManagerService extends ActivityManagerService {
Wale Ogunwale04a05ac2017-09-17 21:35:02 -0700262 TestActivityManagerService(Context context) {
Bryce Leeaf691c02017-03-20 14:20:22 -0700263 super(context);
Bryce Lee04ab3462017-04-10 15:06:33 -0700264 mSupportsMultiWindow = true;
265 mSupportsMultiDisplay = true;
Wale Ogunwale04a05ac2017-09-17 21:35:02 -0700266 mSupportsSplitScreenMultiWindow = true;
267 mSupportsFreeformWindowManagement = true;
268 mSupportsPictureInPicture = true;
Bryce Lee6a0754a2017-10-10 17:53:50 -0700269 mWindowManager = WindowTestUtils.getMockWindowManagerService();
Bryce Leeaf691c02017-03-20 14:20:22 -0700270 }
271
272 @Override
Bryce Lee2a3cc462017-10-27 10:57:35 -0700273 final protected ActivityStackSupervisor createStackSupervisor() {
274 final ActivityStackSupervisor supervisor = spy(createTestSupervisor());
275
276 // No home stack is set.
277 doNothing().when(supervisor).moveHomeStackToFront(any());
278 doReturn(true).when(supervisor).moveHomeStackTaskToTop(any());
279 // Invoked during {@link ActivityStack} creation.
280 doNothing().when(supervisor).updateUIDsPresentOnDisplay();
281 // Always keep things awake.
282 doReturn(true).when(supervisor).hasAwakeDisplay();
283 // Called when moving activity to pinned stack.
284 doNothing().when(supervisor).ensureActivitiesVisibleLocked(any(), anyInt(), anyBoolean());
285 // Do not schedule idle timeouts
286 doNothing().when(supervisor).scheduleIdleTimeoutLocked(any());
287
288 supervisor.initialize();
289
290 return supervisor;
291 }
292
293 protected ActivityStackSupervisor createTestSupervisor() {
Bryce Lee3115bdf2017-04-05 08:39:40 -0700294 return new TestActivityStackSupervisor(this, mHandlerThread.getLooper());
Bryce Leeaf691c02017-03-20 14:20:22 -0700295 }
Bryce Lee29a649d2017-08-18 13:52:31 -0700296
297 @Override
298 void updateUsageStats(ActivityRecord component, boolean resumed) {
299 }
Bryce Leeaf691c02017-03-20 14:20:22 -0700300 }
301
302 /**
303 * An {@link ActivityStackSupervisor} which stubs out certain methods that depend on
304 * setup not available in the test environment. Also specifies an injector for
305 */
306 protected static class TestActivityStackSupervisor extends ActivityStackSupervisor {
Bryce Lee2a3cc462017-10-27 10:57:35 -0700307 private ActivityDisplay mDisplay;
Bryce Lee943ebe72017-05-04 10:19:07 -0700308
Bryce Leeaf691c02017-03-20 14:20:22 -0700309 public TestActivityStackSupervisor(ActivityManagerService service, Looper looper) {
310 super(service, looper);
Wale Ogunwale9dcf9462017-09-19 15:13:01 -0700311 mDisplayManager =
312 (DisplayManager) mService.mContext.getSystemService(Context.DISPLAY_SERVICE);
Bryce Lee04ab3462017-04-10 15:06:33 -0700313 mWindowManager = prepareMockWindowManager();
Bryce Lee2a3cc462017-10-27 10:57:35 -0700314 }
315
316 @Override
317 public void initialize() {
318 super.initialize();
Wale Ogunwale04a05ac2017-09-17 21:35:02 -0700319 mDisplay = new TestActivityDisplay(this, DEFAULT_DISPLAY);
Wale Ogunwale9dcf9462017-09-19 15:13:01 -0700320 attachDisplay(mDisplay);
Bryce Lee04ab3462017-04-10 15:06:33 -0700321 }
322
Wale Ogunwale04a05ac2017-09-17 21:35:02 -0700323 @Override
324 ActivityDisplay getDefaultDisplay() {
325 return mDisplay;
326 }
327
Bryce Lee2a3cc462017-10-27 10:57:35 -0700328 // Just return the current front task. This is called internally so we cannot use spy to mock this out.
Bryce Lee04ab3462017-04-10 15:06:33 -0700329 @Override
330 ActivityStack getNextFocusableStackLocked(ActivityStack currentFocus) {
331 return mFocusedStack;
332 }
Wale Ogunwale04a05ac2017-09-17 21:35:02 -0700333 }
334
335 private static class TestActivityDisplay extends ActivityDisplay {
336
337 private final ActivityStackSupervisor mSupervisor;
338 TestActivityDisplay(ActivityStackSupervisor supervisor, int displayId) {
339 super(supervisor, displayId);
340 mSupervisor = supervisor;
Andrii Kulianb1cdb102017-07-13 15:33:06 -0700341 }
342
343 @Override
Wale Ogunwale04a05ac2017-09-17 21:35:02 -0700344 <T extends ActivityStack> T createStackUnchecked(int windowingMode, int activityType,
345 int stackId, boolean onTop) {
346 if (windowingMode == WINDOWING_MODE_PINNED) {
347 return (T) new PinnedActivityStack(this, stackId, mSupervisor, onTop) {
Andrii Kulianb1cdb102017-07-13 15:33:06 -0700348 @Override
349 Rect getDefaultPictureInPictureBounds(float aspectRatio) {
350 return new Rect(50, 50, 100, 100);
351 }
Bryce Lee4e4a3ec2017-09-27 08:25:03 -0700352
353 @Override
354 PinnedStackWindowController createStackWindowController(int displayId,
355 boolean onTop, Rect outBounds) {
356 return mock(PinnedStackWindowController.class);
357 }
Andrii Kulianb1cdb102017-07-13 15:33:06 -0700358 };
359 } else {
Wale Ogunwale04a05ac2017-09-17 21:35:02 -0700360 return (T) new TestActivityStack(
361 this, stackId, mSupervisor, windowingMode, activityType, onTop);
Andrii Kulianb1cdb102017-07-13 15:33:06 -0700362 }
Bryce Lee04ab3462017-04-10 15:06:33 -0700363 }
Bryce Leeaf691c02017-03-20 14:20:22 -0700364 }
365
Bryce Lee04ab3462017-04-10 15:06:33 -0700366 private static WindowManagerService prepareMockWindowManager() {
Bryce Lee4e4a3ec2017-09-27 08:25:03 -0700367 final WindowManagerService service = WindowTestUtils.getMockWindowManagerService();
Bryce Lee04ab3462017-04-10 15:06:33 -0700368
369 doAnswer((InvocationOnMock invocationOnMock) -> {
370 final Runnable runnable = invocationOnMock.<Runnable>getArgument(0);
371 if (runnable != null) {
372 runnable.run();
373 }
374 return null;
375 }).when(service).inSurfaceTransaction(any());
376
377 return service;
378 }
379
Bryce Leeaf691c02017-03-20 14:20:22 -0700380 /**
Bryce Lee4e4a3ec2017-09-27 08:25:03 -0700381 * Overrided of {@link ActivityStack} that tracks test metrics, such as the number of times a
Bryce Leeaf691c02017-03-20 14:20:22 -0700382 * method is called. Note that its functionality depends on the implementations of the
383 * construction arguments.
384 */
385 protected static class TestActivityStack<T extends StackWindowController>
Wale Ogunwale7e1f5f52017-10-18 15:19:59 -0700386 extends ActivityStack<T> {
Bryce Leeaf691c02017-03-20 14:20:22 -0700387 private int mOnActivityRemovedFromStackCount = 0;
388 private T mContainerController;
Wale Ogunwale04a05ac2017-09-17 21:35:02 -0700389
Wale Ogunwale7e1f5f52017-10-18 15:19:59 -0700390 static final int IS_TRANSLUCENT_UNSET = 0;
391 static final int IS_TRANSLUCENT_FALSE = 1;
392 static final int IS_TRANSLUCENT_TRUE = 2;
393 private int mIsTranslucent = IS_TRANSLUCENT_UNSET;
394
Wale Ogunwale30e441d2017-11-09 08:28:45 -0800395 static final int SUPPORTS_SPLIT_SCREEN_UNSET = 0;
396 static final int SUPPORTS_SPLIT_SCREEN_FALSE = 1;
397 static final int SUPPORTS_SPLIT_SCREEN_TRUE = 2;
398 private int mSupportsSplitScreen = SUPPORTS_SPLIT_SCREEN_UNSET;
399
Wale Ogunwale9dcf9462017-09-19 15:13:01 -0700400 TestActivityStack(ActivityDisplay display, int stackId, ActivityStackSupervisor supervisor,
Wale Ogunwale04a05ac2017-09-17 21:35:02 -0700401 int windowingMode, int activityType, boolean onTop) {
402 super(display, stackId, supervisor, windowingMode, activityType, onTop);
Bryce Leeaf691c02017-03-20 14:20:22 -0700403 }
404
405 @Override
406 void onActivityRemovedFromStack(ActivityRecord r) {
407 mOnActivityRemovedFromStackCount++;
408 super.onActivityRemovedFromStack(r);
409 }
410
411 // Returns the number of times {@link #onActivityRemovedFromStack} has been called
Wale Ogunwale7e1f5f52017-10-18 15:19:59 -0700412 int onActivityRemovedFromStackInvocationCount() {
Bryce Leeaf691c02017-03-20 14:20:22 -0700413 return mOnActivityRemovedFromStackCount;
414 }
415
416 @Override
Wale Ogunwale034a8ec2017-09-02 17:14:40 -0700417 protected T createStackWindowController(int displayId, boolean onTop, Rect outBounds) {
Bryce Leeaf691c02017-03-20 14:20:22 -0700418 mContainerController = (T) WindowTestUtils.createMockStackWindowContainerController();
Bryce Leef3c6a472017-11-14 14:53:06 -0800419
420 // Primary pinned stacks require a non-empty out bounds to be set or else all tasks
421 // will be moved to the full screen stack.
422 if (getWindowingMode() == WINDOWING_MODE_SPLIT_SCREEN_PRIMARY) {
423 outBounds.set(0, 0, 100, 100);
424 }
Bryce Leeaf691c02017-03-20 14:20:22 -0700425 return mContainerController;
426 }
427
428 @Override
429 T getWindowContainerController() {
430 return mContainerController;
431 }
Wale Ogunwale7e1f5f52017-10-18 15:19:59 -0700432
433 void setIsTranslucent(boolean isTranslucent) {
434 mIsTranslucent = isTranslucent ? IS_TRANSLUCENT_TRUE : IS_TRANSLUCENT_FALSE;
435 }
436
437 @Override
Wale Ogunwale66e16852017-10-19 13:35:52 -0700438 boolean isStackTranslucent(ActivityRecord starting) {
Wale Ogunwale7e1f5f52017-10-18 15:19:59 -0700439 switch (mIsTranslucent) {
440 case IS_TRANSLUCENT_TRUE:
441 return true;
442 case IS_TRANSLUCENT_FALSE:
443 return false;
444 case IS_TRANSLUCENT_UNSET:
445 default:
Wale Ogunwale66e16852017-10-19 13:35:52 -0700446 return super.isStackTranslucent(starting);
Wale Ogunwale7e1f5f52017-10-18 15:19:59 -0700447 }
448 }
Wale Ogunwale30e441d2017-11-09 08:28:45 -0800449
450 void setSupportsSplitScreen(boolean supportsSplitScreen) {
451 mSupportsSplitScreen = supportsSplitScreen
452 ? SUPPORTS_SPLIT_SCREEN_TRUE : SUPPORTS_SPLIT_SCREEN_FALSE;
453 }
454
455 @Override
456 public boolean supportsSplitScreenWindowingMode() {
457 switch (mSupportsSplitScreen) {
458 case SUPPORTS_SPLIT_SCREEN_TRUE:
459 return true;
460 case SUPPORTS_SPLIT_SCREEN_FALSE:
461 return false;
462 case SUPPORTS_SPLIT_SCREEN_UNSET:
463 default:
464 return super.supportsSplitScreenWindowingMode();
465 }
466 }
Bryce Leeaf691c02017-03-20 14:20:22 -0700467 }
Bryce Leeaf691c02017-03-20 14:20:22 -0700468}