diff --git a/samples/ApiDemos/AndroidManifest.xml b/samples/ApiDemos/AndroidManifest.xml
index 3f975f220..3896c74fc 100644
--- a/samples/ApiDemos/AndroidManifest.xml
+++ b/samples/ApiDemos/AndroidManifest.xml
@@ -298,6 +298,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/ApiDemos/res/values/strings.xml b/samples/ApiDemos/res/values/strings.xml
index 30d92ab88..59f2fe96e 100644
--- a/samples/ApiDemos/res/values/strings.xml
+++ b/samples/ApiDemos/res/values/strings.xml
@@ -63,6 +63,9 @@
Screen Orientation
App/Activity/Picture in Picture
+ App/Activity/Max Aspect Ratio/1:1
+ App/Activity/Max Aspect Ratio/16:9
+ App/Activity/Max Aspect Ratio/Any
Enter picture-in-picture mode
App/Activity/Translucent
diff --git a/samples/ApiDemos/src/com/example/android/apis/app/MaxAspectRatio.java b/samples/ApiDemos/src/com/example/android/apis/app/MaxAspectRatio.java
new file mode 100644
index 000000000..223cd9290
--- /dev/null
+++ b/samples/ApiDemos/src/com/example/android/apis/app/MaxAspectRatio.java
@@ -0,0 +1,31 @@
+/*
+ * 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 com.example.android.apis.app;
+
+import android.app.Activity;
+
+public abstract class MaxAspectRatio extends Activity {
+
+ public static class Square extends MaxAspectRatio {
+ }
+
+ public static class SixteenToNine extends MaxAspectRatio {
+ }
+
+ public static class Any extends MaxAspectRatio {
+ }
+}