Loading core/java/android/app/IActivityManager.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -575,6 +575,11 @@ interface IActivityManager { void resizeDockedStack(in Rect dockedBounds, in Rect tempDockedTaskBounds, in Rect tempDockedTaskInsetBounds, in Rect tempOtherTaskBounds, in Rect tempOtherTaskInsetBounds); /** * Sets whether we are currently in an interactive split screen resize operation where we * are changing the docked stack size. */ void setSplitScreenResizing(boolean resizing); int setVrMode(in IBinder token, boolean enabled, in ComponentName packageName); // Gets the URI permissions granted to an arbitrary package (or all packages if null) // NOTE: this is different from getPersistedUriPermissions(), which returns the URIs the package Loading core/java/android/view/IWindowManager.aidl +0 −6 Original line number Diff line number Diff line Loading @@ -341,12 +341,6 @@ interface IWindowManager */ int getDockedStackSide(); /** * Sets whether we are currently in a drag resize operation where we are changing the docked * stack size. */ void setDockedStackResizing(boolean resizing); /** * Sets the region the user can touch the divider. This region will be excluded from the region * which is used to cause a focus switch when dispatching touch. Loading core/tests/coretests/src/android/graphics/RectTest.java 0 → 100644 +50 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.graphics; import static android.graphics.Rect.copyOrNull; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertNull; import android.platform.test.annotations.Presubmit; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(AndroidJUnit4.class) @SmallTest @Presubmit public class RectTest { @Test public void copyOrNull_passesThroughNull() { assertNull(copyOrNull(null)); } @Test public void copyOrNull_copiesNonNull() { final Rect orig = new Rect(1, 2, 3, 4); final Rect copy = copyOrNull(orig); assertEquals(orig, copy); assertNotSame(orig, copy); } } graphics/java/android/graphics/Rect.java +11 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.graphics; import android.annotation.CheckResult; import android.annotation.Nullable; import android.os.Parcel; import android.os.Parcelable; Loading Loading @@ -99,6 +100,16 @@ public final class Rect implements Parcelable { } } /** * Returns a copy of {@code r} if {@code r} is not {@code null}, or {@code null} otherwise. * * @hide */ @Nullable public static Rect copyOrNull(@Nullable Rect r) { return r == null ? null : new Rect(r); } @Override public boolean equals(Object o) { if (this == o) return true; Loading packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java +1 −1 Original line number Diff line number Diff line Loading @@ -180,7 +180,7 @@ public class WindowManagerProxy { @Override public void run() { try { WindowManagerGlobal.getWindowManagerService().setDockedStackResizing(resizing); ActivityManager.getService().setSplitScreenResizing(resizing); } catch (RemoteException e) { Log.w(TAG, "Error calling setDockedStackResizing: " + e); } Loading Loading
core/java/android/app/IActivityManager.aidl +5 −0 Original line number Diff line number Diff line Loading @@ -575,6 +575,11 @@ interface IActivityManager { void resizeDockedStack(in Rect dockedBounds, in Rect tempDockedTaskBounds, in Rect tempDockedTaskInsetBounds, in Rect tempOtherTaskBounds, in Rect tempOtherTaskInsetBounds); /** * Sets whether we are currently in an interactive split screen resize operation where we * are changing the docked stack size. */ void setSplitScreenResizing(boolean resizing); int setVrMode(in IBinder token, boolean enabled, in ComponentName packageName); // Gets the URI permissions granted to an arbitrary package (or all packages if null) // NOTE: this is different from getPersistedUriPermissions(), which returns the URIs the package Loading
core/java/android/view/IWindowManager.aidl +0 −6 Original line number Diff line number Diff line Loading @@ -341,12 +341,6 @@ interface IWindowManager */ int getDockedStackSide(); /** * Sets whether we are currently in a drag resize operation where we are changing the docked * stack size. */ void setDockedStackResizing(boolean resizing); /** * Sets the region the user can touch the divider. This region will be excluded from the region * which is used to cause a focus switch when dispatching touch. Loading
core/tests/coretests/src/android/graphics/RectTest.java 0 → 100644 +50 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.graphics; import static android.graphics.Rect.copyOrNull; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertNull; import android.platform.test.annotations.Presubmit; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(AndroidJUnit4.class) @SmallTest @Presubmit public class RectTest { @Test public void copyOrNull_passesThroughNull() { assertNull(copyOrNull(null)); } @Test public void copyOrNull_copiesNonNull() { final Rect orig = new Rect(1, 2, 3, 4); final Rect copy = copyOrNull(orig); assertEquals(orig, copy); assertNotSame(orig, copy); } }
graphics/java/android/graphics/Rect.java +11 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package android.graphics; import android.annotation.CheckResult; import android.annotation.Nullable; import android.os.Parcel; import android.os.Parcelable; Loading Loading @@ -99,6 +100,16 @@ public final class Rect implements Parcelable { } } /** * Returns a copy of {@code r} if {@code r} is not {@code null}, or {@code null} otherwise. * * @hide */ @Nullable public static Rect copyOrNull(@Nullable Rect r) { return r == null ? null : new Rect(r); } @Override public boolean equals(Object o) { if (this == o) return true; Loading
packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java +1 −1 Original line number Diff line number Diff line Loading @@ -180,7 +180,7 @@ public class WindowManagerProxy { @Override public void run() { try { WindowManagerGlobal.getWindowManagerService().setDockedStackResizing(resizing); ActivityManager.getService().setSplitScreenResizing(resizing); } catch (RemoteException e) { Log.w(TAG, "Error calling setDockedStackResizing: " + e); } Loading