Android: use final keyword for Java class memebers when appropriate
Task-number: QTBUG-118077 Change-Id: Id63569fc59c5d16f41aad92181ae1794cbb6fbc5 Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io> Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
This commit is contained in:
parent
833e7c1629
commit
c8bf35f4e4
@ -18,7 +18,7 @@ import android.widget.PopupWindow;
|
||||
/* This view represents one of the handle (selection or cursor handle) */
|
||||
class CursorView extends ImageView
|
||||
{
|
||||
private CursorHandle mHandle;
|
||||
private final CursorHandle mHandle;
|
||||
// The coordinare which where clicked
|
||||
private float m_offsetX;
|
||||
private float m_offsetY;
|
||||
@ -66,18 +66,18 @@ class CursorView extends ImageView
|
||||
// Helper class that manages a cursor or selection handle
|
||||
public class CursorHandle implements ViewTreeObserver.OnPreDrawListener
|
||||
{
|
||||
private View m_layout = null;
|
||||
private final View m_layout;
|
||||
private CursorView m_cursorView = null;
|
||||
private PopupWindow m_popup = null;
|
||||
private int m_id;
|
||||
private int m_attr;
|
||||
private Activity m_activity;
|
||||
private final int m_id;
|
||||
private final int m_attr;
|
||||
private final Activity m_activity;
|
||||
private int m_posX = 0;
|
||||
private int m_posY = 0;
|
||||
private int m_lastX;
|
||||
private int m_lastY;
|
||||
int tolerance;
|
||||
private boolean m_rtl;
|
||||
private final boolean m_rtl;
|
||||
int m_yShift;
|
||||
|
||||
public CursorHandle(Activity activity, View layout, int id, int attr, boolean rtl) {
|
||||
|
@ -17,10 +17,10 @@ import android.widget.PopupWindow;
|
||||
public class EditPopupMenu implements ViewTreeObserver.OnPreDrawListener, View.OnLayoutChangeListener,
|
||||
EditContextView.OnClickListener
|
||||
{
|
||||
private View m_layout = null;
|
||||
private EditContextView m_view = null;
|
||||
private final View m_layout;
|
||||
private final EditContextView m_view;
|
||||
private PopupWindow m_popup = null;
|
||||
private Activity m_activity;
|
||||
private final Activity m_activity;
|
||||
private int m_posX;
|
||||
private int m_posY;
|
||||
private int m_buttons;
|
||||
|
@ -54,7 +54,7 @@ public class QtActivityDelegate
|
||||
private QtAccessibilityDelegate m_accessibilityDelegate = null;
|
||||
private final QtDisplayManager m_displayManager = new QtDisplayManager();
|
||||
|
||||
private QtInputDelegate m_inputDelegate = null;
|
||||
private final QtInputDelegate m_inputDelegate;
|
||||
|
||||
QtActivityDelegate(Activity activity)
|
||||
{
|
||||
|
@ -92,7 +92,7 @@ public class QtInputConnection extends BaseInputConnection
|
||||
void onSendKeyEventDefaultCase();
|
||||
}
|
||||
|
||||
private QtEditText m_view = null;
|
||||
private final QtEditText m_view;
|
||||
|
||||
private void setClosing(boolean closing)
|
||||
{
|
||||
|
@ -38,8 +38,8 @@ public class QtInputDelegate {
|
||||
public static native void handleLocationChanged(int id, int x, int y);
|
||||
// handle methods
|
||||
|
||||
private QtEditText m_editText = null;
|
||||
private InputMethodManager m_imm = null;
|
||||
private final QtEditText m_editText;
|
||||
private final InputMethodManager m_imm;
|
||||
|
||||
private boolean m_keyboardIsVisible = false;
|
||||
private boolean m_isKeyboardHidingAnimationOngoing = false;
|
||||
|
@ -38,7 +38,7 @@ class ButtonStruct implements View.OnClickListener
|
||||
m_text = Html.fromHtml(text);
|
||||
}
|
||||
QtMessageDialogHelper m_dialog;
|
||||
private int m_id;
|
||||
private final int m_id;
|
||||
Spanned m_text;
|
||||
|
||||
@Override
|
||||
@ -349,7 +349,7 @@ public class QtMessageDialogHelper
|
||||
m_handler = 0;
|
||||
}
|
||||
|
||||
private Activity m_activity;
|
||||
private final Activity m_activity;
|
||||
private int m_standardIcon = 0;
|
||||
private Spanned m_title, m_text, m_informativeText, m_detailedText;
|
||||
private ArrayList<ButtonStruct> m_buttonsList;
|
||||
|
@ -13,7 +13,7 @@ import android.view.SurfaceView;
|
||||
|
||||
public class QtSurface extends SurfaceView implements SurfaceHolder.Callback
|
||||
{
|
||||
private GestureDetector m_gestureDetector;
|
||||
private final GestureDetector m_gestureDetector;
|
||||
private Object m_accessibilityDelegate = null;
|
||||
|
||||
public QtSurface(Context context, int id, boolean onTop, int imageDepth)
|
||||
|
@ -7,9 +7,9 @@ import java.util.ArrayList;
|
||||
import java.util.concurrent.Semaphore;
|
||||
|
||||
public class QtThread {
|
||||
private ArrayList<Runnable> m_pendingRunnables = new ArrayList<Runnable>();
|
||||
private final ArrayList<Runnable> m_pendingRunnables = new ArrayList<Runnable>();
|
||||
private boolean m_exit = false;
|
||||
private Thread m_qtThread = new Thread(new Runnable() {
|
||||
private final Thread m_qtThread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
while (!m_exit) {
|
||||
|
@ -38,10 +38,10 @@ public class QtAccessibilityDelegate extends View.AccessibilityDelegate
|
||||
private static final String DEFAULT_CLASS_NAME = "$VirtualChild";
|
||||
|
||||
private View m_view = null;
|
||||
private AccessibilityManager m_manager;
|
||||
private QtActivityDelegate m_activityDelegate;
|
||||
private Activity m_activity;
|
||||
private ViewGroup m_layout;
|
||||
private final AccessibilityManager m_manager;
|
||||
private final QtActivityDelegate m_activityDelegate;
|
||||
private final Activity m_activity;
|
||||
private final ViewGroup m_layout;
|
||||
|
||||
// The accessible object that currently has the "accessibility focus"
|
||||
// usually indicated by a yellow rectangle on screen.
|
||||
@ -453,7 +453,7 @@ public class QtAccessibilityDelegate extends View.AccessibilityDelegate
|
||||
return node;
|
||||
}
|
||||
|
||||
private AccessibilityNodeProvider m_nodeProvider = new AccessibilityNodeProvider()
|
||||
private final AccessibilityNodeProvider m_nodeProvider = new AccessibilityNodeProvider()
|
||||
{
|
||||
@Override
|
||||
public AccessibilityNodeInfo createAccessibilityNodeInfo(int virtualViewId)
|
||||
|
Loading…
Reference in New Issue
Block a user