android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java          
|    3 +--
 android/source/src/java/org/mozilla/gecko/gfx/GLController.java               
|    2 +-
 android/source/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java           
|   10 ++++------
 android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java      
|    4 ++--
 android/source/src/java/org/mozilla/gecko/gfx/RenderControllerThread.java     
|    2 +-
 android/source/src/java/org/mozilla/gecko/gfx/ScrollbarLayer.java             
|    4 ++--
 android/source/src/java/org/mozilla/gecko/gfx/SimpleScaleGestureDetector.java 
|    4 ++--
 android/source/src/java/org/mozilla/gecko/gfx/SubTile.java                    
|    2 +-
 android/source/src/java/org/mozilla/gecko/gfx/TextureGenerator.java           
|    2 +-
 android/source/src/java/org/mozilla/gecko/gfx/TextureReaper.java              
|    4 ++--
 10 files changed, 17 insertions(+), 20 deletions(-)

New commits:
commit 113a30ca09aa366153926c51e7af62c60e6e336f
Author:     Michael Weghorn <[email protected]>
AuthorDate: Thu Nov 13 10:48:39 2025 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Fri Nov 14 11:56:00 2025 +0100

    android: Do more GeckoLayerClient initialization in ctor
    
    Pass the LayerView as a param to the ctor, instead
    of calling GeckoLayerView.setView separately afterwards.
    
    This also allows to make two more members final.
    
    Change-Id: Ic3ffcde590a84fec4413ef6225aa8417e3960f84
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193950
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git 
a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java 
b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
index 63e7e8a314f4..8e8cf3208cba 100644
--- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -150,9 +150,8 @@ public class LibreOfficeMainActivity extends 
AppCompatActivity implements Shared
         loKitThread = new LOKitThread(this);
         loKitThread.start();
 
-        mLayerClient = new GeckoLayerClient(this);
         LayerView layerView = findViewById(R.id.layer_view);
-        mLayerClient.setView(layerView);
+        mLayerClient = new GeckoLayerClient(this, layerView);
         layerView.setInputConnectionHandler(new LOKitInputConnectionHandler());
         mLayerClient.notifyReady();
 
diff --git 
a/android/source/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java 
b/android/source/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java
index b5b4e26a7294..746e758780ef 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/GeckoLayerClient.java
@@ -47,11 +47,11 @@ public class GeckoLayerClient implements PanZoomTarget {
 
     private boolean mIsReady;
 
-    private PanZoomController mPanZoomController;
-    private LayerView mView;
+    private final PanZoomController mPanZoomController;
+    private final LayerView mView;
     private final DisplayPortCalculator mDisplayPortCalculator;
 
-    public GeckoLayerClient(LibreOfficeMainActivity context) {
+    public GeckoLayerClient(LibreOfficeMainActivity context, LayerView view ) {
         // we can fill these in with dummy values because they are always 
written
         // to before being read
         mContext = context;
@@ -62,11 +62,9 @@ public class GeckoLayerClient implements PanZoomTarget {
         mForceRedraw = true;
         DisplayMetrics displayMetrics = 
context.getResources().getDisplayMetrics();
         mViewportMetrics = new ImmutableViewportMetrics(displayMetrics);
-    }
 
-    public void setView(LayerView view) {
         mView = view;
-        mPanZoomController = PanZoomController.Factory.create(mContext, this, 
view);
+        mPanZoomController = PanZoomController.Factory.create(mContext, this, 
mView);
         mView.connect(this);
     }
 
commit c88830d86c6286239214f57b541c1c29fd93c25a
Author:     Michael Weghorn <[email protected]>
AuthorDate: Wed Nov 12 23:52:40 2025 +0100
Commit:     Michael Weghorn <[email protected]>
CommitDate: Fri Nov 14 11:55:50 2025 +0100

    android: Make more class members final
    
    ... as suggested by Android Studio.
    
    Change-Id: I35ba756a684ed20c124b3e5805b58494a5905119
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193932
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <[email protected]>

diff --git a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java 
b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
index 83ae5d77b7c9..1ed110320b04 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/GLController.java
@@ -16,7 +16,7 @@ public class GLController {
     private static final int EGL_CONTEXT_CLIENT_VERSION = 0x3098;
     private static final String LOGTAG = "GeckoGLController";
 
-    private LayerView mView;
+    private final LayerView mView;
     private int mGLVersion;
     private int mWidth, mHeight;
 
diff --git 
a/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java 
b/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java
index 9e152fd2bb16..0782f2e11d2b 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/JavaPanZoomController.java
@@ -525,8 +525,8 @@ class JavaPanZoomController
          * The viewport metrics that represent the start and end of the 
bounce-back animation,
          * respectively.
          */
-        private ImmutableViewportMetrics mBounceStartMetrics;
-        private ImmutableViewportMetrics mBounceEndMetrics;
+        private final ImmutableViewportMetrics mBounceStartMetrics;
+        private final ImmutableViewportMetrics mBounceEndMetrics;
 
         BounceRunnable(ImmutableViewportMetrics startMetrics, 
ImmutableViewportMetrics endMetrics) {
             mBounceStartMetrics = startMetrics;
diff --git 
a/android/source/src/java/org/mozilla/gecko/gfx/RenderControllerThread.java 
b/android/source/src/java/org/mozilla/gecko/gfx/RenderControllerThread.java
index 4a205123ed4b..1be81b02c947 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/RenderControllerThread.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/RenderControllerThread.java
@@ -9,7 +9,7 @@ import java.util.concurrent.LinkedBlockingQueue;
  * processed and delegated by this thread.
  */
 public class RenderControllerThread extends Thread implements 
LayerView.Listener {
-    private LinkedBlockingQueue<RenderCommand> queue = new 
LinkedBlockingQueue<RenderCommand>();
+    private final LinkedBlockingQueue<RenderCommand> queue = new 
LinkedBlockingQueue<RenderCommand>();
     private GLController controller;
     private boolean renderQueued = false;
     private int width;
diff --git a/android/source/src/java/org/mozilla/gecko/gfx/ScrollbarLayer.java 
b/android/source/src/java/org/mozilla/gecko/gfx/ScrollbarLayer.java
index 7ef8ff020610..d1d59a53278d 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/ScrollbarLayer.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/ScrollbarLayer.java
@@ -24,7 +24,7 @@ import java.nio.FloatBuffer;
  * Draws a small rect. This is scaled to become a scrollbar.
  */
 public class ScrollbarLayer extends TileLayer {
-    private static String LOGTAG = LayerView.class.getName();
+    private static final String LOGTAG = LayerView.class.getName();
     public static final long FADE_DELAY = 500; // milliseconds before fade-out 
starts
     private static final float FADE_AMOUNT = 0.03f; // how much (as a percent) 
the scrollbar should fade per frame
 
@@ -37,7 +37,7 @@ public class ScrollbarLayer extends TileLayer {
     private final Canvas mCanvas;
     private float mOpacity;
 
-    private LayerRenderer mRenderer;
+    private final LayerRenderer mRenderer;
     private int mProgram;
     private int mPositionHandle;
     private int mTextureHandle;
diff --git 
a/android/source/src/java/org/mozilla/gecko/gfx/SimpleScaleGestureDetector.java 
b/android/source/src/java/org/mozilla/gecko/gfx/SimpleScaleGestureDetector.java
index e89015b5ed8c..4aa0e2634555 100644
--- 
a/android/source/src/java/org/mozilla/gecko/gfx/SimpleScaleGestureDetector.java
+++ 
b/android/source/src/java/org/mozilla/gecko/gfx/SimpleScaleGestureDetector.java
@@ -36,12 +36,12 @@ import java.util.Stack;
 public class SimpleScaleGestureDetector {
     private static final String LOGTAG = "ScaleGestureDetector";
 
-    private SimpleScaleGestureListener mListener;
+    private final SimpleScaleGestureListener mListener;
     private long mLastEventTime;
     private boolean mScaleResult;
 
     /* Information about all pointers that are down. */
-    private LinkedList<PointerInfo> mPointerInfo;
+    private final LinkedList<PointerInfo> mPointerInfo;
 
     /** Creates a new gesture detector with the given listener. */
     public SimpleScaleGestureDetector(SimpleScaleGestureListener listener) {
diff --git a/android/source/src/java/org/mozilla/gecko/gfx/SubTile.java 
b/android/source/src/java/org/mozilla/gecko/gfx/SubTile.java
index d2b0bf9e8114..dda5813f2ed4 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/SubTile.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/SubTile.java
@@ -18,7 +18,7 @@ import java.nio.ByteBuffer;
 import java.nio.FloatBuffer;
 
 public class SubTile extends Layer {
-    private static String LOGTAG = SubTile.class.getSimpleName();
+    private static final String LOGTAG = SubTile.class.getSimpleName();
     public final TileIdentifier id;
 
     private final RectF mBounds;
diff --git 
a/android/source/src/java/org/mozilla/gecko/gfx/TextureGenerator.java 
b/android/source/src/java/org/mozilla/gecko/gfx/TextureGenerator.java
index bccd8968c81f..583333c1186c 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/TextureGenerator.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/TextureGenerator.java
@@ -19,7 +19,7 @@ public class TextureGenerator {
 
     private static TextureGenerator sSharedInstance;
 
-    private ArrayBlockingQueue<Integer> mTextureIds;
+    private final ArrayBlockingQueue<Integer> mTextureIds;
     private EGLContext mContext;
 
     private TextureGenerator() {
diff --git a/android/source/src/java/org/mozilla/gecko/gfx/TextureReaper.java 
b/android/source/src/java/org/mozilla/gecko/gfx/TextureReaper.java
index 1a8a50459774..d01793448bf4 100644
--- a/android/source/src/java/org/mozilla/gecko/gfx/TextureReaper.java
+++ b/android/source/src/java/org/mozilla/gecko/gfx/TextureReaper.java
@@ -15,7 +15,7 @@ import java.util.ArrayList;
  */
 public class TextureReaper {
     private static TextureReaper sSharedInstance;
-    private ArrayList<Integer> mDeadTextureIDs = new ArrayList<Integer>();
+    private final ArrayList<Integer> mDeadTextureIDs = new 
ArrayList<Integer>();
     private static final String LOGTAG = TextureReaper.class.getSimpleName();
 
     private TextureReaper() {
@@ -59,4 +59,4 @@ public class TextureReaper {
 
         GLES20.glDeleteTextures(deadTextureIDs.length, deadTextureIDs, 0);
     }
-}
\ No newline at end of file
+}

Reply via email to