Merge "Fix UI bugs for widget picker search." into sc-dev
diff --git a/Android.bp b/Android.bp
index df0a96f..7e6a565 100644
--- a/Android.bp
+++ b/Android.bp
@@ -115,6 +115,9 @@
manifest: "AndroidManifest-common.xml",
sdk_version: "current",
min_sdk_version: "26",
+ lint: {
+ baseline_filename: "lint-baseline-res-lib.xml",
+ },
}
//
@@ -127,6 +130,9 @@
sdk_version: "current",
min_sdk_version: "26",
manifest: "AndroidManifest-common.xml",
+ lint: {
+ baseline_filename: "lint-baseline-common-deps-lib.xml",
+ },
}
//
@@ -171,6 +177,9 @@
additional_manifests: [
"AndroidManifest-common.xml",
],
+ lint: {
+ baseline_filename: "lint-baseline-launcher3.xml",
+ },
}
// Library with all the dependencies for building quickstep
@@ -236,5 +245,8 @@
"AndroidManifest-common.xml",
],
min_sdk_version: "29",
+ lint: {
+ baseline_filename: "lint-baseline-go-res-lib.xml",
+ },
}
diff --git a/lint-baseline-common-deps-lib.xml b/lint-baseline-common-deps-lib.xml
new file mode 100644
index 0000000..e52f8fb
--- /dev/null
+++ b/lint-baseline-common-deps-lib.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="5" by="lint 4.1.0" client="cli" variant="all" version="4.1.0">
+
+ <issue
+ id="NewApi"
+ message="`?android:attr/dialogCornerRadius` requires API level 28 (current min is 26)"
+ errorLine1=" android:topLeftRadius="?android:attr/dialogCornerRadius""
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/res/drawable/add_item_dialog_background.xml"
+ line="6"
+ column="9"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="`?android:attr/dialogCornerRadius` requires API level 28 (current min is 26)"
+ errorLine1=" android:topRightRadius="?android:attr/dialogCornerRadius" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/res/drawable/add_item_dialog_background.xml"
+ line="7"
+ column="9"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="`@android:style/Widget.DeviceDefault.Button.Colored` requires API level 28 (current min is 26)"
+ errorLine1=" <style name="Widget.DeviceDefault.Button.Rounded.Colored" parent="@android:style/Widget.DeviceDefault.Button.Colored">"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/res/values/styles.xml"
+ line="287"
+ column="63"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="`@android:dimen/system_app_widget_background_radius` requires API level 31 (current min is 26)"
+ errorLine1=" <corners android:radius="@android:dimen/system_app_widget_background_radius" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/res/drawable/widget_resize_frame.xml"
+ line="20"
+ column="14"/>
+ </issue>
+
+</issues>
diff --git a/lint-baseline-go-res-lib.xml b/lint-baseline-go-res-lib.xml
new file mode 100644
index 0000000..c5669f2
--- /dev/null
+++ b/lint-baseline-go-res-lib.xml
@@ -0,0 +1,576 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="5" by="lint 4.1.0" client="cli" variant="all" version="4.1.0">
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.view.View#getWindowInsetsController`"
+ errorLine1=" getWindowInsetsController().hide(WindowInsets.Type.ime());"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/allapps/AllAppsContainerView.java"
+ line="203"
+ column="9"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.view.WindowInsets.Type#ime`"
+ errorLine1=" getWindowInsetsController().hide(WindowInsets.Type.ime());"
+ errorLine2=" ~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/allapps/AllAppsContainerView.java"
+ line="203"
+ column="60"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.view.WindowInsetsController#hide`"
+ errorLine1=" getWindowInsetsController().hide(WindowInsets.Type.ime());"
+ errorLine2=" ~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/allapps/AllAppsContainerView.java"
+ line="203"
+ column="37"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.view.View#getWindowInsetsController`"
+ errorLine1=" getWindowInsetsController().hide(WindowInsets.Type.ime());"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/allapps/AllAppsRecyclerView.java"
+ line="193"
+ column="17"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.view.WindowInsets.Type#ime`"
+ errorLine1=" getWindowInsetsController().hide(WindowInsets.Type.ime());"
+ errorLine2=" ~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/allapps/AllAppsRecyclerView.java"
+ line="193"
+ column="68"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.view.WindowInsetsController#hide`"
+ errorLine1=" getWindowInsetsController().hide(WindowInsets.Type.ime());"
+ errorLine2=" ~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/allapps/AllAppsRecyclerView.java"
+ line="193"
+ column="45"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 29): `android.appwidget.AppWidgetHostView#updateAppWidgetSize`"
+ errorLine1=" widgetView.updateAppWidgetSize(new Bundle(), sizes);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/AppWidgetResizeFrame.java"
+ line="399"
+ column="24"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 29): `android.graphics.Rect#inset`"
+ errorLine1=" potentialTaskRect.inset(insets.left, insets.top, insets.right, insets.bottom);"
+ errorLine2=" ~~~~~">
+ <location
+ file="packages/apps/Launcher3/quickstep/src/com/android/quickstep/BaseActivityInterface.java"
+ line="248"
+ column="27"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 29): `android.graphics.Rect#inset`"
+ errorLine1=" potentialTaskRect.inset("
+ errorLine2=" ~~~~~">
+ <location
+ file="packages/apps/Launcher3/quickstep/src/com/android/quickstep/BaseActivityInterface.java"
+ line="249"
+ column="27"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 29): `android.graphics.Rect#inset`"
+ errorLine1=" outRect.inset(Math.max(insets.left, sideMargin), Math.max(insets.top, topMargin),"
+ errorLine2=" ~~~~~">
+ <location
+ file="packages/apps/Launcher3/quickstep/src/com/android/quickstep/BaseActivityInterface.java"
+ line="291"
+ column="17"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 29): `android.graphics.Rect#inset`"
+ errorLine1=" gridRect.inset(0, dp.overviewTaskThumbnailTopMarginPx, 0, 0);"
+ errorLine2=" ~~~~~">
+ <location
+ file="packages/apps/Launcher3/quickstep/src/com/android/quickstep/BaseActivityInterface.java"
+ line="315"
+ column="18"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.view.WindowManager#getCurrentWindowMetrics`"
+ errorLine1=" .getCurrentWindowMetrics().getWindowInsets();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/DeviceProfile.java"
+ line="236"
+ column="22"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.view.WindowMetrics#getWindowInsets`"
+ errorLine1=" .getCurrentWindowMetrics().getWindowInsets();"
+ errorLine2=" ~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/DeviceProfile.java"
+ line="236"
+ column="48"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.content.Context#getDisplay`"
+ errorLine1=" if (mContext.getDisplay() != null) {"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/quickstep/src/com/android/quickstep/interaction/EdgeBackGestureHandler.java"
+ line="115"
+ column="26"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.content.Context#getDisplay`"
+ errorLine1=" mContext.getDisplay().getRealSize(mDisplaySize);"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/quickstep/src/com/android/quickstep/interaction/EdgeBackGestureHandler.java"
+ line="116"
+ column="26"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.content.ContextWrapper#getDisplay`"
+ errorLine1=" Display display = getDisplay();"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/quickstep/src/com/android/quickstep/interaction/GestureSandboxActivity.java"
+ line="153"
+ column="27"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `java.util.List#of`"
+ errorLine1=" List.of(new Rect(0, 0, metrics.widthPixels, metrics.heightPixels)));"
+ errorLine2=" ~~">
+ <location
+ file="packages/apps/Launcher3/quickstep/src/com/android/quickstep/interaction/GestureSandboxActivity.java"
+ line="158"
+ column="26"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 29): `android.appwidget.AppWidgetHostView#resetColorResources`"
+ errorLine1=" resetColorResources();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetHostView.java"
+ line="137"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `java.util.List#of`"
+ errorLine1=" mColorExtractor.addLocation(List.of(mLastLocationRegistered));"
+ errorLine2=" ~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetHostView.java"
+ line="367"
+ column="46"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `java.util.List#of`"
+ errorLine1=" mColorExtractor.addLocation(List.of(mLastLocationRegistered));"
+ errorLine2=" ~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetHostView.java"
+ line="390"
+ column="50"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 29): `android.appwidget.AppWidgetProviderInfo#maxResizeWidth`"
+ errorLine1=" (ATLEAST_S && maxResizeWidth > 0)"
+ errorLine2=" ~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java"
+ line="91"
+ column="31"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 29): `android.appwidget.AppWidgetProviderInfo#maxResizeWidth`"
+ errorLine1=" ? getSpanX(widgetPadding, maxResizeWidth, smallestCellWidth)"
+ errorLine2=" ~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java"
+ line="92"
+ column="51"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 29): `android.appwidget.AppWidgetProviderInfo#maxResizeHeight`"
+ errorLine1=" (ATLEAST_S && maxResizeHeight > 0)"
+ errorLine2=" ~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java"
+ line="95"
+ column="31"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 29): `android.appwidget.AppWidgetProviderInfo#maxResizeHeight`"
+ errorLine1=" ? getSpanY(widgetPadding, maxResizeHeight, smallestCellHeight)"
+ errorLine2=" ~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java"
+ line="96"
+ column="51"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 29): `android.appwidget.AppWidgetProviderInfo#targetCellWidth`"
+ errorLine1=" if (ATLEAST_S && targetCellWidth >= minSpanX && targetCellWidth <= maxSpanX"
+ errorLine2=" ~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java"
+ line="101"
+ column="26"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 29): `android.appwidget.AppWidgetProviderInfo#targetCellWidth`"
+ errorLine1=" if (ATLEAST_S && targetCellWidth >= minSpanX && targetCellWidth <= maxSpanX"
+ errorLine2=" ~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java"
+ line="101"
+ column="57"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 29): `android.appwidget.AppWidgetProviderInfo#targetCellHeight`"
+ errorLine1=" && targetCellHeight >= minSpanY && targetCellHeight <= maxSpanY) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java"
+ line="102"
+ column="20"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 29): `android.appwidget.AppWidgetProviderInfo#targetCellHeight`"
+ errorLine1=" && targetCellHeight >= minSpanY && targetCellHeight <= maxSpanY) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java"
+ line="102"
+ column="52"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 29): `android.appwidget.AppWidgetProviderInfo#targetCellWidth`"
+ errorLine1=" spanX = targetCellWidth;"
+ errorLine2=" ~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java"
+ line="103"
+ column="21"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 29): `android.appwidget.AppWidgetProviderInfo#targetCellHeight`"
+ errorLine1=" spanY = targetCellHeight;"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java"
+ line="104"
+ column="21"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.content.Context#getDisplay`"
+ errorLine1=" final Display display = mContext.getDisplay();"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/quickstep/src/com/android/quickstep/interaction/NavBarGestureHandler.java"
+ line="94"
+ column="42"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 29): `android.content.pm.LauncherActivityInfo#getLoadingProgress`"
+ errorLine1=" return (int) (100 * info.getLoadingProgress());"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/util/PackageManagerHelper.java"
+ line="338"
+ column="38"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `java.util.List#of`"
+ errorLine1=" private List<WidgetsListBaseEntry> mAllWidgets = List.of();"
+ errorLine2=" ~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java"
+ line="64"
+ column="59"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `java.util.List#of`"
+ errorLine1=" private List<ItemInfo> mRecommendedWidgets = List.of();"
+ errorLine2=" ~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java"
+ line="66"
+ column="55"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `new android.view.SurfaceControlViewHost`"
+ errorLine1=" .submit(() -> new SurfaceControlViewHost(mContext, mDisplay, mHostToken))"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java"
+ line="91"
+ column="35"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.view.SurfaceControlViewHost#getSurfacePackage`"
+ errorLine1=" surfacePackage = mSurfaceControlViewHost.getSurfacePackage();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java"
+ line="93"
+ column="54"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.view.SurfaceControlViewHost#setView`"
+ errorLine1=" host.setView(view, view.getMeasuredWidth(), view.getMeasuredHeight());"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java"
+ line="127"
+ column="22"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Cast from `SurfacePackage` to `Parcelable` requires API level 30 (current min is 29)"
+ errorLine1=" result.putParcelable(KEY_SURFACE_PACKAGE, surfacePackage);"
+ errorLine2=" ~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java"
+ line="132"
+ column="51"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.view.SurfaceControlViewHost#release`"
+ errorLine1=" mSurfaceControlViewHost.release();"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java"
+ line="149"
+ column="41"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.graphics.Outline#setPath`"
+ errorLine1=" outline.setPath(mPath);"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/popup/RoundedArrowDrawable.java"
+ line="88"
+ column="17"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 29): `new android.widget.EdgeEffect`"
+ errorLine1=" ? new EdgeEffect(context, attrs) : new EdgeEffect(context);"
+ errorLine2=" ~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/views/SpringRelativeLayout.java"
+ line="49"
+ column="19"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 29): `new android.widget.EdgeEffect`"
+ errorLine1=" ? new EdgeEffect(context, attrs) : new EdgeEffect(context);"
+ errorLine2=" ~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/views/SpringRelativeLayout.java"
+ line="51"
+ column="19"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.view.WindowManager.LayoutParams#setFitInsetsTypes`"
+ errorLine1=" mWindowLayoutParams.setFitInsetsTypes(0);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/quickstep/src/com/android/launcher3/taskbar/TaskbarController.java"
+ line="316"
+ column="29"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.view.WindowInsets#getInsets`"
+ errorLine1=" Insets systemInsets = insets.getInsets(WindowInsets.Type.systemBars());"
+ errorLine2=" ~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/quickstep/src/com/android/quickstep/interaction/TutorialFragment.java"
+ line="118"
+ column="42"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.view.WindowInsets.Type#systemBars`"
+ errorLine1=" Insets systemInsets = insets.getInsets(WindowInsets.Type.systemBars());"
+ errorLine2=" ~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/quickstep/src/com/android/quickstep/interaction/TutorialFragment.java"
+ line="118"
+ column="70"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 29): `android.appwidget.AppWidgetProviderInfo#loadDescription`"
+ errorLine1=" CharSequence description = mItem.widgetInfo.loadDescription(getContext());"
+ errorLine2=" ~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/WidgetCell.java"
+ line="193"
+ column="57"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 29): `android.appwidget.AppWidgetProviderInfo#previewLayout`"
+ errorLine1=" && item.widgetInfo.previewLayout != Resources.ID_NULL) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/WidgetCell.java"
+ line="214"
+ column="20"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 29): `android.appwidget.AppWidgetProviderInfo#previewLayout`"
+ errorLine1=" launcherAppWidgetProviderInfo.initialLayout = item.widgetInfo.previewLayout;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/WidgetCell.java"
+ line="222"
+ column="59"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.view.View#getWindowInsetsController`"
+ errorLine1=" getWindowInsetsController().hide(WindowInsets.Type.ime());"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java"
+ line="558"
+ column="9"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.view.WindowInsets.Type#ime`"
+ errorLine1=" getWindowInsetsController().hide(WindowInsets.Type.ime());"
+ errorLine2=" ~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java"
+ line="558"
+ column="60"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `android.view.WindowInsetsController#hide`"
+ errorLine1=" getWindowInsetsController().hide(WindowInsets.Type.ime());"
+ errorLine2=" ~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java"
+ line="558"
+ column="37"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 29): `java.util.List#of`"
+ errorLine1=" return new RecommendationTableData(List.of(), previewScale);"
+ errorLine2=" ~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java"
+ line="139"
+ column="53"/>
+ </issue>
+
+</issues>
diff --git a/lint-baseline-launcher3.xml b/lint-baseline-launcher3.xml
new file mode 100644
index 0000000..469ad94
--- /dev/null
+++ b/lint-baseline-launcher3.xml
@@ -0,0 +1,576 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="5" by="lint 4.1.0" client="cli" variant="all" version="4.1.0">
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `android.view.View#getWindowInsetsController`"
+ errorLine1=" getWindowInsetsController().hide(WindowInsets.Type.ime());"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/allapps/AllAppsContainerView.java"
+ line="203"
+ column="9"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `android.view.WindowInsets.Type#ime`"
+ errorLine1=" getWindowInsetsController().hide(WindowInsets.Type.ime());"
+ errorLine2=" ~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/allapps/AllAppsContainerView.java"
+ line="203"
+ column="60"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `android.view.WindowInsetsController#hide`"
+ errorLine1=" getWindowInsetsController().hide(WindowInsets.Type.ime());"
+ errorLine2=" ~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/allapps/AllAppsContainerView.java"
+ line="203"
+ column="37"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `android.view.View#getWindowInsetsController`"
+ errorLine1=" getWindowInsetsController().hide(WindowInsets.Type.ime());"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/allapps/AllAppsRecyclerView.java"
+ line="193"
+ column="17"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `android.view.WindowInsets.Type#ime`"
+ errorLine1=" getWindowInsetsController().hide(WindowInsets.Type.ime());"
+ errorLine2=" ~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/allapps/AllAppsRecyclerView.java"
+ line="193"
+ column="68"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `android.view.WindowInsetsController#hide`"
+ errorLine1=" getWindowInsetsController().hide(WindowInsets.Type.ime());"
+ errorLine2=" ~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/allapps/AllAppsRecyclerView.java"
+ line="193"
+ column="45"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 26): `android.appwidget.AppWidgetHostView#updateAppWidgetSize`"
+ errorLine1=" widgetView.updateAppWidgetSize(new Bundle(), sizes);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/AppWidgetResizeFrame.java"
+ line="399"
+ column="24"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `android.view.WindowManager#getCurrentWindowMetrics`"
+ errorLine1=" .getCurrentWindowMetrics().getWindowInsets();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/DeviceProfile.java"
+ line="236"
+ column="22"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `android.view.WindowMetrics#getWindowInsets`"
+ errorLine1=" .getCurrentWindowMetrics().getWindowInsets();"
+ errorLine2=" ~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/DeviceProfile.java"
+ line="236"
+ column="48"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 29 (current min is 26): `android.content.res.Resources#getFloat`"
+ errorLine1=" folderLabelTextScale = res.getFloat(R.dimen.folder_label_text_scale);"
+ errorLine2=" ~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/DeviceProfile.java"
+ line="256"
+ column="36"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 29 (current min is 26): `android.content.res.Resources#getFloat`"
+ errorLine1=" return mContext.getResources().getFloat(resId);"
+ errorLine2=" ~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/util/DynamicResource.java"
+ line="73"
+ column="40"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 26): `android.appwidget.AppWidgetHostView#resetColorResources`"
+ errorLine1=" resetColorResources();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetHostView.java"
+ line="137"
+ column="13"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `java.util.List#of`"
+ errorLine1=" mColorExtractor.addLocation(List.of(mLastLocationRegistered));"
+ errorLine2=" ~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetHostView.java"
+ line="367"
+ column="46"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `java.util.List#of`"
+ errorLine1=" mColorExtractor.addLocation(List.of(mLastLocationRegistered));"
+ errorLine2=" ~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetHostView.java"
+ line="390"
+ column="50"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 26): `android.appwidget.AppWidgetProviderInfo#maxResizeWidth`"
+ errorLine1=" (ATLEAST_S && maxResizeWidth > 0)"
+ errorLine2=" ~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java"
+ line="91"
+ column="31"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 26): `android.appwidget.AppWidgetProviderInfo#maxResizeWidth`"
+ errorLine1=" ? getSpanX(widgetPadding, maxResizeWidth, smallestCellWidth)"
+ errorLine2=" ~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java"
+ line="92"
+ column="51"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 26): `android.appwidget.AppWidgetProviderInfo#maxResizeHeight`"
+ errorLine1=" (ATLEAST_S && maxResizeHeight > 0)"
+ errorLine2=" ~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java"
+ line="95"
+ column="31"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 26): `android.appwidget.AppWidgetProviderInfo#maxResizeHeight`"
+ errorLine1=" ? getSpanY(widgetPadding, maxResizeHeight, smallestCellHeight)"
+ errorLine2=" ~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java"
+ line="96"
+ column="51"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 26): `android.appwidget.AppWidgetProviderInfo#targetCellWidth`"
+ errorLine1=" if (ATLEAST_S && targetCellWidth >= minSpanX && targetCellWidth <= maxSpanX"
+ errorLine2=" ~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java"
+ line="101"
+ column="26"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 26): `android.appwidget.AppWidgetProviderInfo#targetCellWidth`"
+ errorLine1=" if (ATLEAST_S && targetCellWidth >= minSpanX && targetCellWidth <= maxSpanX"
+ errorLine2=" ~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java"
+ line="101"
+ column="57"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 26): `android.appwidget.AppWidgetProviderInfo#targetCellHeight`"
+ errorLine1=" && targetCellHeight >= minSpanY && targetCellHeight <= maxSpanY) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java"
+ line="102"
+ column="20"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 26): `android.appwidget.AppWidgetProviderInfo#targetCellHeight`"
+ errorLine1=" && targetCellHeight >= minSpanY && targetCellHeight <= maxSpanY) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java"
+ line="102"
+ column="52"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 26): `android.appwidget.AppWidgetProviderInfo#targetCellWidth`"
+ errorLine1=" spanX = targetCellWidth;"
+ errorLine2=" ~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java"
+ line="103"
+ column="21"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 26): `android.appwidget.AppWidgetProviderInfo#targetCellHeight`"
+ errorLine1=" spanY = targetCellHeight;"
+ errorLine2=" ~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java"
+ line="104"
+ column="21"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 28 (current min is 26): `android.app.Person#getKey`"
+ errorLine1=" return people.stream().filter(person -> person.getKey() != null)"
+ errorLine2=" ~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/notification/NotificationKeyData.java"
+ line="72"
+ column="56"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Method reference requires API level 28 (current min is 26): `Person::getKey`"
+ errorLine1=" .map(Person::getKey).sorted().toArray(String[]::new);"
+ errorLine2=" ~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/notification/NotificationKeyData.java"
+ line="73"
+ column="22"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 26): `android.content.pm.LauncherActivityInfo#getLoadingProgress`"
+ errorLine1=" return (int) (100 * info.getLoadingProgress());"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/util/PackageManagerHelper.java"
+ line="338"
+ column="38"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 29 (current min is 26): `android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction#ACTION_PAGE_LEFT`"
+ errorLine1=" AccessibilityNodeInfo.AccessibilityAction.ACTION_PAGE_LEFT"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/PagedView.java"
+ line="1752"
+ column="17"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 29 (current min is 26): `android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction#ACTION_PAGE_RIGHT`"
+ errorLine1=" : AccessibilityNodeInfo.AccessibilityAction.ACTION_PAGE_RIGHT);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/PagedView.java"
+ line="1753"
+ column="19"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 29 (current min is 26): `android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction#ACTION_PAGE_RIGHT`"
+ errorLine1=" AccessibilityNodeInfo.AccessibilityAction.ACTION_PAGE_RIGHT"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/PagedView.java"
+ line="1760"
+ column="17"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 29 (current min is 26): `android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction#ACTION_PAGE_LEFT`"
+ errorLine1=" : AccessibilityNodeInfo.AccessibilityAction.ACTION_PAGE_LEFT);"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/PagedView.java"
+ line="1761"
+ column="19"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `java.util.List#of`"
+ errorLine1=" private List<WidgetsListBaseEntry> mAllWidgets = List.of();"
+ errorLine2=" ~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java"
+ line="64"
+ column="59"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `java.util.List#of`"
+ errorLine1=" private List<ItemInfo> mRecommendedWidgets = List.of();"
+ errorLine2=" ~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/popup/PopupDataProvider.java"
+ line="66"
+ column="55"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `new android.view.SurfaceControlViewHost`"
+ errorLine1=" .submit(() -> new SurfaceControlViewHost(mContext, mDisplay, mHostToken))"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java"
+ line="91"
+ column="35"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `android.view.SurfaceControlViewHost#getSurfacePackage`"
+ errorLine1=" surfacePackage = mSurfaceControlViewHost.getSurfacePackage();"
+ errorLine2=" ~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java"
+ line="93"
+ column="54"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `android.view.SurfaceControlViewHost#setView`"
+ errorLine1=" host.setView(view, view.getMeasuredWidth(), view.getMeasuredHeight());"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java"
+ line="127"
+ column="22"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Cast from `SurfacePackage` to `Parcelable` requires API level 30 (current min is 26)"
+ errorLine1=" result.putParcelable(KEY_SURFACE_PACKAGE, surfacePackage);"
+ errorLine2=" ~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java"
+ line="132"
+ column="51"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `android.view.SurfaceControlViewHost#release`"
+ errorLine1=" mSurfaceControlViewHost.release();"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/graphics/PreviewSurfaceRenderer.java"
+ line="149"
+ column="41"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `android.graphics.Outline#setPath`"
+ errorLine1=" outline.setPath(mPath);"
+ errorLine2=" ~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/popup/RoundedArrowDrawable.java"
+ line="88"
+ column="17"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 26): `new android.widget.EdgeEffect`"
+ errorLine1=" ? new EdgeEffect(context, attrs) : new EdgeEffect(context);"
+ errorLine2=" ~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/views/SpringRelativeLayout.java"
+ line="49"
+ column="19"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 26): `new android.widget.EdgeEffect`"
+ errorLine1=" ? new EdgeEffect(context, attrs) : new EdgeEffect(context);"
+ errorLine2=" ~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/views/SpringRelativeLayout.java"
+ line="51"
+ column="19"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 29 (current min is 26): `android.view.WindowInsets#getTappableElementInsets`"
+ errorLine1=" return windowInsets.getTappableElementInsets().bottom > 0;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/graphics/SysUiScrim.java"
+ line="190"
+ column="33"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 29 (current min is 26): `android.graphics.Insets#bottom`"
+ errorLine1=" return windowInsets.getTappableElementInsets().bottom > 0;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/graphics/SysUiScrim.java"
+ line="190"
+ column="20"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 28 (current min is 26): `android.appwidget.AppWidgetProviderInfo#widgetFeatures`"
+ errorLine1=" int featureFlags = mProviderInfo.widgetFeatures;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/WidgetAddFlowHandler.java"
+ line="93"
+ column="28"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level 31 (current min is 26): `android.appwidget.AppWidgetProviderInfo#loadDescription`"
+ errorLine1=" CharSequence description = mItem.widgetInfo.loadDescription(getContext());"
+ errorLine2=" ~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/WidgetCell.java"
+ line="193"
+ column="57"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 26): `android.appwidget.AppWidgetProviderInfo#previewLayout`"
+ errorLine1=" && item.widgetInfo.previewLayout != Resources.ID_NULL) {"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/WidgetCell.java"
+ line="214"
+ column="20"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Field requires API level 31 (current min is 26): `android.appwidget.AppWidgetProviderInfo#previewLayout`"
+ errorLine1=" launcherAppWidgetProviderInfo.initialLayout = item.widgetInfo.previewLayout;"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/WidgetCell.java"
+ line="222"
+ column="59"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `android.view.View#getWindowInsetsController`"
+ errorLine1=" getWindowInsetsController().hide(WindowInsets.Type.ime());"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java"
+ line="558"
+ column="9"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `android.view.WindowInsets.Type#ime`"
+ errorLine1=" getWindowInsetsController().hide(WindowInsets.Type.ime());"
+ errorLine2=" ~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java"
+ line="558"
+ column="60"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `android.view.WindowInsetsController#hide`"
+ errorLine1=" getWindowInsetsController().hide(WindowInsets.Type.ime());"
+ errorLine2=" ~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java"
+ line="558"
+ column="37"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Call requires API level R (current min is 26): `java.util.List#of`"
+ errorLine1=" return new RecommendationTableData(List.of(), previewScale);"
+ errorLine2=" ~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java"
+ line="139"
+ column="53"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="Method reference requires API level 28 (current min is 26): `Person::getKey`"
+ errorLine1=" : Arrays.stream(persons).map(Person::getKey).sorted().toArray(String[]::new);"
+ errorLine2=" ~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/src/com/android/launcher3/model/data/WorkspaceItemInfo.java"
+ line="178"
+ column="42"/>
+ </issue>
+
+</issues>
diff --git a/lint-baseline-res-lib.xml b/lint-baseline-res-lib.xml
new file mode 100644
index 0000000..e52f8fb
--- /dev/null
+++ b/lint-baseline-res-lib.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<issues format="5" by="lint 4.1.0" client="cli" variant="all" version="4.1.0">
+
+ <issue
+ id="NewApi"
+ message="`?android:attr/dialogCornerRadius` requires API level 28 (current min is 26)"
+ errorLine1=" android:topLeftRadius="?android:attr/dialogCornerRadius""
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/res/drawable/add_item_dialog_background.xml"
+ line="6"
+ column="9"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="`?android:attr/dialogCornerRadius` requires API level 28 (current min is 26)"
+ errorLine1=" android:topRightRadius="?android:attr/dialogCornerRadius" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/res/drawable/add_item_dialog_background.xml"
+ line="7"
+ column="9"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="`@android:style/Widget.DeviceDefault.Button.Colored` requires API level 28 (current min is 26)"
+ errorLine1=" <style name="Widget.DeviceDefault.Button.Rounded.Colored" parent="@android:style/Widget.DeviceDefault.Button.Colored">"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/res/values/styles.xml"
+ line="287"
+ column="63"/>
+ </issue>
+
+ <issue
+ id="NewApi"
+ message="`@android:dimen/system_app_widget_background_radius` requires API level 31 (current min is 26)"
+ errorLine1=" <corners android:radius="@android:dimen/system_app_widget_background_radius" />"
+ errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
+ <location
+ file="packages/apps/Launcher3/res/drawable/widget_resize_frame.xml"
+ line="20"
+ column="14"/>
+ </issue>
+
+</issues>
diff --git a/quickstep/src/com/android/quickstep/FallbackActivityInterface.java b/quickstep/src/com/android/quickstep/FallbackActivityInterface.java
index e13d1a4..8168e88 100644
--- a/quickstep/src/com/android/quickstep/FallbackActivityInterface.java
+++ b/quickstep/src/com/android/quickstep/FallbackActivityInterface.java
@@ -27,6 +27,7 @@
import androidx.annotation.Nullable;
import com.android.launcher3.DeviceProfile;
+import com.android.launcher3.statemanager.StateManager;
import com.android.launcher3.touch.PagedOrientationHandler;
import com.android.quickstep.fallback.RecentsState;
import com.android.quickstep.util.ActivityInitListener;
@@ -139,7 +140,25 @@
@Override
public void onExitOverview(RotationTouchHelper deviceState, Runnable exitRunnable) {
- // no-op, fake landscape not supported for 3P
+ final StateManager<RecentsState> stateManager = getCreatedActivity().getStateManager();
+ if (stateManager.getState() == HOME) {
+ exitRunnable.run();
+ notifyRecentsOfOrientation(deviceState);
+ return;
+ }
+
+ stateManager.addStateListener(
+ new StateManager.StateListener<RecentsState>() {
+ @Override
+ public void onStateTransitionComplete(RecentsState toState) {
+ // Are we going from Recents to Workspace?
+ if (toState == HOME) {
+ exitRunnable.run();
+ notifyRecentsOfOrientation(deviceState);
+ stateManager.removeStateListener(this);
+ }
+ }
+ });
}
@Override
diff --git a/res/layout/widgets_list_row_header.xml b/res/layout/widgets_list_row_header.xml
index 598041c..8259c16 100644
--- a/res/layout/widgets_list_row_header.xml
+++ b/res/layout/widgets_list_row_header.xml
@@ -15,6 +15,7 @@
-->
<com.android.launcher3.widget.picker.WidgetsListHeader xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
+ xmlns:launcher="http://schemas.android.com/apk/res-auto"
android:id="@+id/widgets_list_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -22,7 +23,8 @@
android:background="@drawable/widgets_list_middle_ripple"
android:layout_marginBottom="@dimen/widget_list_entry_bottom_margin"
android:paddingVertical="@dimen/widget_list_header_view_vertical_padding"
- android:orientation="horizontal">
+ android:orientation="horizontal"
+ launcher:appIconSize="48dp">
<ImageView
android:id="@+id/app_icon"
diff --git a/res/xml/launcher_preferences.xml b/res/xml/launcher_preferences.xml
index e4bea50..8195cc1 100644
--- a/res/xml/launcher_preferences.xml
+++ b/res/xml/launcher_preferences.xml
@@ -22,14 +22,7 @@
android:key="pref_icon_badging"
android:title="@string/notification_dots_title"
android:persistent="false"
- android:widgetLayout="@layout/notification_pref_warning" >
- <intent android:action="android.settings.NOTIFICATION_SETTINGS">
- <!-- This extra highlights the "Allow notification dots" field in Notification settings -->
- <extra
- android:name=":settings:fragment_args_key"
- android:value="notification_badging" />
- </intent>
- </com.android.launcher3.settings.NotificationDotsPreference>
+ android:widgetLayout="@layout/notification_pref_warning" />
<!--
LAUNCHER_ADD_NEW_APPS_TO_HOME_SCREEN_ENABLED(613)
diff --git a/src/com/android/launcher3/settings/NotificationDotsPreference.java b/src/com/android/launcher3/settings/NotificationDotsPreference.java
index afcf882..0ee2744 100644
--- a/src/com/android/launcher3/settings/NotificationDotsPreference.java
+++ b/src/com/android/launcher3/settings/NotificationDotsPreference.java
@@ -85,6 +85,12 @@
Settings.Secure.getUriFor(NOTIFICATION_ENABLED_LISTENERS),
false, mListenerListObserver);
updateUI();
+
+ // Update intent
+ Bundle extras = new Bundle();
+ extras.putString(EXTRA_FRAGMENT_ARG_KEY, "notification_badging");
+ setIntent(new Intent("android.settings.NOTIFICATION_SETTINGS")
+ .putExtra(EXTRA_SHOW_FRAGMENT_ARGS, extras));
}
private void updateUI() {
diff --git a/src/com/android/launcher3/settings/PreferenceHighlighter.java b/src/com/android/launcher3/settings/PreferenceHighlighter.java
index 8ba8146..96ee216 100644
--- a/src/com/android/launcher3/settings/PreferenceHighlighter.java
+++ b/src/com/android/launcher3/settings/PreferenceHighlighter.java
@@ -24,16 +24,18 @@
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
+import android.graphics.RectF;
import android.util.Property;
import android.view.View;
-import com.android.launcher3.util.Themes;
-
+import androidx.preference.Preference;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView.ItemDecoration;
import androidx.recyclerview.widget.RecyclerView.State;
import androidx.recyclerview.widget.RecyclerView.ViewHolder;
+import com.android.launcher3.util.Themes;
+
/**
* Utility class for highlighting a preference
*/
@@ -62,14 +64,16 @@
private final Paint mPaint = new Paint();
private final RecyclerView mRv;
private final int mIndex;
+ private final Preference mPreference;
+ private final RectF mDrawRect = new RectF();
private boolean mHighLightStarted = false;
private int mHighlightColor = END_COLOR;
-
- public PreferenceHighlighter(RecyclerView rv, int index) {
+ public PreferenceHighlighter(RecyclerView rv, int index, Preference preference) {
mRv = rv;
mIndex = index;
+ mPreference = preference;
}
@Override
@@ -92,7 +96,8 @@
if (!mHighLightStarted) {
// Start highlight
int colorTo = setColorAlphaBound(Themes.getColorAccent(mRv.getContext()), 66);
- ObjectAnimator anim = ObjectAnimator.ofArgb(this, HIGHLIGHT_COLOR, END_COLOR, colorTo);
+ ObjectAnimator anim = ObjectAnimator.ofArgb(this, HIGHLIGHT_COLOR, END_COLOR,
+ colorTo);
anim.setDuration(HIGHLIGHT_FADE_IN_DURATION);
anim.setRepeatMode(ValueAnimator.REVERSE);
anim.setRepeatCount(4);
@@ -108,7 +113,11 @@
View view = holder.itemView;
mPaint.setColor(mHighlightColor);
- c.drawRect(0, view.getY(), parent.getWidth(), view.getY() + view.getHeight(), mPaint);
+ mDrawRect.set(0, view.getY(), parent.getWidth(), view.getY() + view.getHeight());
+ if (mPreference instanceof HighlightDelegate) {
+ ((HighlightDelegate) mPreference).offsetHighlight(view, mDrawRect);
+ }
+ c.drawRect(mDrawRect, mPaint);
}
private void removeHighlight() {
@@ -124,4 +133,16 @@
});
anim.start();
}
+
+ /**
+ * Interface to be implemented by a preference to customize the highlight are
+ */
+ public interface HighlightDelegate {
+
+ /**
+ * Allows the preference to update the highlight area
+ */
+ void offsetHighlight(View prefView, RectF bounds);
+
+ }
}
diff --git a/src/com/android/launcher3/settings/SettingsActivity.java b/src/com/android/launcher3/settings/SettingsActivity.java
index 5b42ac7..216510b 100644
--- a/src/com/android/launcher3/settings/SettingsActivity.java
+++ b/src/com/android/launcher3/settings/SettingsActivity.java
@@ -237,7 +237,9 @@
RecyclerView list = getListView();
PreferencePositionCallback callback = (PreferencePositionCallback) list.getAdapter();
int position = callback.getPreferenceAdapterPosition(mHighLightKey);
- return position >= 0 ? new PreferenceHighlighter(list, position) : null;
+ return position >= 0 ? new PreferenceHighlighter(
+ list, position, screen.findPreference(mHighLightKey))
+ : null;
}
private void requestAccessibilityFocus(@NonNull final RecyclerView rv) {
diff --git a/src/com/android/launcher3/shortcuts/DeepShortcutView.java b/src/com/android/launcher3/shortcuts/DeepShortcutView.java
index 1c1418c..cc658c9 100644
--- a/src/com/android/launcher3/shortcuts/DeepShortcutView.java
+++ b/src/com/android/launcher3/shortcuts/DeepShortcutView.java
@@ -30,12 +30,13 @@
import com.android.launcher3.Utilities;
import com.android.launcher3.model.data.WorkspaceItemInfo;
import com.android.launcher3.popup.PopupContainerWithArrow;
+import com.android.launcher3.views.BubbleTextHolder;
/**
* A {@link android.widget.FrameLayout} that contains a {@link DeepShortcutView}.
* This lets us animate the DeepShortcutView (icon and text) separately from the background.
*/
-public class DeepShortcutView extends FrameLayout {
+public class DeepShortcutView extends FrameLayout implements BubbleTextHolder {
private static final Point sTempPoint = new Point();
@@ -64,6 +65,7 @@
mIconView = findViewById(R.id.icon);
}
+ @Override
public BubbleTextView getBubbleText() {
return mBubbleText;
}
diff --git a/src/com/android/launcher3/views/BubbleTextHolder.java b/src/com/android/launcher3/views/BubbleTextHolder.java
new file mode 100644
index 0000000..47d3563
--- /dev/null
+++ b/src/com/android/launcher3/views/BubbleTextHolder.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2021 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.android.launcher3.views;
+
+import com.android.launcher3.BubbleTextView;
+
+/**
+ * Views that contain {@link BubbleTextView} should implement this interface.
+ */
+public interface BubbleTextHolder {
+ BubbleTextView getBubbleText();
+}
diff --git a/src/com/android/launcher3/views/FloatingIconView.java b/src/com/android/launcher3/views/FloatingIconView.java
index 23c3722..96268ce 100644
--- a/src/com/android/launcher3/views/FloatingIconView.java
+++ b/src/com/android/launcher3/views/FloatingIconView.java
@@ -210,8 +210,8 @@
public static void getLocationBoundsForView(Launcher launcher, View v, boolean isOpening,
RectF outRect, Rect outViewBounds) {
boolean ignoreTransform = !isOpening;
- if (v instanceof DeepShortcutView) {
- v = ((DeepShortcutView) v).getBubbleText();
+ if (v instanceof BubbleTextHolder) {
+ v = ((BubbleTextHolder) v).getBubbleText();
ignoreTransform = false;
} else if (v.getParent() instanceof DeepShortcutView) {
v = ((DeepShortcutView) v.getParent()).getIconView();
diff --git a/src/com/android/launcher3/widget/picker/WidgetsListHeader.java b/src/com/android/launcher3/widget/picker/WidgetsListHeader.java
index 497c72e..8794a4a 100644
--- a/src/com/android/launcher3/widget/picker/WidgetsListHeader.java
+++ b/src/com/android/launcher3/widget/picker/WidgetsListHeader.java
@@ -156,6 +156,11 @@
private void applyDrawables(Drawable icon) {
icon.setBounds(0, 0, mIconSize, mIconSize);
+ LinearLayout.LayoutParams layoutParams =
+ (LinearLayout.LayoutParams) mAppIcon.getLayoutParams();
+ layoutParams.width = mIconSize;
+ layoutParams.height = mIconSize;
+ mAppIcon.setLayoutParams(layoutParams);
mAppIcon.setImageDrawable(icon);
// If the current icon is a placeholder color, animate its update.