From fa15a465eb69b2ddec1d876368fb18b1c2958918 Mon Sep 17 00:00:00 2001 From: Assam Boudjelthia Date: Sat, 11 Nov 2023 02:48:04 +0200 Subject: [PATCH] Android: cleanup unused java imports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Get rid of all unused java import calls. Task-number: QTBUG-118077 Change-Id: I9755fafd7edce958187b7e8c9688f2f6b7b59645 Reviewed-by: Tinja Paavoseppä --- .../qtproject/qt/android/CursorHandle.java | 15 ++++++-------- .../qtproject/qt/android/EditPopupMenu.java | 18 ++++------------- .../qtproject/qt/android/ExtractStyle.java | 1 - .../org/qtproject/qt/android/QtLayout.java | 11 ---------- .../qt/android/QtMessageDialogHelper.java | 3 --- .../org/qtproject/qt/android/QtSurface.java | 4 ---- .../QtAccessibilityDelegate.java | 20 ++++++++----------- .../qtproject/qt/android/extras/QtNative.java | 2 -- 8 files changed, 18 insertions(+), 56 deletions(-) diff --git a/src/android/jar/src/org/qtproject/qt/android/CursorHandle.java b/src/android/jar/src/org/qtproject/qt/android/CursorHandle.java index d1bc72f9ff..1091b90cf0 100644 --- a/src/android/jar/src/org/qtproject/qt/android/CursorHandle.java +++ b/src/android/jar/src/org/qtproject/qt/android/CursorHandle.java @@ -3,20 +3,17 @@ package org.qtproject.qt.android; +import android.app.Activity; import android.content.Context; -import android.os.Bundle; -import android.util.DisplayMetrics; -import android.view.LayoutInflater; -import android.view.View; -import android.widget.LinearLayout; -import android.widget.ImageView; import android.content.res.TypedArray; import android.graphics.drawable.Drawable; -import android.view.MotionEvent; -import android.widget.PopupWindow; -import android.app.Activity; +import android.util.DisplayMetrics; import android.util.TypedValue; +import android.view.MotionEvent; +import android.view.View; import android.view.ViewTreeObserver; +import android.widget.ImageView; +import android.widget.PopupWindow; /* This view represents one of the handle (selection or cursor handle) */ class CursorView extends ImageView diff --git a/src/android/jar/src/org/qtproject/qt/android/EditPopupMenu.java b/src/android/jar/src/org/qtproject/qt/android/EditPopupMenu.java index 24c82a971f..6efb625ebf 100644 --- a/src/android/jar/src/org/qtproject/qt/android/EditPopupMenu.java +++ b/src/android/jar/src/org/qtproject/qt/android/EditPopupMenu.java @@ -4,24 +4,14 @@ package org.qtproject.qt.android; +import android.R; +import android.app.Activity; import android.content.Context; import android.graphics.Point; -import android.os.Bundle; -import android.util.Log; -import android.view.LayoutInflater; import android.view.View; -import android.widget.LinearLayout; -import android.widget.ImageView; -import android.content.res.TypedArray; -import android.graphics.drawable.Drawable; -import android.view.MotionEvent; -import android.widget.PopupWindow; -import android.app.Activity; -import android.view.ViewTreeObserver; -import android.view.View.OnClickListener; -import android.view.ViewGroup.LayoutParams; import android.view.ViewGroup; -import android.R; +import android.view.ViewTreeObserver; +import android.widget.PopupWindow; // Helper class that manages a cursor or selection handle public class EditPopupMenu implements ViewTreeObserver.OnPreDrawListener, View.OnLayoutChangeListener, diff --git a/src/android/jar/src/org/qtproject/qt/android/ExtractStyle.java b/src/android/jar/src/org/qtproject/qt/android/ExtractStyle.java index 67e93a6e29..e4bc395d3a 100644 --- a/src/android/jar/src/org/qtproject/qt/android/ExtractStyle.java +++ b/src/android/jar/src/org/qtproject/qt/android/ExtractStyle.java @@ -36,7 +36,6 @@ import android.graphics.drawable.ScaleDrawable; import android.graphics.drawable.StateListDrawable; import android.graphics.drawable.VectorDrawable; import android.os.Build; -import android.os.Bundle; import android.util.AttributeSet; import android.util.Log; import android.util.TypedValue; diff --git a/src/android/jar/src/org/qtproject/qt/android/QtLayout.java b/src/android/jar/src/org/qtproject/qt/android/QtLayout.java index 2f2a3622c5..3e71da26d3 100644 --- a/src/android/jar/src/org/qtproject/qt/android/QtLayout.java +++ b/src/android/jar/src/org/qtproject/qt/android/QtLayout.java @@ -6,20 +6,9 @@ package org.qtproject.qt.android; import android.app.Activity; import android.content.Context; -import android.graphics.Rect; -import android.os.Build; -import android.util.Log; import android.util.AttributeSet; -import android.util.DisplayMetrics; -import android.view.Display; import android.view.View; import android.view.ViewGroup; -import android.view.WindowInsets; -import android.view.WindowManager; -import android.graphics.Insets; -import android.view.WindowMetrics; -import android.content.res.Configuration; -import android.content.res.Resources; public class QtLayout extends ViewGroup { diff --git a/src/android/jar/src/org/qtproject/qt/android/QtMessageDialogHelper.java b/src/android/jar/src/org/qtproject/qt/android/QtMessageDialogHelper.java index 26696577b1..b53ec13369 100644 --- a/src/android/jar/src/org/qtproject/qt/android/QtMessageDialogHelper.java +++ b/src/android/jar/src/org/qtproject/qt/android/QtMessageDialogHelper.java @@ -11,19 +11,16 @@ import android.content.DialogInterface; import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.drawable.Drawable; -import android.os.Build; import android.text.ClipboardManager; import android.text.Html; import android.text.Spanned; import android.util.TypedValue; import android.view.View; import android.widget.Button; -import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.ScrollView; import android.widget.TextView; -import android.widget.Toast; import java.util.ArrayList; diff --git a/src/android/jar/src/org/qtproject/qt/android/QtSurface.java b/src/android/jar/src/org/qtproject/qt/android/QtSurface.java index 13ccbd93d4..ed14e612c4 100644 --- a/src/android/jar/src/org/qtproject/qt/android/QtSurface.java +++ b/src/android/jar/src/org/qtproject/qt/android/QtSurface.java @@ -4,7 +4,6 @@ package org.qtproject.qt.android; -import android.app.Activity; import android.content.Context; import android.graphics.PixelFormat; import android.view.GestureDetector; @@ -12,9 +11,6 @@ import android.view.MotionEvent; import android.view.SurfaceHolder; import android.view.SurfaceView; -import java.lang.reflect.Constructor; -import java.lang.reflect.Method; - public class QtSurface extends SurfaceView implements SurfaceHolder.Callback { private GestureDetector m_gestureDetector; diff --git a/src/android/jar/src/org/qtproject/qt/android/accessibility/QtAccessibilityDelegate.java b/src/android/jar/src/org/qtproject/qt/android/accessibility/QtAccessibilityDelegate.java index 35cfcdb31f..4043746db6 100644 --- a/src/android/jar/src/org/qtproject/qt/android/accessibility/QtAccessibilityDelegate.java +++ b/src/android/jar/src/org/qtproject/qt/android/accessibility/QtAccessibilityDelegate.java @@ -4,27 +4,23 @@ package org.qtproject.qt.android.accessibility; -import android.accessibilityservice.AccessibilityService; import android.app.Activity; +import android.content.Context; import android.graphics.Rect; import android.os.Build; import android.os.Bundle; +import android.system.Os; +import android.text.TextUtils; import android.util.Log; +import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.ViewParent; -import android.text.TextUtils; - -import android.view.accessibility.*; +import android.view.accessibility.AccessibilityEvent; +import android.view.accessibility.AccessibilityManager; +import android.view.accessibility.AccessibilityNodeInfo; import android.view.accessibility.AccessibilityNodeInfo.CollectionInfo; -import android.view.MotionEvent; -import android.view.View.OnHoverListener; - -import android.content.Context; -import android.system.Os; - -import java.util.LinkedList; -import java.util.List; +import android.view.accessibility.AccessibilityNodeProvider; import org.qtproject.qt.android.QtActivityDelegate; import org.qtproject.qt.android.QtNative; diff --git a/src/android/jar/src/org/qtproject/qt/android/extras/QtNative.java b/src/android/jar/src/org/qtproject/qt/android/extras/QtNative.java index 3f847b0bb3..658eae87a1 100644 --- a/src/android/jar/src/org/qtproject/qt/android/extras/QtNative.java +++ b/src/android/jar/src/org/qtproject/qt/android/extras/QtNative.java @@ -3,8 +3,6 @@ package org.qtproject.qt.android.extras; -import android.content.ComponentName; -import android.content.ServiceConnection; import android.os.IBinder; import android.os.Parcel;