From 025e2d82dda54af7f33a0d511bde47ec835593b1 Mon Sep 17 00:00:00 2001 From: Emmanuel Garcia Date: Fri, 13 Mar 2020 21:19:24 -0700 Subject: [PATCH] Migrate embedding to AndroidX (#17075) --- DEPS | 15 +- ci/licenses_golden/licenses_fuchsia | 290 +++++++++--------- ci/licenses_golden/tool_signature | 2 +- shell/platform/android/BUILD.gn | 52 ++-- .../android/embedding_bundle/.gitignore | 3 + .../android/embedding_bundle/build.gradle | 22 +- shell/platform/android/io/flutter/Log.java | 2 +- .../io/flutter/app/FlutterActivity.java | 2 +- .../io/flutter/app/FlutterApplication.java | 2 +- .../flutter/app/FlutterFragmentActivity.java | 4 +- .../android/AndroidKeyProcessor.java | 4 +- .../android/AndroidTouchProcessor.java | 4 +- .../android/DrawableSplashScreen.java | 4 +- .../embedding/android/FlutterActivity.java | 12 +- .../FlutterActivityAndFragmentDelegate.java | 8 +- .../android/FlutterEngineConfigurator.java | 6 +- .../android/FlutterEngineProvider.java | 4 +- .../embedding/android/FlutterFragment.java | 12 +- .../android/FlutterFragmentActivity.java | 8 +- .../embedding/android/FlutterSplashView.java | 6 +- .../embedding/android/FlutterSurfaceView.java | 4 +- .../embedding/android/FlutterTextureView.java | 4 +- .../embedding/android/FlutterView.java | 8 +- .../embedding/android/SplashScreen.java | 4 +- .../android/SplashScreenProvider.java | 2 +- .../embedding/engine/FlutterEngine.java | 4 +- .../embedding/engine/FlutterEngineCache.java | 6 +- .../engine/FlutterEnginePluginRegistry.java | 6 +- .../flutter/embedding/engine/FlutterJNI.java | 10 +- .../embedding/engine/FlutterShellArgs.java | 2 +- .../embedding/engine/dart/DartExecutor.java | 6 +- .../embedding/engine/dart/DartMessenger.java | 6 +- .../engine/dart/PlatformMessageHandler.java | 4 +- .../engine/loader/FlutterLoader.java | 4 +- .../engine/loader/ResourceExtractor.java | 4 +- .../engine/plugins/FlutterPlugin.java | 4 +- .../engine/plugins/PluginRegistry.java | 4 +- .../plugins/activity/ActivityAware.java | 2 +- .../activity/ActivityControlSurface.java | 6 +- .../activity/ActivityPluginBinding.java | 4 +- .../BroadcastReceiverAware.java | 2 +- .../BroadcastReceiverControlSurface.java | 4 +- .../BroadcastReceiverPluginBinding.java | 2 +- .../contentprovider/ContentProviderAware.java | 2 +- .../ContentProviderControlSurface.java | 4 +- .../ContentProviderPluginBinding.java | 2 +- .../lifecycle/HiddenLifecycleReference.java | 6 +- .../engine/plugins/service/ServiceAware.java | 2 +- .../service/ServiceControlSurface.java | 6 +- .../plugins/service/ServicePluginBinding.java | 4 +- .../plugins/shim/ShimPluginRegistry.java | 18 +- .../engine/plugins/shim/ShimRegistrar.java | 2 +- .../engine/renderer/FlutterRenderer.java | 4 +- .../engine/renderer/RenderSurface.java | 4 +- .../systemchannels/AccessibilityChannel.java | 4 +- .../systemchannels/KeyEventChannel.java | 4 +- .../systemchannels/LifecycleChannel.java | 2 +- .../systemchannels/LocalizationChannel.java | 2 +- .../systemchannels/NavigationChannel.java | 4 +- .../systemchannels/PlatformChannel.java | 6 +- .../systemchannels/PlatformViewsChannel.java | 4 +- .../systemchannels/SettingsChannel.java | 2 +- .../engine/systemchannels/SystemChannel.java | 2 +- .../systemchannels/TextInputChannel.java | 4 +- .../plugin/common/BasicMessageChannel.java | 6 +- .../plugin/common/BinaryMessenger.java | 6 +- .../flutter/plugin/common/ErrorLogResult.java | 2 +- .../flutter/plugin/common/EventChannel.java | 2 +- .../flutter/plugin/common/MessageCodec.java | 2 +- .../io/flutter/plugin/common/MethodCall.java | 2 +- .../flutter/plugin/common/MethodChannel.java | 6 +- .../flutter/plugin/common/PluginRegistry.java | 2 +- .../plugin/editing/TextInputPlugin.java | 6 +- .../platform/AccessibilityEventsDelegate.java | 4 +- .../plugin/platform/PlatformPlugin.java | 6 +- .../flutter/plugin/platform/PlatformView.java | 2 +- .../platform/PlatformViewsController.java | 6 +- .../platform/SingleViewPresentation.java | 6 +- .../platform/VirtualDisplayController.java | 2 +- .../io/flutter/view/AccessibilityBridge.java | 6 +- .../view/AccessibilityViewEmbedder.java | 6 +- .../view/FlutterCallbackInformation.java | 4 +- .../android/io/flutter/view/FlutterMain.java | 6 +- .../io/flutter/view/FlutterNativeView.java | 4 +- .../android/io/flutter/view/FlutterView.java | 6 +- .../android/io/flutter/view/VsyncWaiter.java | 2 +- ...lutterActivityAndFragmentDelegateTest.java | 4 +- .../android/FlutterActivityTest.java | 4 +- .../android/FlutterAndroidComponentTest.java | 6 +- .../FlutterEnginePluginRegistryTest.java | 2 +- .../embedding/engine/PluginComponentTest.java | 2 +- .../editing/InputConnectionAdaptorTest.java | 15 +- .../plugins/GeneratedPluginRegistrant.java | 2 +- testing/run_tests.py | 6 +- testing/scenario_app/android/app/build.gradle | 16 +- .../scenarios/EngineLaunchE2ETest.java | 6 +- .../scenarios/ExampleInstrumentedTest.java | 4 +- .../dev/flutter/scenarios/BlankActivity.java | 2 +- .../scenarios/TextPlatformViewActivity.java | 2 +- .../scenarios/TextPlatformViewFactory.java | 2 +- .../download_android_support.py | 55 ---- tools/android_support/files.json | 65 ---- tools/androidx/files.json | 53 ++++ .../generate_pom_file.py | 0 tools/gen_javadoc.py | 9 +- tools/licenses/lib/main.dart | 4 +- 106 files changed, 454 insertions(+), 551 deletions(-) create mode 100644 shell/platform/android/embedding_bundle/.gitignore delete mode 100644 tools/android_support/download_android_support.py delete mode 100644 tools/android_support/files.json create mode 100644 tools/androidx/files.json rename tools/{android_support => androidx}/generate_pom_file.py (100%) diff --git a/DEPS b/DEPS index 4e409a0cf54a5..92e3f4f7dfb4e 100644 --- a/DEPS +++ b/DEPS @@ -497,11 +497,11 @@ deps = { 'dep_type': 'cipd', }, - 'src/third_party/robolectric': { + 'src/third_party/android_embedding_dependencies': { 'packages': [ { - 'package': 'flutter/android/robolectric_bundle', - 'version': 'last_updated:2019-09-09T16:47:38-0700' + 'package': 'flutter/android/embedding_bundle', + 'version': 'last_updated:2020-03-13T15:42:26-0700' } ], 'condition': 'download_android_deps', @@ -593,15 +593,6 @@ hooks = [ 'pattern': '.', 'action': ['python', 'src/build/vs_toolchain.py', 'update'], }, - { - 'name': 'download_android_support', - 'pattern': '.', - 'condition': 'download_android_deps', - 'action': [ - 'python', - 'src/flutter/tools/android_support/download_android_support.py', - ], - }, { 'name': 'generate_package_files', 'pattern': '.', diff --git a/ci/licenses_golden/licenses_fuchsia b/ci/licenses_golden/licenses_fuchsia index 1505d52a98e43..336439ae8a093 100644 --- a/ci/licenses_golden/licenses_fuchsia +++ b/ci/licenses_golden/licenses_fuchsia @@ -3086,6 +3086,151 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==================================================================================================== +==================================================================================================== +LIBRARY: fuchsia_sdk +ORIGIN: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/boot/netboot.h + ../../../fuchsia/sdk/linux/LICENSE +TYPE: LicenseType.bsd +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/assert.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/boot/netboot.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/compiler.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/driver/binding.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/errors.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/i2c.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/usb.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/usb/audio.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/usb/hid.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/usb/hub.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/usb/ums.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/listnode.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/pixelformat.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/processargs.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/status.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/debug.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/exception.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/log.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/object.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/pci.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/port.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/profile.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/resource.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/types.h +FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/types.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/assert.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/boot/netboot.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/compiler.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/driver/binding.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/errors.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/i2c.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/usb.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/usb/audio.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/usb/hid.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/usb/hub.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/usb/ums.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/listnode.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/pixelformat.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/processargs.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/status.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/debug.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/exception.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/log.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/object.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/pci.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/port.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/profile.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/resource.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/types.h +FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/types.h +FILE: ../../../fuchsia/sdk/linux/dart/fidl/lib/src/interface.dart +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.component.runner/component_runner.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.fonts/font_provider.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.math/math.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.media.playback/problem.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.media.playback/seeking_reader.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.media/audio.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/basemgr/base_shell.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/basemgr/user_provider.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/module/module_context.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/module/module_controller.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/session/focus.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/session/session_shell.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/story/story_controller.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/story/story_info.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/story/story_provider.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.net.oldhttp/url_body.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/component_controller.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/environment.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/environment_controller.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/launcher.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/loader.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/runner.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.tracing.provider/provider.fidl +FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.ui.policy/presenter.fidl +FILE: ../../../fuchsia/sdk/linux/pkg/fdio/include/lib/fdio/fdio.h +FILE: ../../../fuchsia/sdk/linux/pkg/fdio/include/lib/fdio/io.h +FILE: ../../../fuchsia/sdk/linux/pkg/fdio/include/lib/fdio/vfs.h +FILE: ../../../fuchsia/sdk/linux/pkg/fdio/include/lib/fdio/watcher.h +FILE: ../../../fuchsia/sdk/linux/pkg/media_cpp_no_converters/include/lib/media/cpp/timeline_function.h +FILE: ../../../fuchsia/sdk/linux/pkg/media_cpp_no_converters/include/lib/media/cpp/timeline_rate.h +FILE: ../../../fuchsia/sdk/linux/pkg/media_cpp_no_converters/timeline_function.cc +FILE: ../../../fuchsia/sdk/linux/pkg/media_cpp_no_converters/timeline_rate.cc +FILE: ../../../fuchsia/sdk/linux/pkg/sync/include/lib/sync/completion.h +FILE: ../../../fuchsia/sdk/linux/pkg/sys_cpp/include/lib/sys/cpp/termination_reason.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/channel.cc +FILE: ../../../fuchsia/sdk/linux/pkg/zx/event.cc +FILE: ../../../fuchsia/sdk/linux/pkg/zx/eventpair.cc +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/channel.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/event.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/eventpair.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/job.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/object.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/object_traits.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/port.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/process.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/socket.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/task.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/thread.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/time.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/vmar.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/vmo.h +FILE: ../../../fuchsia/sdk/linux/pkg/zx/job.cc +FILE: ../../../fuchsia/sdk/linux/pkg/zx/port.cc +FILE: ../../../fuchsia/sdk/linux/pkg/zx/process.cc +FILE: ../../../fuchsia/sdk/linux/pkg/zx/socket.cc +FILE: ../../../fuchsia/sdk/linux/pkg/zx/thread.cc +FILE: ../../../fuchsia/sdk/linux/pkg/zx/vmar.cc +FILE: ../../../fuchsia/sdk/linux/pkg/zx/vmo.cc +---------------------------------------------------------------------------------------------------- +Copyright 2016 The Fuchsia Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +==================================================================================================== + ==================================================================================================== LIBRARY: fuchsia_sdk ORIGIN: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/string_view.h + ../../../fuchsia/sdk/linux/LICENSE @@ -3330,151 +3475,6 @@ distribution. contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -==================================================================================================== - -==================================================================================================== -LIBRARY: fuchsia_sdk -ORIGIN: ../../../third_party/tonic/LICENSE -TYPE: LicenseType.bsd -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/assert.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/boot/netboot.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/compiler.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/driver/binding.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/errors.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/i2c.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/usb.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/usb/audio.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/usb/hid.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/usb/hub.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/hw/usb/ums.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/listnode.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/pixelformat.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/processargs.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/status.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/debug.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/exception.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/log.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/object.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/pci.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/port.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/profile.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/resource.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/syscalls/types.h -FILE: ../../../fuchsia/sdk/linux/arch/arm64/sysroot/include/zircon/types.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/assert.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/boot/netboot.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/compiler.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/driver/binding.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/errors.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/i2c.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/usb.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/usb/audio.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/usb/hid.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/usb/hub.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/hw/usb/ums.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/listnode.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/pixelformat.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/processargs.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/status.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/debug.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/exception.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/log.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/object.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/pci.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/port.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/profile.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/resource.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/syscalls/types.h -FILE: ../../../fuchsia/sdk/linux/arch/x64/sysroot/include/zircon/types.h -FILE: ../../../fuchsia/sdk/linux/dart/fidl/lib/src/interface.dart -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.component.runner/component_runner.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.fonts/font_provider.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.math/math.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.media.playback/problem.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.media.playback/seeking_reader.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.media/audio.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/basemgr/base_shell.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/basemgr/user_provider.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/module/module_context.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/module/module_controller.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/session/focus.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/session/session_shell.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/story/story_controller.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/story/story_info.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.modular/story/story_provider.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.net.oldhttp/url_body.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/component_controller.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/environment.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/environment_controller.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/launcher.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/loader.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.sys/runner.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.tracing.provider/provider.fidl -FILE: ../../../fuchsia/sdk/linux/fidl/fuchsia.ui.policy/presenter.fidl -FILE: ../../../fuchsia/sdk/linux/pkg/fdio/include/lib/fdio/fdio.h -FILE: ../../../fuchsia/sdk/linux/pkg/fdio/include/lib/fdio/io.h -FILE: ../../../fuchsia/sdk/linux/pkg/fdio/include/lib/fdio/vfs.h -FILE: ../../../fuchsia/sdk/linux/pkg/fdio/include/lib/fdio/watcher.h -FILE: ../../../fuchsia/sdk/linux/pkg/media_cpp_no_converters/include/lib/media/cpp/timeline_function.h -FILE: ../../../fuchsia/sdk/linux/pkg/media_cpp_no_converters/include/lib/media/cpp/timeline_rate.h -FILE: ../../../fuchsia/sdk/linux/pkg/media_cpp_no_converters/timeline_function.cc -FILE: ../../../fuchsia/sdk/linux/pkg/media_cpp_no_converters/timeline_rate.cc -FILE: ../../../fuchsia/sdk/linux/pkg/sync/include/lib/sync/completion.h -FILE: ../../../fuchsia/sdk/linux/pkg/sys_cpp/include/lib/sys/cpp/termination_reason.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/channel.cc -FILE: ../../../fuchsia/sdk/linux/pkg/zx/event.cc -FILE: ../../../fuchsia/sdk/linux/pkg/zx/eventpair.cc -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/channel.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/event.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/eventpair.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/job.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/object.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/object_traits.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/port.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/process.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/socket.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/task.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/thread.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/time.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/vmar.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/include/lib/zx/vmo.h -FILE: ../../../fuchsia/sdk/linux/pkg/zx/job.cc -FILE: ../../../fuchsia/sdk/linux/pkg/zx/port.cc -FILE: ../../../fuchsia/sdk/linux/pkg/zx/process.cc -FILE: ../../../fuchsia/sdk/linux/pkg/zx/socket.cc -FILE: ../../../fuchsia/sdk/linux/pkg/zx/thread.cc -FILE: ../../../fuchsia/sdk/linux/pkg/zx/vmar.cc -FILE: ../../../fuchsia/sdk/linux/pkg/zx/vmo.cc ----------------------------------------------------------------------------------------------------- -Copyright 2016 The Fuchsia Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR diff --git a/ci/licenses_golden/tool_signature b/ci/licenses_golden/tool_signature index 732b5d9430cd7..287bc19a08133 100644 --- a/ci/licenses_golden/tool_signature +++ b/ci/licenses_golden/tool_signature @@ -1,2 +1,2 @@ -Signature: 9ad4afaa43bd81d0e6a011688ca40377 +Signature: c182c713338fa4bfd82bfab82778038b diff --git a/shell/platform/android/BUILD.gn b/shell/platform/android/BUILD.gn index e48562f1a2957..940801e7f3e03 100644 --- a/shell/platform/android/BUILD.gn +++ b/shell/platform/android/BUILD.gn @@ -228,15 +228,14 @@ android_java_sources = [ "io/flutter/view/VsyncWaiter.java", ] -android_support_jars = [ - "//third_party/android_support/android_support_compat.jar", - "//third_party/android_support/android_support_annotations.jar", - "//third_party/android_support/android_support_fragment.jar", - "//third_party/android_support/android_arch_lifecycle_common.jar", - "//third_party/android_support/android_arch_lifecycle_common_java8.jar", - "//third_party/android_support/android_arch_lifecycle_runtime.jar", - "//third_party/android_support/android_arch_lifecycle_viewmodel.jar", -] +list_script = rebase_path("//build/ls.py", ".", "//") +embedding_dependencies_jars = + exec_script(list_script, + [ + "--target-directory", + rebase_path("//third_party/android_embedding_dependencies"), + ], + "list lines") action("flutter_shell_java") { script = "//build/android/gyp/javac.py" @@ -256,10 +255,7 @@ action("flutter_shell_java") { source_jar_path, source_jar_path + ".md5.stamp", ] - inputs = [ - android_sdk_jar, - ] - inputs += android_support_jars + inputs = [ android_sdk_jar ] + embedding_dependencies_jars _rebased_current_path = rebase_path(".") _rebased_jar_path = rebase_path(jar_path, root_build_dir) @@ -267,7 +263,7 @@ action("flutter_shell_java") { _rebased_depfile = rebase_path(depfile, root_build_dir) _rebased_android_sdk_jar = rebase_path(android_sdk_jar, root_build_dir) _rebased_classpath = [ _rebased_android_sdk_jar ] + - rebase_path(android_support_jars, root_build_dir) + rebase_path(embedding_dependencies_jars, root_build_dir) args = [ "--depfile=$_rebased_depfile", @@ -357,10 +353,10 @@ action("android_jar") { } action("pom_libflutter") { - script = "//flutter/tools/android_support/generate_pom_file.py" + script = "//flutter/tools/androidx/generate_pom_file.py" inputs = [ - "//flutter/tools/android_support/files.json", + "//flutter/tools/androidx/files.json", ] artifact_id = @@ -381,10 +377,10 @@ action("pom_libflutter") { } action("pom_embedding") { - script = "//flutter/tools/android_support/generate_pom_file.py" + script = "//flutter/tools/androidx/generate_pom_file.py" inputs = [ - "//flutter/tools/android_support/files.json", + "//flutter/tools/androidx/files.json", ] artifact_id = "flutter_embedding_$flutter_runtime_mode" @@ -451,21 +447,9 @@ action("robolectric_tests") { ] _jar_dependencies = [ - android_sdk_jar, - embedding_jar_path, - "//third_party/robolectric/lib/junit-3.8.jar", - "//third_party/robolectric/lib/junit-4.13-beta-3.jar", - "//third_party/robolectric/lib/robolectric-3.8.jar", - "//third_party/robolectric/lib/shadows-framework-3.8.jar", - "//third_party/robolectric/lib/annotations-3.8.jar", - "//third_party/robolectric/lib/shadowapi-3.8.jar", - "//third_party/robolectric/lib/runtime-1.1.1.jar", - "//third_party/robolectric/lib/common-1.1.1.jar", - "//third_party/robolectric/lib/common-java8-1.1.1.jar", - "//third_party/robolectric/lib/support-annotations-28.0.0.jar", - "//third_party/robolectric/lib/support-fragment-25.2.0.jar", - "//third_party/robolectric/lib/mockito-all-1.10.19.jar", - ] + android_sdk_jar, + embedding_jar_path, + ] + embedding_dependencies_jars inputs = _jar_dependencies @@ -532,7 +516,7 @@ zip_bundle("android") { # https://github.com/flutter/flutter/issues/42400 action("gen_android_javadoc") { script = "//flutter/tools/gen_javadoc.py" - sources = android_java_sources + android_support_jars + sources = android_java_sources + embedding_dependencies_jars outputs = [ "$target_gen_dir/javadocs", diff --git a/shell/platform/android/embedding_bundle/.gitignore b/shell/platform/android/embedding_bundle/.gitignore new file mode 100644 index 0000000000000..690c5aed9ff0b --- /dev/null +++ b/shell/platform/android/embedding_bundle/.gitignore @@ -0,0 +1,3 @@ +# Don't include the jars in the engine repo. +lib/ +.gradle diff --git a/shell/platform/android/embedding_bundle/build.gradle b/shell/platform/android/embedding_bundle/build.gradle index 073937ddc3c40..418eac07c5d0c 100644 --- a/shell/platform/android/embedding_bundle/build.gradle +++ b/shell/platform/android/embedding_bundle/build.gradle @@ -44,27 +44,23 @@ android { embedding "androidx.fragment:fragment:1.1.0" def lifecycle_version = "2.2.0" - embedding "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version" - embedding "androidx.lifecycle:lifecycle-livedata:$lifecycle_version" embedding "androidx.lifecycle:lifecycle-runtime:$lifecycle_version" - embedding "androidx.lifecycle:lifecycle-viewmodel-savedstate:$lifecycle_version" - embedding "androidx.lifecycle:lifecycle-compiler:$lifecycle_version" + embedding "androidx.lifecycle:lifecycle-common:$lifecycle_version" embedding "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version" - embedding "androidx.lifecycle:lifecycle-service:$lifecycle_version" - embedding "androidx.lifecycle:lifecycle-process:$lifecycle_version" - embedding "androidx.lifecycle:lifecycle-reactivestreams:$lifecycle_version" // Testing - embeddingTesting "androidx.arch.core:core-testing:2.1.0" embeddingTesting "org.robolectric:android-all:8.1.0-robolectric-4611349" // This is required by the robolectric test. embeddingTesting_duplicated "org.robolectric:android-all:4.1.2_r1-robolectric-r1" - embeddingTesting "org.robolectric:robolectric:3.8" - embeddingTesting "org.robolectric:junit:3.8" - embeddingTesting "org.robolectric:shadows-framework:3.8" - embeddingTesting "org.robolectric:resources:3.8" embeddingTesting "org.mockito:mockito-all:1.10.19" - embeddingTesting "junit:junit:4.13-beta-3" + embeddingTesting ("org.robolectric:robolectric:4.3") { + // org.hamcrest is added by org.mockito:mockito-all + exclude group: "org.hamcrest", module:"hamcrest-core" + } + embeddingTesting ("junit:junit:4.13") { + // org.hamcrest is added by org.mockito:mockito-all + exclude group: "org.hamcrest", module:"hamcrest-core" + } } } diff --git a/shell/platform/android/io/flutter/Log.java b/shell/platform/android/io/flutter/Log.java index fbc2ec6289838..2fb8d029e79a5 100644 --- a/shell/platform/android/io/flutter/Log.java +++ b/shell/platform/android/io/flutter/Log.java @@ -4,7 +4,7 @@ package io.flutter; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; /** * Port of {@link android.util.Log} that only logs in {@link io.flutter.BuildConfig#DEBUG} mode and diff --git a/shell/platform/android/io/flutter/app/FlutterActivity.java b/shell/platform/android/io/flutter/app/FlutterActivity.java index 816b0c13e3684..be689873684a1 100644 --- a/shell/platform/android/io/flutter/app/FlutterActivity.java +++ b/shell/platform/android/io/flutter/app/FlutterActivity.java @@ -9,7 +9,7 @@ import android.content.Intent; import android.content.res.Configuration; import android.os.Bundle; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.flutter.app.FlutterActivityDelegate.ViewFactory; import io.flutter.plugin.common.PluginRegistry; import io.flutter.view.FlutterNativeView; diff --git a/shell/platform/android/io/flutter/app/FlutterApplication.java b/shell/platform/android/io/flutter/app/FlutterApplication.java index 1dc11e868c8d3..cd55217176ef7 100644 --- a/shell/platform/android/io/flutter/app/FlutterApplication.java +++ b/shell/platform/android/io/flutter/app/FlutterApplication.java @@ -6,7 +6,7 @@ import android.app.Activity; import android.app.Application; -import android.support.annotation.CallSuper; +import androidx.annotation.CallSuper; import io.flutter.view.FlutterMain; /** diff --git a/shell/platform/android/io/flutter/app/FlutterFragmentActivity.java b/shell/platform/android/io/flutter/app/FlutterFragmentActivity.java index 632348b5264e9..2e881b6148673 100644 --- a/shell/platform/android/io/flutter/app/FlutterFragmentActivity.java +++ b/shell/platform/android/io/flutter/app/FlutterFragmentActivity.java @@ -8,7 +8,7 @@ import android.content.Intent; import android.content.res.Configuration; import android.os.Bundle; -import android.support.v4.app.FragmentActivity; +import androidx.fragment.app.FragmentActivity; import io.flutter.app.FlutterActivityDelegate.ViewFactory; import io.flutter.plugin.common.PluginRegistry; import io.flutter.view.FlutterNativeView; @@ -25,7 +25,7 @@ * app to ensure that {@link FragmentActivity} is available at runtime. * * @see https://developer.android.com/topic/libraries/support-library/setup.html + * href="https://developer.android.com/training/testing/set-up-project">https://developer.android.com/training/testing/set-up-project */ public class FlutterFragmentActivity extends FragmentActivity implements FlutterView.Provider, PluginRegistry, ViewFactory { diff --git a/shell/platform/android/io/flutter/embedding/android/AndroidKeyProcessor.java b/shell/platform/android/io/flutter/embedding/android/AndroidKeyProcessor.java index 2e778ad0e9300..5d823ef8ab674 100644 --- a/shell/platform/android/io/flutter/embedding/android/AndroidKeyProcessor.java +++ b/shell/platform/android/io/flutter/embedding/android/AndroidKeyProcessor.java @@ -4,10 +4,10 @@ package io.flutter.embedding.android; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.KeyCharacterMap; import android.view.KeyEvent; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.embedding.engine.systemchannels.KeyEventChannel; import io.flutter.plugin.editing.TextInputPlugin; diff --git a/shell/platform/android/io/flutter/embedding/android/AndroidTouchProcessor.java b/shell/platform/android/io/flutter/embedding/android/AndroidTouchProcessor.java index 2c04f366fd491..027b13c53d274 100644 --- a/shell/platform/android/io/flutter/embedding/android/AndroidTouchProcessor.java +++ b/shell/platform/android/io/flutter/embedding/android/AndroidTouchProcessor.java @@ -1,10 +1,10 @@ package io.flutter.embedding.android; import android.os.Build; -import android.support.annotation.IntDef; -import android.support.annotation.NonNull; import android.view.InputDevice; import android.view.MotionEvent; +import androidx.annotation.IntDef; +import androidx.annotation.NonNull; import io.flutter.embedding.engine.renderer.FlutterRenderer; import java.nio.ByteBuffer; import java.nio.ByteOrder; diff --git a/shell/platform/android/io/flutter/embedding/android/DrawableSplashScreen.java b/shell/platform/android/io/flutter/embedding/android/DrawableSplashScreen.java index 43638508203a1..260c1621c5279 100644 --- a/shell/platform/android/io/flutter/embedding/android/DrawableSplashScreen.java +++ b/shell/platform/android/io/flutter/embedding/android/DrawableSplashScreen.java @@ -8,11 +8,11 @@ import android.content.Context; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.AttributeSet; import android.view.View; import android.widget.ImageView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; /** * {@link SplashScreen} that displays a given {@link Drawable}, which then fades its alpha to zero diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java b/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java index cb88fa4430e25..07089613f0dd1 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterActivity.java @@ -17,9 +17,6 @@ import static io.flutter.embedding.android.FlutterActivityLaunchConfigs.SPLASH_SCREEN_META_DATA_KEY; import android.app.Activity; -import android.arch.lifecycle.Lifecycle; -import android.arch.lifecycle.LifecycleOwner; -import android.arch.lifecycle.LifecycleRegistry; import android.content.Context; import android.content.Intent; import android.content.pm.ActivityInfo; @@ -30,12 +27,15 @@ import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; import android.view.View; import android.view.Window; import android.view.WindowManager; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; +import androidx.lifecycle.Lifecycle; +import androidx.lifecycle.LifecycleOwner; +import androidx.lifecycle.LifecycleRegistry; import io.flutter.Log; import io.flutter.embedding.android.FlutterActivityLaunchConfigs.BackgroundMode; import io.flutter.embedding.engine.FlutterEngine; diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java b/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java index 0ca628ba37866..93ff3e7165e0c 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java @@ -7,17 +7,17 @@ import static android.content.ComponentCallbacks2.TRIM_MEMORY_RUNNING_LOW; import android.app.Activity; -import android.arch.lifecycle.Lifecycle; import android.content.Context; import android.content.Intent; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; +import androidx.lifecycle.Lifecycle; import io.flutter.Log; import io.flutter.app.FlutterActivity; import io.flutter.embedding.engine.FlutterEngine; diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterEngineConfigurator.java b/shell/platform/android/io/flutter/embedding/android/FlutterEngineConfigurator.java index 05abf1e15ff05..227770d4b0bd6 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterEngineConfigurator.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterEngineConfigurator.java @@ -5,14 +5,14 @@ package io.flutter.embedding.android; import android.app.Activity; -import android.arch.lifecycle.Lifecycle; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; +import androidx.lifecycle.Lifecycle; import io.flutter.embedding.engine.FlutterEngine; /** * Configures a {@link FlutterEngine} after it is created, e.g., adds plugins. * - *

This interface may be applied to a {@link android.support.v4.app.FragmentActivity} that owns a + *

This interface may be applied to a {@link androidx.fragment.app.FragmentActivity} that owns a * {@code FlutterFragment}. */ public interface FlutterEngineConfigurator { diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterEngineProvider.java b/shell/platform/android/io/flutter/embedding/android/FlutterEngineProvider.java index fb7dde98b5410..420e9cc4a5079 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterEngineProvider.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterEngineProvider.java @@ -5,8 +5,8 @@ package io.flutter.embedding.android; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.embedding.engine.FlutterEngine; /** diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java b/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java index ff18172ae131a..97ae4a25254ee 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterFragment.java @@ -5,18 +5,18 @@ package io.flutter.embedding.android; import android.app.Activity; -import android.arch.lifecycle.Lifecycle; import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentActivity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentActivity; +import androidx.lifecycle.Lifecycle; import io.flutter.Log; import io.flutter.embedding.engine.FlutterEngine; import io.flutter.embedding.engine.FlutterShellArgs; diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterFragmentActivity.java b/shell/platform/android/io/flutter/embedding/android/FlutterFragmentActivity.java index 5860d6f8c986d..9a7b6aa7d0925 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterFragmentActivity.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterFragmentActivity.java @@ -26,15 +26,15 @@ import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; import android.widget.FrameLayout; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.FragmentActivity; +import androidx.fragment.app.FragmentManager; import io.flutter.Log; import io.flutter.embedding.android.FlutterActivityLaunchConfigs.BackgroundMode; import io.flutter.embedding.engine.FlutterEngine; diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterSplashView.java b/shell/platform/android/io/flutter/embedding/android/FlutterSplashView.java index b44f08b1f99d2..eefce9d1c8d61 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterSplashView.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterSplashView.java @@ -8,12 +8,12 @@ import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.Keep; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.AttributeSet; import android.view.View; import android.widget.FrameLayout; +import androidx.annotation.Keep; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.Log; import io.flutter.embedding.engine.FlutterEngine; import io.flutter.embedding.engine.renderer.FlutterUiDisplayListener; diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterSurfaceView.java b/shell/platform/android/io/flutter/embedding/android/FlutterSurfaceView.java index 04dc93042ab91..b13bf55cec26b 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterSurfaceView.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterSurfaceView.java @@ -6,11 +6,11 @@ import android.content.Context; import android.graphics.PixelFormat; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.AttributeSet; import android.view.SurfaceHolder; import android.view.SurfaceView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.Log; import io.flutter.embedding.engine.renderer.FlutterRenderer; import io.flutter.embedding.engine.renderer.FlutterUiDisplayListener; diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterTextureView.java b/shell/platform/android/io/flutter/embedding/android/FlutterTextureView.java index a1b47bdda8ef1..9416301b8afd4 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterTextureView.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterTextureView.java @@ -6,11 +6,11 @@ import android.content.Context; import android.graphics.SurfaceTexture; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.AttributeSet; import android.view.Surface; import android.view.TextureView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.Log; import io.flutter.embedding.engine.renderer.FlutterRenderer; import io.flutter.embedding.engine.renderer.RenderSurface; diff --git a/shell/platform/android/io/flutter/embedding/android/FlutterView.java b/shell/platform/android/io/flutter/embedding/android/FlutterView.java index 0e1ceb602c4e4..5d782b678ff6f 100644 --- a/shell/platform/android/io/flutter/embedding/android/FlutterView.java +++ b/shell/platform/android/io/flutter/embedding/android/FlutterView.java @@ -12,10 +12,6 @@ import android.graphics.Rect; import android.os.Build; import android.os.LocaleList; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.RequiresApi; -import android.support.annotation.VisibleForTesting; import android.text.format.DateFormat; import android.util.AttributeSet; import android.view.KeyEvent; @@ -27,6 +23,10 @@ import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputConnection; import android.widget.FrameLayout; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; +import androidx.annotation.VisibleForTesting; import io.flutter.Log; import io.flutter.embedding.engine.FlutterEngine; import io.flutter.embedding.engine.renderer.FlutterRenderer; diff --git a/shell/platform/android/io/flutter/embedding/android/SplashScreen.java b/shell/platform/android/io/flutter/embedding/android/SplashScreen.java index 8b27f802798d6..0546ded78207b 100644 --- a/shell/platform/android/io/flutter/embedding/android/SplashScreen.java +++ b/shell/platform/android/io/flutter/embedding/android/SplashScreen.java @@ -7,9 +7,9 @@ import android.annotation.SuppressLint; import android.content.Context; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.View; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; /** * Splash screen configuration for a given Flutter experience. diff --git a/shell/platform/android/io/flutter/embedding/android/SplashScreenProvider.java b/shell/platform/android/io/flutter/embedding/android/SplashScreenProvider.java index c6248fb348219..2e72bdad8cfb9 100644 --- a/shell/platform/android/io/flutter/embedding/android/SplashScreenProvider.java +++ b/shell/platform/android/io/flutter/embedding/android/SplashScreenProvider.java @@ -4,7 +4,7 @@ package io.flutter.embedding.android; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; /** * Provides a {@link SplashScreen} to display while Flutter initializes and renders its first frame. diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java b/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java index b817618c72108..dfd2bd674c57c 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterEngine.java @@ -5,8 +5,8 @@ package io.flutter.embedding.engine; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.Log; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.embedding.engine.loader.FlutterLoader; diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterEngineCache.java b/shell/platform/android/io/flutter/embedding/engine/FlutterEngineCache.java index 9006c84aca714..d75ea03a804a4 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterEngineCache.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterEngineCache.java @@ -4,9 +4,9 @@ package io.flutter.embedding.engine; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import java.util.HashMap; import java.util.Map; diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterEnginePluginRegistry.java b/shell/platform/android/io/flutter/embedding/engine/FlutterEnginePluginRegistry.java index 89c3c5dc94efe..64a11fa9431d2 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterEnginePluginRegistry.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterEnginePluginRegistry.java @@ -6,14 +6,14 @@ import android.app.Activity; import android.app.Service; -import android.arch.lifecycle.Lifecycle; import android.content.BroadcastReceiver; import android.content.ContentProvider; import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.lifecycle.Lifecycle; import io.flutter.Log; import io.flutter.embedding.engine.loader.FlutterLoader; import io.flutter.embedding.engine.plugins.FlutterPlugin; diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java b/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java index 183f42c615943..e599281f84137 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterJNI.java @@ -9,13 +9,13 @@ import android.graphics.Bitmap; import android.graphics.SurfaceTexture; import android.os.Looper; -import android.support.annotation.Keep; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.UiThread; -import android.support.annotation.VisibleForTesting; import android.view.Surface; import android.view.SurfaceHolder; +import androidx.annotation.Keep; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.UiThread; +import androidx.annotation.VisibleForTesting; import io.flutter.Log; import io.flutter.embedding.engine.FlutterEngine.EngineLifecycleListener; import io.flutter.embedding.engine.dart.PlatformMessageHandler; diff --git a/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java b/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java index d73c7f7ec6ec8..f7ec6fa4e3bbd 100644 --- a/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java +++ b/shell/platform/android/io/flutter/embedding/engine/FlutterShellArgs.java @@ -6,7 +6,7 @@ import android.content.Context; import android.content.Intent; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.*; /** diff --git a/shell/platform/android/io/flutter/embedding/engine/dart/DartExecutor.java b/shell/platform/android/io/flutter/embedding/engine/dart/DartExecutor.java index edf9ef9adbdd9..fd8061325f9b7 100644 --- a/shell/platform/android/io/flutter/embedding/engine/dart/DartExecutor.java +++ b/shell/platform/android/io/flutter/embedding/engine/dart/DartExecutor.java @@ -5,9 +5,9 @@ package io.flutter.embedding.engine.dart; import android.content.res.AssetManager; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.UiThread; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.UiThread; import io.flutter.Log; import io.flutter.embedding.engine.FlutterJNI; import io.flutter.plugin.common.BinaryMessenger; diff --git a/shell/platform/android/io/flutter/embedding/engine/dart/DartMessenger.java b/shell/platform/android/io/flutter/embedding/engine/dart/DartMessenger.java index cc00179b4efbc..2c4726b7f8fd3 100644 --- a/shell/platform/android/io/flutter/embedding/engine/dart/DartMessenger.java +++ b/shell/platform/android/io/flutter/embedding/engine/dart/DartMessenger.java @@ -4,9 +4,9 @@ package io.flutter.embedding.engine.dart; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.UiThread; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.UiThread; import io.flutter.Log; import io.flutter.embedding.engine.FlutterJNI; import io.flutter.plugin.common.BinaryMessenger; diff --git a/shell/platform/android/io/flutter/embedding/engine/dart/PlatformMessageHandler.java b/shell/platform/android/io/flutter/embedding/engine/dart/PlatformMessageHandler.java index 2eb4c893c37f4..ed8a5b044daad 100644 --- a/shell/platform/android/io/flutter/embedding/engine/dart/PlatformMessageHandler.java +++ b/shell/platform/android/io/flutter/embedding/engine/dart/PlatformMessageHandler.java @@ -4,8 +4,8 @@ package io.flutter.embedding.engine.dart; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; /** Handler that receives messages from Dart code. */ public interface PlatformMessageHandler { diff --git a/shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java b/shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java index b0f4b165416de..32fa212e8c647 100644 --- a/shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java +++ b/shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java @@ -12,10 +12,10 @@ import android.os.Handler; import android.os.Looper; import android.os.SystemClock; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.Log; import android.view.WindowManager; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.BuildConfig; import io.flutter.embedding.engine.FlutterJNI; import io.flutter.util.PathUtils; diff --git a/shell/platform/android/io/flutter/embedding/engine/loader/ResourceExtractor.java b/shell/platform/android/io/flutter/embedding/engine/loader/ResourceExtractor.java index 36f167c0a0aae..f8714dc813fcd 100644 --- a/shell/platform/android/io/flutter/embedding/engine/loader/ResourceExtractor.java +++ b/shell/platform/android/io/flutter/embedding/engine/loader/ResourceExtractor.java @@ -11,9 +11,9 @@ import android.content.res.AssetManager; import android.os.AsyncTask; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.annotation.WorkerThread; import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.WorkerThread; import io.flutter.BuildConfig; import java.io.*; import java.util.ArrayList; diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/FlutterPlugin.java b/shell/platform/android/io/flutter/embedding/engine/plugins/FlutterPlugin.java index c028cf951f00a..7c2e4c2ee25c2 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/FlutterPlugin.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/FlutterPlugin.java @@ -4,9 +4,9 @@ package io.flutter.embedding.engine.plugins; -import android.arch.lifecycle.Lifecycle; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; +import androidx.lifecycle.Lifecycle; import io.flutter.embedding.engine.FlutterEngine; import io.flutter.plugin.common.BinaryMessenger; import io.flutter.plugin.platform.PlatformViewRegistry; diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/PluginRegistry.java b/shell/platform/android/io/flutter/embedding/engine/plugins/PluginRegistry.java index b1faf4ff413b1..e9d59a13983fd 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/PluginRegistry.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/PluginRegistry.java @@ -4,8 +4,8 @@ package io.flutter.embedding.engine.plugins; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.util.Set; public interface PluginRegistry { diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityAware.java b/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityAware.java index 9b772c92468ed..ac6bc2a007ff1 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityAware.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityAware.java @@ -4,7 +4,7 @@ package io.flutter.embedding.engine.plugins.activity; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; /** * {@link FlutterPlugin} that is interested in {@link Activity} lifecycle events related to a {@link diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityControlSurface.java b/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityControlSurface.java index 037aedcf0c3e5..671f8311f4827 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityControlSurface.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityControlSurface.java @@ -5,11 +5,11 @@ package io.flutter.embedding.engine.plugins.activity; import android.app.Activity; -import android.arch.lifecycle.Lifecycle; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.lifecycle.Lifecycle; /** * Control surface through which an {@link Activity} attaches to a {@link FlutterEngine}. diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityPluginBinding.java b/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityPluginBinding.java index 021ef3b6e84b7..b3090bd81078f 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityPluginBinding.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/activity/ActivityPluginBinding.java @@ -6,8 +6,8 @@ import android.app.Activity; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.plugin.common.PluginRegistry; /** diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverAware.java b/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverAware.java index 5842fbc91930a..dbe3d681d0307 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverAware.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverAware.java @@ -4,7 +4,7 @@ package io.flutter.embedding.engine.plugins.broadcastreceiver; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; /** * A {@link FlutterPlugin} that wants to know when it is running within a {@link BroadcastReceiver}. diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverControlSurface.java b/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverControlSurface.java index 305cf5bc8c91f..d529af512f0ef 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverControlSurface.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverControlSurface.java @@ -4,9 +4,9 @@ package io.flutter.embedding.engine.plugins.broadcastreceiver; -import android.arch.lifecycle.Lifecycle; import android.content.BroadcastReceiver; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; +import androidx.lifecycle.Lifecycle; /** * Control surface through which a {@link BroadcastReceiver} attaches to a {@link FlutterEngine}. diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverPluginBinding.java b/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverPluginBinding.java index 6bc5251ce3e71..73ba8486c414a 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverPluginBinding.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/broadcastreceiver/BroadcastReceiverPluginBinding.java @@ -5,7 +5,7 @@ package io.flutter.embedding.engine.plugins.broadcastreceiver; import android.content.BroadcastReceiver; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; /** * Binding that gives {@link BroadcastReceiverAware} plugins access to an associated {@link diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderAware.java b/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderAware.java index 9cc0f8946fc6e..5f0308154fca2 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderAware.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderAware.java @@ -4,7 +4,7 @@ package io.flutter.embedding.engine.plugins.contentprovider; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; /** * A {@link FlutterPlugin} that wants to know when it is running within a {@link ContentProvider}. diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderControlSurface.java b/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderControlSurface.java index e892dd8d3925d..a53496939ec04 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderControlSurface.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderControlSurface.java @@ -4,9 +4,9 @@ package io.flutter.embedding.engine.plugins.contentprovider; -import android.arch.lifecycle.Lifecycle; import android.content.ContentProvider; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; +import androidx.lifecycle.Lifecycle; /** * Control surface through which a {@link ContentProvider} attaches to a {@link FlutterEngine}. diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderPluginBinding.java b/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderPluginBinding.java index ed81801e23406..d55d7e45a2fc4 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderPluginBinding.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/contentprovider/ContentProviderPluginBinding.java @@ -5,7 +5,7 @@ package io.flutter.embedding.engine.plugins.contentprovider; import android.content.ContentProvider; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; /** * Binding that gives {@link ContentProviderAware} plugins access to an associated {@link diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/lifecycle/HiddenLifecycleReference.java b/shell/platform/android/io/flutter/embedding/engine/plugins/lifecycle/HiddenLifecycleReference.java index 70880c0b4529a..9c3a0805b5324 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/lifecycle/HiddenLifecycleReference.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/lifecycle/HiddenLifecycleReference.java @@ -4,9 +4,9 @@ package io.flutter.embedding.engine.plugins.lifecycle; -import android.arch.lifecycle.Lifecycle; -import android.support.annotation.Keep; -import android.support.annotation.NonNull; +import androidx.annotation.Keep; +import androidx.annotation.NonNull; +import androidx.lifecycle.Lifecycle; /** * An {@code Object} that can be used to obtain a {@link Lifecycle} reference. diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServiceAware.java b/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServiceAware.java index 790ef4c6bea4c..f0d78456b0330 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServiceAware.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServiceAware.java @@ -4,7 +4,7 @@ package io.flutter.embedding.engine.plugins.service; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; /** A {@link FlutterPlugin} that wants to know when it is running within a {@link Service}. */ public interface ServiceAware { diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServiceControlSurface.java b/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServiceControlSurface.java index 77202744151da..e5450fe4c1cd7 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServiceControlSurface.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServiceControlSurface.java @@ -5,9 +5,9 @@ package io.flutter.embedding.engine.plugins.service; import android.app.Service; -import android.arch.lifecycle.Lifecycle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.lifecycle.Lifecycle; /** * Control surface through which a {@link Service} attaches to a {@link FlutterEngine}. diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServicePluginBinding.java b/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServicePluginBinding.java index 9b9ed5753a96b..62a51e321a565 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServicePluginBinding.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/service/ServicePluginBinding.java @@ -5,8 +5,8 @@ package io.flutter.embedding.engine.plugins.service; import android.app.Service; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; /** Binding that gives {@link ServiceAware} plugins access to an associated {@link Service}. */ public interface ServicePluginBinding { diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/shim/ShimPluginRegistry.java b/shell/platform/android/io/flutter/embedding/engine/plugins/shim/ShimPluginRegistry.java index ec2dc0a27f84c..671e24e0ee53c 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/shim/ShimPluginRegistry.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/shim/ShimPluginRegistry.java @@ -4,7 +4,7 @@ package io.flutter.embedding.engine.plugins.shim; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.flutter.Log; import io.flutter.embedding.engine.FlutterEngine; import io.flutter.embedding.engine.plugins.FlutterPlugin; @@ -21,14 +21,18 @@ * plugin API behind the scenes. * *

The following is an example usage of {@code ShimPluginRegistry} within a {@code - * FlutterActivity}: {@code // Create the FlutterEngine that will back the Flutter UI. FlutterEngine - * flutterEngine = new FlutterEngine(context); + * FlutterActivity}: * - *

// Create a ShimPluginRegistry and wrap the FlutterEngine with the shim. ShimPluginRegistry - * shimPluginRegistry = new ShimPluginRegistry(flutterEngine, platformViewsController); + *

+ * // Create the FlutterEngine that will back the Flutter UI.
+ * FlutterEngine flutterEngine = new FlutterEngine(context);
  *
- * 

// Use the GeneratedPluginRegistrant to add every plugin that's in the pubspec. - * GeneratedPluginRegistrant.registerWith(shimPluginRegistry); } + * // Create a ShimPluginRegistry and wrap the FlutterEngine with the shim. + * ShimPluginRegistry shimPluginRegistry = new ShimPluginRegistry(flutterEngine, platformViewsController); + * + * // Use the GeneratedPluginRegistrant to add every plugin that's in the pubspec. + * GeneratedPluginRegistrant.registerWith(shimPluginRegistry); + *

*/ public class ShimPluginRegistry implements PluginRegistry { private static final String TAG = "ShimPluginRegistry"; diff --git a/shell/platform/android/io/flutter/embedding/engine/plugins/shim/ShimRegistrar.java b/shell/platform/android/io/flutter/embedding/engine/plugins/shim/ShimRegistrar.java index 3e5b78a3dd4ff..9ec464e4f5736 100644 --- a/shell/platform/android/io/flutter/embedding/engine/plugins/shim/ShimRegistrar.java +++ b/shell/platform/android/io/flutter/embedding/engine/plugins/shim/ShimRegistrar.java @@ -6,7 +6,7 @@ import android.app.Activity; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.flutter.Log; import io.flutter.embedding.engine.plugins.FlutterPlugin; import io.flutter.embedding.engine.plugins.activity.ActivityAware; diff --git a/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java b/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java index 01f12a08680de..919971849fda4 100644 --- a/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java +++ b/shell/platform/android/io/flutter/embedding/engine/renderer/FlutterRenderer.java @@ -9,9 +9,9 @@ import android.graphics.SurfaceTexture; import android.os.Build; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.Surface; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.Log; import io.flutter.embedding.engine.FlutterJNI; import io.flutter.view.TextureRegistry; diff --git a/shell/platform/android/io/flutter/embedding/engine/renderer/RenderSurface.java b/shell/platform/android/io/flutter/embedding/engine/renderer/RenderSurface.java index 9189d259d39a5..e788b610eb809 100644 --- a/shell/platform/android/io/flutter/embedding/engine/renderer/RenderSurface.java +++ b/shell/platform/android/io/flutter/embedding/engine/renderer/RenderSurface.java @@ -4,9 +4,9 @@ package io.flutter.embedding.engine.renderer; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.Surface; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; /** * Owns a {@code Surface} that {@code FlutterRenderer} would like to paint. diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/AccessibilityChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/AccessibilityChannel.java index de5dcb4c25d67..90455bcecefc2 100644 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/AccessibilityChannel.java +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/AccessibilityChannel.java @@ -1,7 +1,7 @@ package io.flutter.embedding.engine.systemchannels; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.Log; import io.flutter.embedding.engine.FlutterJNI; import io.flutter.embedding.engine.dart.DartExecutor; diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/KeyEventChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/KeyEventChannel.java index b8af0504fbbc1..1b03c94184221 100644 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/KeyEventChannel.java +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/KeyEventChannel.java @@ -5,10 +5,10 @@ package io.flutter.embedding.engine.systemchannels; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.InputDevice; import android.view.KeyEvent; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.plugin.common.BasicMessageChannel; import io.flutter.plugin.common.JSONMessageCodec; diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/LifecycleChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/LifecycleChannel.java index a1ad730c84171..9e8c22bc909be 100644 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/LifecycleChannel.java +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/LifecycleChannel.java @@ -4,7 +4,7 @@ package io.flutter.embedding.engine.systemchannels; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.flutter.Log; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.plugin.common.BasicMessageChannel; diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/LocalizationChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/LocalizationChannel.java index d984217dcd458..2df0ecd7c1193 100644 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/LocalizationChannel.java +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/LocalizationChannel.java @@ -5,7 +5,7 @@ package io.flutter.embedding.engine.systemchannels; import android.os.Build; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.flutter.Log; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.plugin.common.JSONMethodCodec; diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/NavigationChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/NavigationChannel.java index ec797dac70350..e76023471e2bd 100644 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/NavigationChannel.java +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/NavigationChannel.java @@ -4,8 +4,8 @@ package io.flutter.embedding.engine.systemchannels; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.Log; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.plugin.common.JSONMethodCodec; diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformChannel.java index d50a8296bb95b..3c7d33b306765 100644 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformChannel.java +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformChannel.java @@ -6,9 +6,9 @@ import android.content.pm.ActivityInfo; import android.graphics.Rect; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import io.flutter.Log; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.plugin.common.JSONMethodCodec; diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java index b32149581fc5b..5fcd966c24309 100644 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/PlatformViewsChannel.java @@ -4,8 +4,8 @@ package io.flutter.embedding.engine.systemchannels; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.Log; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.plugin.common.MethodCall; diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/SettingsChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/SettingsChannel.java index 1d6ad2c6c832d..cc01aea2861f5 100644 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/SettingsChannel.java +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/SettingsChannel.java @@ -1,6 +1,6 @@ package io.flutter.embedding.engine.systemchannels; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.flutter.Log; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.plugin.common.BasicMessageChannel; diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/SystemChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/SystemChannel.java index de97d2b5b926f..acdf7f7f6b49f 100644 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/SystemChannel.java +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/SystemChannel.java @@ -4,7 +4,7 @@ package io.flutter.embedding.engine.systemchannels; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.flutter.Log; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.plugin.common.BasicMessageChannel; diff --git a/shell/platform/android/io/flutter/embedding/engine/systemchannels/TextInputChannel.java b/shell/platform/android/io/flutter/embedding/engine/systemchannels/TextInputChannel.java index 4a321ee53e6ab..80d2e419c8fce 100644 --- a/shell/platform/android/io/flutter/embedding/engine/systemchannels/TextInputChannel.java +++ b/shell/platform/android/io/flutter/embedding/engine/systemchannels/TextInputChannel.java @@ -1,8 +1,8 @@ package io.flutter.embedding.engine.systemchannels; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.inputmethod.EditorInfo; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.Log; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.plugin.common.JSONMethodCodec; diff --git a/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java b/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java index dbf361a081e65..03fc178498d8e 100644 --- a/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java +++ b/shell/platform/android/io/flutter/plugin/common/BasicMessageChannel.java @@ -4,10 +4,10 @@ package io.flutter.plugin.common; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.UiThread; import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.UiThread; import io.flutter.BuildConfig; import io.flutter.plugin.common.BinaryMessenger.BinaryMessageHandler; import io.flutter.plugin.common.BinaryMessenger.BinaryReply; diff --git a/shell/platform/android/io/flutter/plugin/common/BinaryMessenger.java b/shell/platform/android/io/flutter/plugin/common/BinaryMessenger.java index 0e4414ab787c9..9491c13b6a57b 100644 --- a/shell/platform/android/io/flutter/plugin/common/BinaryMessenger.java +++ b/shell/platform/android/io/flutter/plugin/common/BinaryMessenger.java @@ -4,9 +4,9 @@ package io.flutter.plugin.common; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.UiThread; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.UiThread; import java.nio.ByteBuffer; /** diff --git a/shell/platform/android/io/flutter/plugin/common/ErrorLogResult.java b/shell/platform/android/io/flutter/plugin/common/ErrorLogResult.java index 9f1d38b76705d..d4acc77ea0f7c 100644 --- a/shell/platform/android/io/flutter/plugin/common/ErrorLogResult.java +++ b/shell/platform/android/io/flutter/plugin/common/ErrorLogResult.java @@ -4,8 +4,8 @@ package io.flutter.plugin.common; -import android.support.annotation.Nullable; import android.util.Log; +import androidx.annotation.Nullable; import io.flutter.BuildConfig; /** diff --git a/shell/platform/android/io/flutter/plugin/common/EventChannel.java b/shell/platform/android/io/flutter/plugin/common/EventChannel.java index c8093ec085bbb..f7d2e3e84c2f2 100644 --- a/shell/platform/android/io/flutter/plugin/common/EventChannel.java +++ b/shell/platform/android/io/flutter/plugin/common/EventChannel.java @@ -4,8 +4,8 @@ package io.flutter.plugin.common; -import android.support.annotation.UiThread; import android.util.Log; +import androidx.annotation.UiThread; import io.flutter.BuildConfig; import io.flutter.plugin.common.BinaryMessenger.BinaryMessageHandler; import io.flutter.plugin.common.BinaryMessenger.BinaryReply; diff --git a/shell/platform/android/io/flutter/plugin/common/MessageCodec.java b/shell/platform/android/io/flutter/plugin/common/MessageCodec.java index ba1c3e362fa2f..2e9d88718f9a7 100644 --- a/shell/platform/android/io/flutter/plugin/common/MessageCodec.java +++ b/shell/platform/android/io/flutter/plugin/common/MessageCodec.java @@ -4,7 +4,7 @@ package io.flutter.plugin.common; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import java.nio.ByteBuffer; /** diff --git a/shell/platform/android/io/flutter/plugin/common/MethodCall.java b/shell/platform/android/io/flutter/plugin/common/MethodCall.java index 53129fa52970e..8a6e51783e696 100644 --- a/shell/platform/android/io/flutter/plugin/common/MethodCall.java +++ b/shell/platform/android/io/flutter/plugin/common/MethodCall.java @@ -4,7 +4,7 @@ package io.flutter.plugin.common; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import io.flutter.BuildConfig; import java.util.Map; import org.json.JSONObject; diff --git a/shell/platform/android/io/flutter/plugin/common/MethodChannel.java b/shell/platform/android/io/flutter/plugin/common/MethodChannel.java index 65441bb7b7b66..8c0bdd6895562 100644 --- a/shell/platform/android/io/flutter/plugin/common/MethodChannel.java +++ b/shell/platform/android/io/flutter/plugin/common/MethodChannel.java @@ -4,10 +4,10 @@ package io.flutter.plugin.common; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.UiThread; import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.UiThread; import io.flutter.BuildConfig; import io.flutter.plugin.common.BinaryMessenger.BinaryMessageHandler; import io.flutter.plugin.common.BinaryMessenger.BinaryReply; diff --git a/shell/platform/android/io/flutter/plugin/common/PluginRegistry.java b/shell/platform/android/io/flutter/plugin/common/PluginRegistry.java index abd06c30f2f49..62ac2b7b665b6 100644 --- a/shell/platform/android/io/flutter/plugin/common/PluginRegistry.java +++ b/shell/platform/android/io/flutter/plugin/common/PluginRegistry.java @@ -219,7 +219,7 @@ interface Registrar { /** * Adds a callback allowing the plugin to take part in handling incoming calls to {@code * Activity#onRequestPermissionsResult(int, String[], int[])} or {@code - * android.support.v4.app.ActivityCompat.OnRequestPermissionsResultCallback#onRequestPermissionsResult(int, + * androidx.core.app.ActivityCompat.OnRequestPermissionsResultCallback#onRequestPermissionsResult(int, * String[], int[])}. * *

This registrar is for Flutter's v1 embedding. To listen for permission results in the v2 diff --git a/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java b/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java index 45d8d8659b60f..9d41dc5b52902 100644 --- a/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java +++ b/shell/platform/android/io/flutter/plugin/editing/TextInputPlugin.java @@ -8,9 +8,6 @@ import android.content.Context; import android.os.Build; import android.provider.Settings; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; import android.text.Editable; import android.text.InputType; import android.text.Selection; @@ -20,6 +17,9 @@ import android.view.inputmethod.InputConnection; import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodSubtype; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.embedding.engine.systemchannels.TextInputChannel; import io.flutter.plugin.platform.PlatformViewsController; diff --git a/shell/platform/android/io/flutter/plugin/platform/AccessibilityEventsDelegate.java b/shell/platform/android/io/flutter/plugin/platform/AccessibilityEventsDelegate.java index 90eae2a0da65a..ec6a4e9667234 100644 --- a/shell/platform/android/io/flutter/plugin/platform/AccessibilityEventsDelegate.java +++ b/shell/platform/android/io/flutter/plugin/platform/AccessibilityEventsDelegate.java @@ -4,10 +4,10 @@ package io.flutter.plugin.platform; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.view.View; import android.view.accessibility.AccessibilityEvent; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.view.AccessibilityBridge; /** diff --git a/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java b/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java index 6ef1e384e9040..2c88dce423938 100644 --- a/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java +++ b/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java @@ -11,13 +11,13 @@ import android.content.Context; import android.graphics.Rect; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; import android.view.HapticFeedbackConstants; import android.view.SoundEffectConstants; import android.view.View; import android.view.Window; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import io.flutter.embedding.engine.systemchannels.PlatformChannel; import java.util.ArrayList; import java.util.List; diff --git a/shell/platform/android/io/flutter/plugin/platform/PlatformView.java b/shell/platform/android/io/flutter/plugin/platform/PlatformView.java index 1ab9166a56c3b..fc22e8440fd1d 100644 --- a/shell/platform/android/io/flutter/plugin/platform/PlatformView.java +++ b/shell/platform/android/io/flutter/plugin/platform/PlatformView.java @@ -5,8 +5,8 @@ package io.flutter.plugin.platform; import android.annotation.SuppressLint; -import android.support.annotation.NonNull; import android.view.View; +import androidx.annotation.NonNull; /** A handle to an Android view to be embedded in the Flutter hierarchy. */ public interface PlatformView { diff --git a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java index 3a6ae6b97342f..6c87e20c0fd94 100644 --- a/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java +++ b/shell/platform/android/io/flutter/plugin/platform/PlatformViewsController.java @@ -10,13 +10,13 @@ import android.annotation.TargetApi; import android.content.Context; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.annotation.UiThread; -import android.support.annotation.VisibleForTesting; import android.util.DisplayMetrics; import android.util.Log; import android.view.MotionEvent; import android.view.View; +import androidx.annotation.NonNull; +import androidx.annotation.UiThread; +import androidx.annotation.VisibleForTesting; import io.flutter.embedding.engine.dart.DartExecutor; import io.flutter.embedding.engine.systemchannels.PlatformViewsChannel; import io.flutter.plugin.editing.TextInputPlugin; diff --git a/shell/platform/android/io/flutter/plugin/platform/SingleViewPresentation.java b/shell/platform/android/io/flutter/plugin/platform/SingleViewPresentation.java index ddfc518c486d9..9bda1295b9b88 100644 --- a/shell/platform/android/io/flutter/plugin/platform/SingleViewPresentation.java +++ b/shell/platform/android/io/flutter/plugin/platform/SingleViewPresentation.java @@ -16,9 +16,6 @@ import android.graphics.drawable.ColorDrawable; import android.os.Build; import android.os.Bundle; -import android.support.annotation.Keep; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.Log; import android.view.Display; import android.view.Gravity; @@ -28,6 +25,9 @@ import android.view.accessibility.AccessibilityEvent; import android.view.inputmethod.InputMethodManager; import android.widget.FrameLayout; +import androidx.annotation.Keep; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; diff --git a/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java b/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java index 4b6c5f73055fd..81c59b6135bea 100644 --- a/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java +++ b/shell/platform/android/io/flutter/plugin/platform/VirtualDisplayController.java @@ -11,10 +11,10 @@ import android.hardware.display.DisplayManager; import android.hardware.display.VirtualDisplay; import android.os.Build; -import android.support.annotation.NonNull; import android.view.Surface; import android.view.View; import android.view.ViewTreeObserver; +import androidx.annotation.NonNull; import io.flutter.view.TextureRegistry; @TargetApi(Build.VERSION_CODES.KITKAT_WATCH) diff --git a/shell/platform/android/io/flutter/view/AccessibilityBridge.java b/shell/platform/android/io/flutter/view/AccessibilityBridge.java index c6acaed155c9d..4d4fe46a33281 100644 --- a/shell/platform/android/io/flutter/view/AccessibilityBridge.java +++ b/shell/platform/android/io/flutter/view/AccessibilityBridge.java @@ -15,9 +15,6 @@ import android.os.Bundle; import android.os.Handler; import android.provider.Settings; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.RequiresApi; import android.util.Log; import android.view.MotionEvent; import android.view.View; @@ -26,6 +23,9 @@ import android.view.accessibility.AccessibilityManager; import android.view.accessibility.AccessibilityNodeInfo; import android.view.accessibility.AccessibilityNodeProvider; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; import io.flutter.BuildConfig; import io.flutter.embedding.engine.systemchannels.AccessibilityChannel; import io.flutter.plugin.platform.PlatformViewsAccessibilityDelegate; diff --git a/shell/platform/android/io/flutter/view/AccessibilityViewEmbedder.java b/shell/platform/android/io/flutter/view/AccessibilityViewEmbedder.java index 28ca6006568d2..0fb2957d92410 100644 --- a/shell/platform/android/io/flutter/view/AccessibilityViewEmbedder.java +++ b/shell/platform/android/io/flutter/view/AccessibilityViewEmbedder.java @@ -9,9 +9,6 @@ import android.os.Build; import android.os.Bundle; import android.os.Parcel; -import android.support.annotation.Keep; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; import android.util.Log; import android.util.SparseArray; import android.view.MotionEvent; @@ -20,6 +17,9 @@ import android.view.accessibility.AccessibilityNodeInfo; import android.view.accessibility.AccessibilityNodeProvider; import android.view.accessibility.AccessibilityRecord; +import androidx.annotation.Keep; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; diff --git a/shell/platform/android/io/flutter/view/FlutterCallbackInformation.java b/shell/platform/android/io/flutter/view/FlutterCallbackInformation.java index 326e874dd6678..0aec8868f91a8 100644 --- a/shell/platform/android/io/flutter/view/FlutterCallbackInformation.java +++ b/shell/platform/android/io/flutter/view/FlutterCallbackInformation.java @@ -4,8 +4,8 @@ package io.flutter.view; -import android.support.annotation.Keep; -import android.support.annotation.NonNull; +import androidx.annotation.Keep; +import androidx.annotation.NonNull; import io.flutter.embedding.engine.FlutterJNI; /** diff --git a/shell/platform/android/io/flutter/view/FlutterMain.java b/shell/platform/android/io/flutter/view/FlutterMain.java index bbcea46b3775e..8cc80ec8dc96f 100644 --- a/shell/platform/android/io/flutter/view/FlutterMain.java +++ b/shell/platform/android/io/flutter/view/FlutterMain.java @@ -6,9 +6,9 @@ import android.content.Context; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import io.flutter.embedding.engine.loader.FlutterLoader; /** diff --git a/shell/platform/android/io/flutter/view/FlutterNativeView.java b/shell/platform/android/io/flutter/view/FlutterNativeView.java index bba2b1fede6c6..01e3434d89d7c 100644 --- a/shell/platform/android/io/flutter/view/FlutterNativeView.java +++ b/shell/platform/android/io/flutter/view/FlutterNativeView.java @@ -6,9 +6,9 @@ import android.app.Activity; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.UiThread; import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.UiThread; import io.flutter.app.FlutterPluginRegistry; import io.flutter.embedding.engine.FlutterEngine.EngineLifecycleListener; import io.flutter.embedding.engine.FlutterJNI; diff --git a/shell/platform/android/io/flutter/view/FlutterView.java b/shell/platform/android/io/flutter/view/FlutterView.java index 98066479053f0..23362b64a3499 100644 --- a/shell/platform/android/io/flutter/view/FlutterView.java +++ b/shell/platform/android/io/flutter/view/FlutterView.java @@ -18,9 +18,6 @@ import android.os.Build; import android.os.Handler; import android.os.LocaleList; -import android.support.annotation.NonNull; -import android.support.annotation.RequiresApi; -import android.support.annotation.UiThread; import android.text.format.DateFormat; import android.util.AttributeSet; import android.util.Log; @@ -36,6 +33,9 @@ import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputConnection; import android.view.inputmethod.InputMethodManager; +import androidx.annotation.NonNull; +import androidx.annotation.RequiresApi; +import androidx.annotation.UiThread; import io.flutter.app.FlutterPluginRegistry; import io.flutter.embedding.android.AndroidKeyProcessor; import io.flutter.embedding.android.AndroidTouchProcessor; diff --git a/shell/platform/android/io/flutter/view/VsyncWaiter.java b/shell/platform/android/io/flutter/view/VsyncWaiter.java index e70c116e412f5..8e225f0ee548a 100644 --- a/shell/platform/android/io/flutter/view/VsyncWaiter.java +++ b/shell/platform/android/io/flutter/view/VsyncWaiter.java @@ -4,9 +4,9 @@ package io.flutter.view; -import android.support.annotation.NonNull; import android.view.Choreographer; import android.view.WindowManager; +import androidx.annotation.NonNull; import io.flutter.embedding.engine.FlutterJNI; // TODO(mattcarroll): add javadoc. diff --git a/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityAndFragmentDelegateTest.java b/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityAndFragmentDelegateTest.java index 422673439b551..3d8f420795f22 100644 --- a/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityAndFragmentDelegateTest.java +++ b/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityAndFragmentDelegateTest.java @@ -13,10 +13,10 @@ import static org.mockito.Mockito.when; import android.app.Activity; -import android.arch.lifecycle.Lifecycle; import android.content.Context; import android.content.Intent; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; +import androidx.lifecycle.Lifecycle; import io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.Host; import io.flutter.embedding.engine.FlutterEngine; import io.flutter.embedding.engine.FlutterEngineCache; diff --git a/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityTest.java b/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityTest.java index 3f476ebc8b72e..f6e9c59c6f295 100644 --- a/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityTest.java +++ b/shell/platform/android/test/io/flutter/embedding/android/FlutterActivityTest.java @@ -11,8 +11,8 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import io.flutter.embedding.android.FlutterActivityLaunchConfigs.BackgroundMode; import io.flutter.embedding.engine.FlutterEngine; import io.flutter.embedding.engine.FlutterJNI; diff --git a/shell/platform/android/test/io/flutter/embedding/android/FlutterAndroidComponentTest.java b/shell/platform/android/test/io/flutter/embedding/android/FlutterAndroidComponentTest.java index 05072e01c2f8a..66d8f5dc0135b 100644 --- a/shell/platform/android/test/io/flutter/embedding/android/FlutterAndroidComponentTest.java +++ b/shell/platform/android/test/io/flutter/embedding/android/FlutterAndroidComponentTest.java @@ -11,11 +11,11 @@ import static org.mockito.Mockito.withSettings; import android.app.Activity; -import android.arch.lifecycle.Lifecycle; import android.content.Context; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.lifecycle.Lifecycle; import io.flutter.embedding.engine.FlutterEngine; import io.flutter.embedding.engine.FlutterEngineCache; import io.flutter.embedding.engine.FlutterJNI; diff --git a/shell/platform/android/test/io/flutter/embedding/engine/FlutterEnginePluginRegistryTest.java b/shell/platform/android/test/io/flutter/embedding/engine/FlutterEnginePluginRegistryTest.java index 5a28e2d2683ef..846299d02f73b 100644 --- a/shell/platform/android/test/io/flutter/embedding/engine/FlutterEnginePluginRegistryTest.java +++ b/shell/platform/android/test/io/flutter/embedding/engine/FlutterEnginePluginRegistryTest.java @@ -7,7 +7,7 @@ import static org.mockito.Mockito.when; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.flutter.embedding.engine.loader.FlutterLoader; import io.flutter.embedding.engine.plugins.FlutterPlugin; import io.flutter.plugin.platform.PlatformViewsController; diff --git a/shell/platform/android/test/io/flutter/embedding/engine/PluginComponentTest.java b/shell/platform/android/test/io/flutter/embedding/engine/PluginComponentTest.java index 727e7177d121f..f4860fd62e845 100644 --- a/shell/platform/android/test/io/flutter/embedding/engine/PluginComponentTest.java +++ b/shell/platform/android/test/io/flutter/embedding/engine/PluginComponentTest.java @@ -5,7 +5,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.flutter.embedding.engine.FlutterEngine; import io.flutter.embedding.engine.FlutterJNI; import io.flutter.embedding.engine.loader.FlutterLoader; diff --git a/shell/platform/android/test/io/flutter/plugin/editing/InputConnectionAdaptorTest.java b/shell/platform/android/test/io/flutter/plugin/editing/InputConnectionAdaptorTest.java index 0a8d60f2d732a..9d8d95095adf5 100644 --- a/shell/platform/android/test/io/flutter/plugin/editing/InputConnectionAdaptorTest.java +++ b/shell/platform/android/test/io/flutter/plugin/editing/InputConnectionAdaptorTest.java @@ -10,7 +10,7 @@ import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import android.content.Context; +import android.content.ClipboardManager; import android.content.res.AssetManager; import android.text.Editable; import android.text.InputType; @@ -28,7 +28,6 @@ import org.robolectric.RobolectricTestRunner; import org.robolectric.RuntimeEnvironment; import org.robolectric.annotation.Config; -import org.robolectric.shadow.api.Shadow; import org.robolectric.shadows.ShadowClipboardManager; @Config(manifest = Config.NONE, sdk = 27, shadows = ShadowClipboardManager.class) @@ -71,8 +70,8 @@ public void testPerformContextMenuAction_selectAll() { @Test public void testPerformContextMenuAction_cut() { - ShadowClipboardManager clipboardManager = - Shadow.extract(RuntimeEnvironment.application.getSystemService(Context.CLIPBOARD_SERVICE)); + ClipboardManager clipboardManager = + RuntimeEnvironment.application.getSystemService(ClipboardManager.class); int selStart = 6; int selEnd = 11; Editable editable = sampleEditable(selStart, selEnd); @@ -89,8 +88,8 @@ public void testPerformContextMenuAction_cut() { @Test public void testPerformContextMenuAction_copy() { - ShadowClipboardManager clipboardManager = - Shadow.extract(RuntimeEnvironment.application.getSystemService(Context.CLIPBOARD_SERVICE)); + ClipboardManager clipboardManager = + RuntimeEnvironment.application.getSystemService(ClipboardManager.class); int selStart = 6; int selEnd = 11; Editable editable = sampleEditable(selStart, selEnd); @@ -109,8 +108,8 @@ public void testPerformContextMenuAction_copy() { @Test public void testPerformContextMenuAction_paste() { - ShadowClipboardManager clipboardManager = - Shadow.extract(RuntimeEnvironment.application.getSystemService(Context.CLIPBOARD_SERVICE)); + ClipboardManager clipboardManager = + RuntimeEnvironment.application.getSystemService(ClipboardManager.class); String textToBePasted = "deadbeef"; clipboardManager.setText(textToBePasted); Editable editable = sampleEditable(0, 0); diff --git a/shell/platform/android/test/io/flutter/plugins/GeneratedPluginRegistrant.java b/shell/platform/android/test/io/flutter/plugins/GeneratedPluginRegistrant.java index e41c50bd4c719..9b93bd6399464 100644 --- a/shell/platform/android/test/io/flutter/plugins/GeneratedPluginRegistrant.java +++ b/shell/platform/android/test/io/flutter/plugins/GeneratedPluginRegistrant.java @@ -1,6 +1,6 @@ package io.flutter.plugins; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.VisibleForTesting; import io.flutter.embedding.engine.FlutterEngine; import java.util.ArrayList; import java.util.List; diff --git a/testing/run_tests.py b/testing/run_tests.py index cb11932eae934..90c3a6067b26f 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -290,10 +290,10 @@ def RunJavaTests(filter, android_variant='android_debug_unopt'): android_out_dir = os.path.join(out_dir, android_variant) EnsureJavaTestsAreBuilt(android_out_dir) - robolectric_dir = os.path.join(buildroot_dir, 'third_party', 'robolectric', 'lib') + embedding_deps_dir = os.path.join(buildroot_dir, 'third_party', 'android_embedding_dependencies', 'lib') classpath = map(str, [ os.path.join(buildroot_dir, 'third_party', 'android_tools', 'sdk', 'platforms', 'android-29', 'android.jar'), - os.path.join(robolectric_dir, '*'), # Wildcard for all jars in the directory + os.path.join(embedding_deps_dir, '*'), # Wildcard for all jars in the directory os.path.join(android_out_dir, 'flutter.jar'), os.path.join(android_out_dir, 'robolectric_tests.jar') ]) @@ -302,7 +302,7 @@ def RunJavaTests(filter, android_variant='android_debug_unopt'): command = [ 'java', '-Drobolectric.offline=true', - '-Drobolectric.dependency.dir=' + robolectric_dir, + '-Drobolectric.dependency.dir=' + embedding_deps_dir, '-classpath', ':'.join(classpath), '-Drobolectric.logging=stdout', 'org.junit.runner.JUnitCore', diff --git a/testing/scenario_app/android/app/build.gradle b/testing/scenario_app/android/app/build.gradle index 0fbd03be46952..a3ae608f1b7ce 100644 --- a/testing/scenario_app/android/app/build.gradle +++ b/testing/scenario_app/android/app/build.gradle @@ -12,7 +12,7 @@ android { targetSdkVersion 28 versionCode 1 versionName "1.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { @@ -24,12 +24,12 @@ android { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'com.android.support:appcompat-v7:28.0.0' - implementation 'com.android.support.constraint:constraint-layout:1.1.3' - implementation 'com.android.support:design:28.0.0' - implementation 'android.arch.lifecycle:common-java8:1.1.1' + implementation 'androidx.appcompat:appcompat:1.1.0' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation 'com.google.android.material:material:1.0.0' + implementation 'androidx.lifecycle:lifecycle-common-java8:2.2.0-alpha01' testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test:rules:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + androidTestImplementation 'androidx.test:runner:1.2.0' + androidTestImplementation 'androidx.test:rules:1.2.0' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' } diff --git a/testing/scenario_app/android/app/src/androidTest/java/dev/flutter/scenarios/EngineLaunchE2ETest.java b/testing/scenario_app/android/app/src/androidTest/java/dev/flutter/scenarios/EngineLaunchE2ETest.java index f72102296d37e..24d3ed5e4ae4f 100644 --- a/testing/scenario_app/android/app/src/androidTest/java/dev/flutter/scenarios/EngineLaunchE2ETest.java +++ b/testing/scenario_app/android/app/src/androidTest/java/dev/flutter/scenarios/EngineLaunchE2ETest.java @@ -7,9 +7,9 @@ import static org.junit.Assert.fail; import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.internal.runner.junit4.statement.UiThreadStatement; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.InstrumentationRegistry; +import androidx.test.internal.runner.junit4.statement.UiThreadStatement; +import androidx.test.runner.AndroidJUnit4; import io.flutter.embedding.engine.FlutterEngine; import io.flutter.embedding.engine.dart.DartExecutor; import java.util.concurrent.CompletableFuture; diff --git a/testing/scenario_app/android/app/src/androidTest/java/dev/flutter/scenarios/ExampleInstrumentedTest.java b/testing/scenario_app/android/app/src/androidTest/java/dev/flutter/scenarios/ExampleInstrumentedTest.java index d85a4249bc19c..6a717cfe57977 100644 --- a/testing/scenario_app/android/app/src/androidTest/java/dev/flutter/scenarios/ExampleInstrumentedTest.java +++ b/testing/scenario_app/android/app/src/androidTest/java/dev/flutter/scenarios/ExampleInstrumentedTest.java @@ -3,8 +3,8 @@ import static org.junit.Assert.*; import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.InstrumentationRegistry; +import androidx.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/BlankActivity.java b/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/BlankActivity.java index b8605e84d7bbd..d6f1835c7d84d 100644 --- a/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/BlankActivity.java +++ b/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/BlankActivity.java @@ -1,7 +1,7 @@ package dev.flutter.scenarios; import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; public class BlankActivity extends AppCompatActivity { @Override diff --git a/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/TextPlatformViewActivity.java b/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/TextPlatformViewActivity.java index 366ffe75178b0..3a5a2c2f2d1fb 100644 --- a/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/TextPlatformViewActivity.java +++ b/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/TextPlatformViewActivity.java @@ -8,7 +8,7 @@ import android.os.Bundle; import android.os.Handler; import android.os.Looper; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import io.flutter.Log; import io.flutter.embedding.android.FlutterActivity; import io.flutter.embedding.engine.FlutterEngine; diff --git a/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/TextPlatformViewFactory.java b/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/TextPlatformViewFactory.java index cbdcef084fa59..6a590ccf2ca34 100644 --- a/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/TextPlatformViewFactory.java +++ b/testing/scenario_app/android/app/src/main/java/dev/flutter/scenarios/TextPlatformViewFactory.java @@ -5,7 +5,7 @@ package dev.flutter.scenarios; import android.content.Context; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import io.flutter.plugin.common.MessageCodec; import io.flutter.plugin.common.StringCodec; import io.flutter.plugin.platform.PlatformView; diff --git a/tools/android_support/download_android_support.py b/tools/android_support/download_android_support.py deleted file mode 100644 index 296243f926e63..0000000000000 --- a/tools/android_support/download_android_support.py +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env python -# Copyright 2013 The Flutter Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import os -import sys -import urllib2 -import cStringIO -import zipfile -import json - -# Path constants. (All of these should be absolute paths.) -THIS_DIR = os.path.abspath(os.path.dirname(__file__)) -FLUTTER_DIR = os.path.abspath(os.path.join(THIS_DIR, '..', '..', '..')) -INSTALL_DIR = os.path.join(FLUTTER_DIR, 'third_party', 'android_support') - -def GetInstalledVersion(out_file_name): - version_file = os.path.join(INSTALL_DIR, out_file_name + '.stamp') - if not os.path.exists(version_file): - return None - with open(version_file) as f: - return f.read().strip() - -def getFile(url, out_file_name): - # Read latest version. - if url == GetInstalledVersion(out_file_name): - return - - downloaded_file = urllib2.urlopen(url).read() - if not os.path.exists(INSTALL_DIR): - os.mkdir(INSTALL_DIR) - - if (url.endswith('.aar')): - aar_zip = zipfile.ZipFile(cStringIO.StringIO(downloaded_file)) - with open(os.path.join(INSTALL_DIR, out_file_name), 'w') as f: - f.write(aar_zip.read('classes.jar')) - else: - with open(os.path.join(INSTALL_DIR, out_file_name), 'w') as f: - f.write(downloaded_file) - - # Write version as the last step. - with open(os.path.join(INSTALL_DIR, out_file_name + '.stamp'), 'w') as f: - f.write('%s\n' % url) - - -def main(): - with open (os.path.join(THIS_DIR, 'files.json')) as f: - files = json.load(f) - - for entry in files: - getFile(entry['url'], entry['out_file_name']) - -if __name__ == '__main__': - sys.exit(main()) diff --git a/tools/android_support/files.json b/tools/android_support/files.json deleted file mode 100644 index 6a6c1911bcc2a..0000000000000 --- a/tools/android_support/files.json +++ /dev/null @@ -1,65 +0,0 @@ -[ - { - "url": "https://dl.google.com/dl/android/maven2/android/arch/lifecycle/common/1.1.1/common-1.1.1.jar", - "out_file_name": "android_arch_lifecycle_common.jar", - "maven_dependency": "android.arch.lifecycle:common:1.1.1", - "provides": [ - "android.arch.lifecycle.Lifecycle", - "android.arch.lifecycle.LifecycleObserver", - "android.arch.lifecycle.LifecycleOwner" - ] - }, - { - "url": "https://dl.google.com/dl/android/maven2/android/arch/lifecycle/common-java8/1.1.1/common-java8-1.1.1.jar", - "out_file_name": "android_arch_lifecycle_common_java8.jar", - "maven_dependency": "android.arch.lifecycle:common-java8:1.1.1", - "provides": [ - "android.arch.lifecycle.DefaultLifecycleObserver" - ] - }, - { - "url": "https://dl.google.com/dl/android/maven2/android/arch/lifecycle/runtime/1.1.1/runtime-1.1.1.aar", - "out_file_name": "android_arch_lifecycle_runtime.jar", - "maven_dependency": "android.arch.lifecycle:runtime:1.1.1", - "provides": [ - "android.arch.lifecycle.LifecycleRegistry" - ] - }, - { - "url": "https://dl.google.com/dl/android/maven2/android/arch/lifecycle/viewmodel/1.1.1/viewmodel-1.1.1.aar", - "out_file_name": "android_arch_lifecycle_viewmodel.jar", - "maven_dependency": "android.arch.lifecycle:viewmodel:1.1.1", - "provides": [] - }, - { - "url": "https://dl.google.com/dl/android/maven2/com/android/support/support-fragment/28.0.0/support-fragment-28.0.0.aar", - "out_file_name": "android_support_fragment.jar", - "maven_dependency": "com.android.support:support-fragment:28.0.0", - "provides": [ - "android.support.v4.app.Fragment", - "android.support.v4.app.FragmentActivity" - ] - }, - { - "url": "https://dl.google.com/dl/android/maven2/com/android/support/support-annotations/28.0.0/support-annotations-28.0.0.jar", - "out_file_name": "android_support_annotations.jar", - "maven_dependency": "com.android.support:support-annotations:28.0.0", - "provides": [ - "android.support.annotation.CallSuper", - "android.support.annotation.FloatRange", - "android.support.annotation.IntDef", - "android.support.annotation.Keep", - "android.support.annotation.NonNull", - "android.support.annotation.Nullable", - "android.support.annotation.RequiresApi", - "android.support.annotation.UiThread", - "android.support.annotation.VisibleForTesting" - ] - }, - { - "url": "https://dl.google.com/dl/android/maven2/com/android/support/support-compat/28.0.0/support-compat-28.0.0.aar", - "out_file_name": "android_support_compat.jar", - "maven_dependency": "com.android.support:support-compat:28.0.0", - "provides": [] - } -] \ No newline at end of file diff --git a/tools/androidx/files.json b/tools/androidx/files.json new file mode 100644 index 0000000000000..e8939614a32b1 --- /dev/null +++ b/tools/androidx/files.json @@ -0,0 +1,53 @@ +[ + { + "url": "https://maven.google.com/androidx/lifecycle/lifecycle-common/2.2.0/lifecycle-common-2.2.0.jar", + "out_file_name": "androidx_lifecycle_common.jar", + "maven_dependency": "androidx.lifecycle:lifecycle-common:2.2.0", + "provides": [ + "androidx.lifecycle.Lifecycle", + "androidx.lifecycle.LifecycleObserver", + "androidx.lifecycle.LifecycleOwner" + ] + }, + { + "url": "https://maven.google.com/androidx/lifecycle/lifecycle-common-java8/2.2.0/lifecycle-common-java8-2.2.0.jar", + "out_file_name": "androidx_lifecycle_common_java8.jar", + "maven_dependency": "androidx.lifecycle:lifecycle-common-java8:2.2.0", + "provides": [ + "androidx.lifecycle.DefaultLifecycleObserver" + ] + }, + { + "url": "https://maven.google.com/androidx/lifecycle/lifecycle-runtime/2.2.0/lifecycle-runtime-2.2.0.aar", + "out_file_name": "androidx_lifecycle_runtime.aar", + "maven_dependency": "androidx.lifecycle:lifecycle-runtime:2.2.0", + "provides": [ + "androidx.lifecycle.LifecycleRegistry" + ] + }, + { + "url": "https://maven.google.com/androidx/fragment/fragment/1.1.0/fragment-1.1.0.aar", + "out_file_name": "androidx_fragment.aar", + "maven_dependency": "androidx.fragment:fragment:1.1.0", + "provides": [ + "androidx.fragment.app.Fragment", + "androidx.fragment.app.FragmentActivity" + ] + }, + { + "url": "https://maven.google.com/androidx/annotation/annotation/1.1.0/annotation-1.1.0.jar", + "out_file_name": "androidx_annotation.jar", + "maven_dependency": "androidx.annotation:annotation:1.1.0", + "provides": [ + "androidx.annotation.CallSuper", + "androidx.annotation.FloatRange", + "androidx.annotation.IntDef", + "androidx.annotation.Keep", + "androidx.annotation.NonNull", + "androidx.annotation.Nullable", + "androidx.annotation.RequiresApi", + "androidx.annotation.UiThread", + "androidx.annotation.VisibleForTesting" + ] + } +] diff --git a/tools/android_support/generate_pom_file.py b/tools/androidx/generate_pom_file.py similarity index 100% rename from tools/android_support/generate_pom_file.py rename to tools/androidx/generate_pom_file.py diff --git a/tools/gen_javadoc.py b/tools/gen_javadoc.py index 14c16203869e1..e0a0e913fbaf6 100755 --- a/tools/gen_javadoc.py +++ b/tools/gen_javadoc.py @@ -29,14 +29,7 @@ def main(): classpath = [ args.android_source_root, - args.third_party + '/android_support/android_support_compat.jar', - args.third_party + '/android_support/android_support_annotations.jar', - args.third_party + '/android_support/android_support_fragment.jar', - args.third_party + '/android_support/android_arch_lifecycle_common.jar', - args.third_party + '/android_support/android_arch_lifecycle_common_java8.jar', - args.third_party + '/android_support/android_arch_lifecycle_runtime.jar', - args.third_party + '/android_support/android_arch_lifecycle_viewmodel.jar', - args.third_party + '/android_tools/sdk/platforms/android-29/android.jar', + os.path.join(args.third_party, 'android_embedding_dependencies', 'lib', '*'), ] if args.build_config_path: classpath.append(args.build_config_path) diff --git a/tools/licenses/lib/main.dart b/tools/licenses/lib/main.dart index fc948e23134b8..fa622354a4bb0 100644 --- a/tools/licenses/lib/main.dart +++ b/tools/licenses/lib/main.dart @@ -1745,12 +1745,12 @@ class _RepositoryRootThirdPartyDirectory extends _RepositoryGenericThirdPartyDir && entry.name != 'markupsafe' // build-time only && entry.name != 'mockito' // only used by tests && entry.name != 'pymock' // presumably only used by tests - && entry.name != 'robolectric' // testing framework for android + && entry.name != 'android_embedding_dependencies' // testing framework for android && entry.name != 'yasm' // build-time dependency only && entry.name != 'binutils' // build-time dependency only && entry.name != 'instrumented_libraries' // unused according to chinmay && entry.name != 'android_tools' // excluded on advice - && entry.name != 'android_support' // build-time only + && entry.name != 'androidx' // build-time only && entry.name != 'googletest' // only used by tests && entry.name != 'skia' // treated as a separate component && entry.name != 'fontconfig' // not used in standard configurations