Dialer: Deal with missing or superflous finals and statics

Change-Id: Iefb92e80d285e297566ec1eeaf50de8a31158657
diff --git a/java/com/android/contacts/common/GroupMetaData.java b/java/com/android/contacts/common/GroupMetaData.java
index 6afb2a4..506fe44 100644
--- a/java/com/android/contacts/common/GroupMetaData.java
+++ b/java/com/android/contacts/common/GroupMetaData.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2010 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,13 +22,13 @@
  */
 public final class GroupMetaData {
 
-  private String mAccountName;
-  private String mAccountType;
-  private String mDataSet;
-  private long mGroupId;
-  private String mTitle;
-  private boolean mDefaultGroup;
-  private boolean mFavorites;
+  private final String mAccountName;
+  private final String mAccountType;
+  private final String mDataSet;
+  private final long mGroupId;
+  private final String mTitle;
+  private final boolean mDefaultGroup;
+  private final boolean mFavorites;
 
   public GroupMetaData(
       String accountName,
diff --git a/java/com/android/contacts/common/database/EmptyCursor.java b/java/com/android/contacts/common/database/EmptyCursor.java
index c2b24cd..768302e 100644
--- a/java/com/android/contacts/common/database/EmptyCursor.java
+++ b/java/com/android/contacts/common/database/EmptyCursor.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2012 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -27,7 +28,7 @@
  */
 public final class EmptyCursor extends AbstractCursor {
 
-  private String[] mColumns;
+  private final String[] mColumns;
 
   public EmptyCursor(String[] columns) {
     this.mColumns = columns;
diff --git a/java/com/android/contacts/common/list/ContactListFilter.java b/java/com/android/contacts/common/list/ContactListFilter.java
index 1a03bb6..39bd4a6 100644
--- a/java/com/android/contacts/common/list/ContactListFilter.java
+++ b/java/com/android/contacts/common/list/ContactListFilter.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2010 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -136,7 +137,7 @@
     return new ContactListFilter(filterType, accountType, accountName, dataSet, null);
   }
 
-  public static final String filterTypeToString(int filterType) {
+  public static String filterTypeToString(int filterType) {
     switch (filterType) {
       case FILTER_TYPE_DEFAULT:
         return "FILTER_TYPE_DEFAULT";
diff --git a/java/com/android/contacts/common/list/ViewPagerTabStrip.java b/java/com/android/contacts/common/list/ViewPagerTabStrip.java
index 7a9e506..329b72d 100644
--- a/java/com/android/contacts/common/list/ViewPagerTabStrip.java
+++ b/java/com/android/contacts/common/list/ViewPagerTabStrip.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2014 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -29,7 +30,7 @@
 public class ViewPagerTabStrip extends LinearLayout {
 
   private final Paint mSelectedUnderlinePaint;
-  private int mSelectedUnderlineThickness;
+  private final int mSelectedUnderlineThickness;
   private int mIndexForSelection;
   private float mSelectionOffset;
 
diff --git a/java/com/android/contacts/common/list/ViewPagerTabs.java b/java/com/android/contacts/common/list/ViewPagerTabs.java
index 2207936..acbe1e5 100644
--- a/java/com/android/contacts/common/list/ViewPagerTabs.java
+++ b/java/com/android/contacts/common/list/ViewPagerTabs.java
@@ -74,7 +74,7 @@
   ViewPager mPager;
   int mPrevSelected = -1;
   int mSidePadding;
-  private ViewPagerTabStrip mTabStrip;
+  private final ViewPagerTabStrip mTabStrip;
   private int[] mTabIcons;
   // For displaying the unread count next to the tab icon.
   private int[] mUnreadCounts;
diff --git a/java/com/android/contacts/common/model/AccountTypeManager.java b/java/com/android/contacts/common/model/AccountTypeManager.java
index ee23534..f5b113c 100644
--- a/java/com/android/contacts/common/model/AccountTypeManager.java
+++ b/java/com/android/contacts/common/model/AccountTypeManager.java
@@ -218,7 +218,7 @@
   private final AtomicBoolean mInvitablesTaskIsRunning = new AtomicBoolean(false);
 
   private final Handler mMainThreadHandler = new Handler(Looper.getMainLooper());
-  private Context mContext;
+  private final Context mContext;
   private final Runnable mCheckFilterValidityRunnable =
       new Runnable() {
         @Override
@@ -226,17 +226,17 @@
           ContactListFilterController.getInstance(mContext).checkFilterValidity(true);
         }
       };
-  private AccountManager mAccountManager;
-  private AccountType mFallbackAccountType;
+  private final AccountManager mAccountManager;
+  private final AccountType mFallbackAccountType;
   private List<AccountWithDataSet> mAccounts = new ArrayList<>();
   private List<AccountWithDataSet> mContactWritableAccounts = new ArrayList<>();
   private List<AccountWithDataSet> mGroupWritableAccounts = new ArrayList<>();
   private Map<AccountTypeWithDataSet, AccountType> mAccountTypesWithDataSets = new ArrayMap<>();
   private Map<AccountTypeWithDataSet, AccountType> mInvitableAccountTypes =
       EMPTY_UNMODIFIABLE_ACCOUNT_TYPE_MAP;
-  private HandlerThread mListenerThread;
-  private Handler mListenerHandler;
-  private BroadcastReceiver mBroadcastReceiver =
+  private final HandlerThread mListenerThread;
+  private final Handler mListenerHandler;
+  private final BroadcastReceiver mBroadcastReceiver =
       new BroadcastReceiver() {
 
         @Override
diff --git a/java/com/android/contacts/common/model/ContactLoader.java b/java/com/android/contacts/common/model/ContactLoader.java
index b644ccf..3f8e8f9 100644
--- a/java/com/android/contacts/common/model/ContactLoader.java
+++ b/java/com/android/contacts/common/model/ContactLoader.java
@@ -84,10 +84,10 @@
   private final Uri mRequestedUri;
   private final Set<Long> mNotifiedRawContactIds = Sets.newHashSet();
   private Uri mLookupUri;
-  private boolean mLoadGroupMetaData;
-  private boolean mLoadInvitableAccountTypes;
-  private boolean mPostViewNotification;
-  private boolean mComputeFormattedPhoneNumber;
+  private final boolean mLoadGroupMetaData;
+  private final boolean mLoadInvitableAccountTypes;
+  private final boolean mPostViewNotification;
+  private final boolean mComputeFormattedPhoneNumber;
   private Contact mContact;
   private ForceLoadContentObserver mObserver;
 
diff --git a/java/com/android/contacts/common/model/account/AccountType.java b/java/com/android/contacts/common/model/account/AccountType.java
index 107cefe..3e659e5 100644
--- a/java/com/android/contacts/common/model/account/AccountType.java
+++ b/java/com/android/contacts/common/model/account/AccountType.java
@@ -52,7 +52,7 @@
 
   private static final String TAG = "AccountType";
   /** {@link Comparator} to sort by {@link DataKind#weight}. */
-  private static Comparator<DataKind> sWeightComparator =
+  private final static Comparator<DataKind> sWeightComparator =
           Comparator.comparingInt(object -> object.weight);
   /** The {@link RawContacts#ACCOUNT_TYPE} these constraints apply to. */
   public String accountType = null;
@@ -293,8 +293,8 @@
    */
   public static class EditType {
 
-    public int rawValue;
-    public int labelRes;
+    public final int rawValue;
+    public final int labelRes;
     public boolean secondary;
     /**
      * The number of entries allowed for the type. -1 if not specified.
@@ -385,8 +385,8 @@
    */
   public static final class EditField {
 
-    public String column;
-    public int titleRes;
+    public final String column;
+    public final int titleRes;
     public int inputType;
     public int minLines;
     public boolean optional;
diff --git a/java/com/android/contacts/common/widget/SelectPhoneAccountDialogFragment.java b/java/com/android/contacts/common/widget/SelectPhoneAccountDialogFragment.java
index a304862..b4d7b82 100644
--- a/java/com/android/contacts/common/widget/SelectPhoneAccountDialogFragment.java
+++ b/java/com/android/contacts/common/widget/SelectPhoneAccountDialogFragment.java
@@ -216,7 +216,7 @@
   static class SelectAccountListAdapter
       extends ArrayAdapter<SelectPhoneAccountDialogOptions.Entry> {
 
-    private int mResId;
+    private final int mResId;
     private final SelectPhoneAccountDialogOptions options;
 
     SelectAccountListAdapter(
diff --git a/java/com/android/dialer/app/AccountSelectionActivity.java b/java/com/android/dialer/app/AccountSelectionActivity.java
index 34e901d..3f037a8 100644
--- a/java/com/android/dialer/app/AccountSelectionActivity.java
+++ b/java/com/android/dialer/app/AccountSelectionActivity.java
@@ -62,7 +62,7 @@
   private String number;
   private CallInitiationType.Type initiationType;
 
-  private SelectPhoneAccountDialogFragment.SelectPhoneAccountListener listener =
+  private final SelectPhoneAccountDialogFragment.SelectPhoneAccountListener listener =
       new SelectPhoneAccountDialogFragment.SelectPhoneAccountListener() {
     @Override
     public void onPhoneAccountSelected(PhoneAccountHandle selectedAccountHandle,
diff --git a/java/com/android/dialer/app/calllog/CallLogAdapter.java b/java/com/android/dialer/app/calllog/CallLogAdapter.java
index 09f3b96..d4f16b2 100644
--- a/java/com/android/dialer/app/calllog/CallLogAdapter.java
+++ b/java/com/android/dialer/app/calllog/CallLogAdapter.java
@@ -124,7 +124,7 @@
   /** Helper to group call log entries. */
   private final CallLogGroupBuilder callLogGroupBuilder;
 
-  private ContactInfoCache contactInfoCache;
+  private final ContactInfoCache contactInfoCache;
   // Tracks the position of the currently expanded list item.
   private int currentlyExpandedPosition = RecyclerView.NO_POSITION;
   // Tracks the rowId of the currently expanded list item, so the position can be updated if there
@@ -384,7 +384,7 @@
    * if removing an item, it will be shown as an invisible view. This simplifies the calculation of
    * item position.
    */
-  @NonNull private Set<Long> hiddenRowIds = new ArraySet<>();
+  @NonNull private final Set<Long> hiddenRowIds = new ArraySet<>();
   /**
    * Holds a list of URIs that are pending deletion or undo. If the activity ends before the undo
    * timeout, all of the pending URIs will be deleted.
@@ -395,7 +395,7 @@
    */
   @NonNull private final Set<Uri> hiddenItemUris = new ArraySet<>();
 
-  private CallLogListItemViewHolder.OnClickListener blockReportSpamListener;
+  private final CallLogListItemViewHolder.OnClickListener blockReportSpamListener;
 
   /**
    * Map, keyed by call ID, used to track the callback action for a call. Calls associated with the
diff --git a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java
index 6858df2..08c5b30 100644
--- a/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java
+++ b/java/com/android/dialer/app/calllog/CallLogListItemViewHolder.java
@@ -151,8 +151,8 @@
   public View detailsButtonView;
   public View callWithNoteButtonView;
   public View sendVoicemailButtonView;
-  public ImageView workIconView;
-  public ImageView checkBoxView;
+  public final ImageView workIconView;
+  public final ImageView checkBoxView;
   /**
    * The row Id for the first call associated with the call log entry. Used as a key for the map
    * used to track which call log entries have the action button section expanded.
@@ -218,7 +218,7 @@
   /** Whether the current log entry is a spam number or not. */
   public boolean isSpam;
 
-  private View.OnClickListener expandCollapseListener;
+  private final View.OnClickListener expandCollapseListener;
   private final OnActionModeStateChangedListener onActionModeStateChangedListener;
   private final View.OnLongClickListener longPressListener;
   private boolean voicemailPrimaryActionButtonClicked;
diff --git a/java/com/android/dialer/app/calllog/GroupingListAdapter.java b/java/com/android/dialer/app/calllog/GroupingListAdapter.java
index c4bbf80..e1a395e 100644
--- a/java/com/android/dialer/app/calllog/GroupingListAdapter.java
+++ b/java/com/android/dialer/app/calllog/GroupingListAdapter.java
@@ -34,7 +34,7 @@
  */
 abstract class GroupingListAdapter extends RecyclerView.Adapter {
 
-  protected ContentObserver changeObserver =
+  protected final ContentObserver changeObserver =
       new ContentObserver(new Handler()) {
         @Override
         public boolean deliverSelfNotifications() {
@@ -46,7 +46,7 @@
           onContentChanged();
         }
       };
-  protected DataSetObserver dataSetObserver =
+  protected final DataSetObserver dataSetObserver =
       new DataSetObserver() {
         @Override
         public void onChanged() {
diff --git a/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java b/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java
index 1706b89..fee98a2 100644
--- a/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java
+++ b/java/com/android/dialer/app/calllog/PhoneCallDetailsHelper.java
@@ -58,7 +58,7 @@
   private final CachedNumberLookupService cachedNumberLookupService;
 
   /** List of items to be concatenated together for accessibility descriptions */
-  private ArrayList<CharSequence> descriptionItems = new ArrayList<>();
+  private final ArrayList<CharSequence> descriptionItems = new ArrayList<>();
 
   /**
    * Creates a new instance of the helper.
diff --git a/java/com/android/dialer/app/contactinfo/ExpirableCacheHeadlessFragment.java b/java/com/android/dialer/app/contactinfo/ExpirableCacheHeadlessFragment.java
index 28d4f14..61f8497 100644
--- a/java/com/android/dialer/app/contactinfo/ExpirableCacheHeadlessFragment.java
+++ b/java/com/android/dialer/app/contactinfo/ExpirableCacheHeadlessFragment.java
@@ -37,7 +37,7 @@
   private static final String FRAGMENT_TAG = "ExpirableCacheHeadlessFragment";
   private static final int CONTACT_INFO_CACHE_SIZE = 100;
 
-  private ExpirableCache<NumberWithCountryIso, ContactInfo> retainedCache =
+  private final ExpirableCache<NumberWithCountryIso, ContactInfo> retainedCache =
       ExpirableCache.create(CONTACT_INFO_CACHE_SIZE);
 
   @NonNull
diff --git a/java/com/android/dialer/app/voicemail/VoicemailAudioManager.java b/java/com/android/dialer/app/voicemail/VoicemailAudioManager.java
index 79716cb..80117c8 100644
--- a/java/com/android/dialer/app/voicemail/VoicemailAudioManager.java
+++ b/java/com/android/dialer/app/voicemail/VoicemailAudioManager.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -32,9 +33,9 @@
 
   public static final int PLAYBACK_STREAM = AudioManager.STREAM_VOICE_CALL;
 
-  private AudioManager audioManager;
-  private VoicemailPlaybackPresenter voicemailPlaybackPresenter;
-  private WiredHeadsetManager wiredHeadsetManager;
+  private final AudioManager audioManager;
+  private final VoicemailPlaybackPresenter voicemailPlaybackPresenter;
+  private final WiredHeadsetManager wiredHeadsetManager;
   private boolean wasSpeakerOn;
   private CallAudioState callAudioState;
   private boolean bluetoothScoEnabled;
diff --git a/java/com/android/dialer/app/voicemail/VoicemailPlaybackLayout.java b/java/com/android/dialer/app/voicemail/VoicemailPlaybackLayout.java
index aa3d9d4..99967dc 100644
--- a/java/com/android/dialer/app/voicemail/VoicemailPlaybackLayout.java
+++ b/java/com/android/dialer/app/voicemail/VoicemailPlaybackLayout.java
@@ -59,7 +59,7 @@
   private static final String TAG = VoicemailPlaybackLayout.class.getSimpleName();
   private static final int VOICEMAIL_DELETE_DELAY_MS = 3000;
 
-  private Context context;
+  private final Context context;
   private CallLogListItemViewHolder viewHolder;
   private VoicemailPlaybackPresenter presenter;
   /** Click listener to toggle speakerphone. */
@@ -375,12 +375,12 @@
 
     private final ScheduledExecutorService executorService;
     private final Object lock = new Object();
-    private int durationMs;
+    private final int durationMs;
 
     @GuardedBy("lock")
     private ScheduledFuture<?> scheduledFuture;
 
-    private Runnable updateClipPositionRunnable =
+    private final Runnable updateClipPositionRunnable =
         new Runnable() {
           @Override
           public void run() {
diff --git a/java/com/android/dialer/app/voicemail/VoicemailPlaybackPresenter.java b/java/com/android/dialer/app/voicemail/VoicemailPlaybackPresenter.java
index 7a479a6..506f547 100644
--- a/java/com/android/dialer/app/voicemail/VoicemailPlaybackPresenter.java
+++ b/java/com/android/dialer/app/voicemail/VoicemailPlaybackPresenter.java
@@ -128,7 +128,7 @@
   protected Uri voicemailUri;
   protected MediaPlayer mediaPlayer;
   // Used to run async tasks that need to interact with the UI.
-  protected AsyncTaskExecutor asyncTaskExecutor;
+  protected final AsyncTaskExecutor asyncTaskExecutor;
   private AppCompatActivity activity;
   private PlaybackView view;
   private int position;
@@ -147,7 +147,7 @@
   private FetchResultHandler fetchResultHandler;
 
   private PowerManager.WakeLock proximityWakeLock;
-  private VoicemailAudioManager voicemailAudioManager;
+  private final VoicemailAudioManager voicemailAudioManager;
   private OnVoicemailDeletedListener onVoicemailDeletedListener;
   private View shareVoicemailButtonView;
 
@@ -1010,7 +1010,7 @@
 
     private final Handler fetchResultHandler;
     private final Uri voicemailUri;
-    private AtomicBoolean isWaitingForResult = new AtomicBoolean(true);
+    private final AtomicBoolean isWaitingForResult = new AtomicBoolean(true);
 
     public FetchResultHandler(Handler handler, Uri uri, int code) {
       super(handler);
diff --git a/java/com/android/dialer/app/voicemail/WiredHeadsetManager.java b/java/com/android/dialer/app/voicemail/WiredHeadsetManager.java
index 2873f8d..3734d05 100644
--- a/java/com/android/dialer/app/voicemail/WiredHeadsetManager.java
+++ b/java/com/android/dialer/app/voicemail/WiredHeadsetManager.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -29,7 +30,7 @@
   private final WiredHeadsetBroadcastReceiver receiver;
   private boolean isPluggedIn;
   private Listener listener;
-  private Context context;
+  private final Context context;
 
   WiredHeadsetManager(Context context) {
     this.context = context;
diff --git a/java/com/android/dialer/calllogutils/CallTypeIconsView.java b/java/com/android/dialer/calllogutils/CallTypeIconsView.java
index a8b8052..c4a73c4 100644
--- a/java/com/android/dialer/calllogutils/CallTypeIconsView.java
+++ b/java/com/android/dialer/calllogutils/CallTypeIconsView.java
@@ -45,7 +45,7 @@
 
   private static Resources resources;
   private static Resources largeResouces;
-  private List<Integer> callTypes = new ArrayList<>(3);
+  private final List<Integer> callTypes = new ArrayList<>(3);
   private boolean showVideo;
   private boolean showHd;
   private boolean showWifi;
diff --git a/java/com/android/dialer/calllogutils/FilterSpinnerHelper.java b/java/com/android/dialer/calllogutils/FilterSpinnerHelper.java
index a6ae552..32bd184 100644
--- a/java/com/android/dialer/calllogutils/FilterSpinnerHelper.java
+++ b/java/com/android/dialer/calllogutils/FilterSpinnerHelper.java
@@ -32,17 +32,17 @@
 import java.util.List;
 
 public class FilterSpinnerHelper implements AdapterView.OnItemSelectedListener {
-  private static String TAG = FilterSpinnerHelper.class.getSimpleName();
+  private static final String TAG = FilterSpinnerHelper.class.getSimpleName();
 
   public interface OnFilterChangedListener {
     void onFilterChanged(PhoneAccountHandle account, int callType);
   }
 
-  private OnFilterChangedListener mListener;
-  private Spinner mAccountSpinner;
-  private ArrayAdapter<AccountItem> mAccountAdapter;
-  private Spinner mTypeSpinner;
-  private ArrayAdapter<TypeItem> mTypeAdapter;
+  private final OnFilterChangedListener mListener;
+  private final Spinner mAccountSpinner;
+  private final ArrayAdapter<AccountItem> mAccountAdapter;
+  private final Spinner mTypeSpinner;
+  private final ArrayAdapter<TypeItem> mTypeAdapter;
 
   public FilterSpinnerHelper(View rootView, boolean includeVoicemailType,
       OnFilterChangedListener listener) {
diff --git a/java/com/android/dialer/callrecord/CallRecording.java b/java/com/android/dialer/callrecord/CallRecording.java
index a594213..8d9ec0f 100644
--- a/java/com/android/dialer/callrecord/CallRecording.java
+++ b/java/com/android/dialer/callrecord/CallRecording.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2014 The CyanogenMod Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -27,11 +28,11 @@
 import java.io.File;
 
 public final class CallRecording implements Parcelable {
-  public String phoneNumber;
-  public long creationTime;
-  public String fileName;
-  public long startRecordingTime;
-  public long mediaId;
+  public final String phoneNumber;
+  public final long creationTime;
+  public final String fileName;
+  public final long startRecordingTime;
+  public final long mediaId;
 
   public static final Parcelable.Creator<CallRecording> CREATOR =
       new Parcelable.Creator<CallRecording>() {
diff --git a/java/com/android/dialer/callrecord/CallRecordingDataStore.java b/java/com/android/dialer/callrecord/CallRecordingDataStore.java
index 88b603b..0a24c34 100644
--- a/java/com/android/dialer/callrecord/CallRecordingDataStore.java
+++ b/java/com/android/dialer/callrecord/CallRecordingDataStore.java
@@ -175,13 +175,13 @@
   }
 
   static class CallRecordingsContract {
-    static interface CallRecording extends BaseColumns {
-      static final String TABLE_NAME = "call_recordings";
-      static final String COLUMN_NAME_PHONE_NUMBER = "phone_number";
-      static final String COLUMN_NAME_CALL_DATE = "call_date";
-      static final String COLUMN_NAME_RECORDING_FILENAME = "recording_filename";
-      static final String COLUMN_NAME_CREATION_DATE = "creation_date";
-      static final String COLUMN_NAME_MEDIA_ID = "media_id";
+    interface CallRecording extends BaseColumns {
+      String TABLE_NAME = "call_recordings";
+      String COLUMN_NAME_PHONE_NUMBER = "phone_number";
+      String COLUMN_NAME_CALL_DATE = "call_date";
+      String COLUMN_NAME_RECORDING_FILENAME = "recording_filename";
+      String COLUMN_NAME_CREATION_DATE = "creation_date";
+      String COLUMN_NAME_MEDIA_ID = "media_id";
     }
   }
 
diff --git a/java/com/android/dialer/callrecord/impl/CallRecorderService.java b/java/com/android/dialer/callrecord/impl/CallRecorderService.java
index c24e109..5681925 100644
--- a/java/com/android/dialer/callrecord/impl/CallRecorderService.java
+++ b/java/com/android/dialer/callrecord/impl/CallRecorderService.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2014 The CyanogenMod Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -49,7 +50,7 @@
   private MediaRecorder mMediaRecorder = null;
   private CallRecording mCurrentRecording = null;
 
-  private SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyMMdd_HHmmssSSS");
+  private final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyMMdd_HHmmssSSS");
 
   private final ICallRecorderService.Stub mBinder = new ICallRecorderService.Stub() {
     @Override
diff --git a/java/com/android/dialer/callstats/CallStatsAdapter.java b/java/com/android/dialer/callstats/CallStatsAdapter.java
index e3bdd0f..b55190e 100644
--- a/java/com/android/dialer/callstats/CallStatsAdapter.java
+++ b/java/com/android/dialer/callstats/CallStatsAdapter.java
@@ -58,10 +58,10 @@
   private final ContactInfoCache mContactInfoCache;
   private final ContactDisplayPreferences mContactDisplayPreferences;
 
-  private ArrayList<CallStatsDetails> mAllItems;
-  private ArrayList<CallStatsDetails> mShownItems;
-  private CallStatsDetails mTotalItem;
-  private Map<CallStatsDetails, ContactInfo> mInfoLookup;
+  private final ArrayList<CallStatsDetails> mAllItems;
+  private final ArrayList<CallStatsDetails> mShownItems;
+  private final CallStatsDetails mTotalItem;
+  private final Map<CallStatsDetails, ContactInfo> mInfoLookup;
 
   private int mType = -1;
   private long mFilterFrom;
diff --git a/java/com/android/dialer/callstats/CallStatsDetailActivity.java b/java/com/android/dialer/callstats/CallStatsDetailActivity.java
index d30d3c8..4c36e81 100644
--- a/java/com/android/dialer/callstats/CallStatsDetailActivity.java
+++ b/java/com/android/dialer/callstats/CallStatsDetailActivity.java
@@ -307,10 +307,10 @@
   }
 
   private class DetailLine {
-    private int mValueTemplateResId;
-    private View mRootView;
-    private TextView mTextView;
-    private TextView mPercentView;
+    private final int mValueTemplateResId;
+    private final View mRootView;
+    private final TextView mTextView;
+    private final TextView mPercentView;
 
     public DetailLine(int rootViewId, int valueTemplateResId, int iconType) {
       mValueTemplateResId = valueTemplateResId;
diff --git a/java/com/android/dialer/callstats/CallStatsListItemViewHolder.java b/java/com/android/dialer/callstats/CallStatsListItemViewHolder.java
index d9f9682..c861523 100644
--- a/java/com/android/dialer/callstats/CallStatsListItemViewHolder.java
+++ b/java/com/android/dialer/callstats/CallStatsListItemViewHolder.java
@@ -59,9 +59,8 @@
   public final TextView mPercentView;
   public final LinearColorBar mBarView;
 
-  private Context mContext;
-  private ContactInfoHelper mContactInfoHelper;
-  private final int mPhotoSize;
+  private final Context mContext;
+  private final ContactInfoHelper mContactInfoHelper;
 
   private CallStatsListItemViewHolder(View rootView,
       QuickContactBadge quickContactView,
diff --git a/java/com/android/dialer/contactphoto/ContactPhotoManagerImpl.java b/java/com/android/dialer/contactphoto/ContactPhotoManagerImpl.java
index b3edae8..eaf197d 100644
--- a/java/com/android/dialer/contactphoto/ContactPhotoManagerImpl.java
+++ b/java/com/android/dialer/contactphoto/ContactPhotoManagerImpl.java
@@ -147,7 +147,7 @@
   /** Flag indicating if the image loading is paused. */
   private boolean paused;
   /** The user agent string to use when loading URI based photos. */
-  private String userAgent;
+  private final String userAgent;
 
   public ContactPhotoManagerImpl(Context context) {
     this.context = context;
@@ -210,7 +210,7 @@
     return ((bytes + 1023) / 1024) + "K";
   }
 
-  private static final int safeDiv(int dividend, int divisor) {
+  private static int safeDiv(int dividend, int divisor) {
     return (divisor == 0) ? 0 : (dividend / divisor);
   }
 
diff --git a/java/com/android/dialer/dialpadview/DialpadFragment.java b/java/com/android/dialer/dialpadview/DialpadFragment.java
index 0d56399..6fdbbdc 100644
--- a/java/com/android/dialer/dialpadview/DialpadFragment.java
+++ b/java/com/android/dialer/dialpadview/DialpadFragment.java
@@ -1757,8 +1757,8 @@
     static final int DIALPAD_CHOICE_RETURN_TO_CALL = 102;
     static final int DIALPAD_CHOICE_ADD_NEW_CALL = 103;
     private static final int NUM_ITEMS = 3;
-    private LayoutInflater inflater;
-    private ChoiceItem[] choiceItems = new ChoiceItem[NUM_ITEMS];
+    private final LayoutInflater inflater;
+    private final ChoiceItem[] choiceItems = new ChoiceItem[NUM_ITEMS];
 
     DialpadChooserAdapter(Context context) {
       // Cache the LayoutInflate to avoid asking for a new one each time.
@@ -1830,9 +1830,9 @@
     // Simple struct for a single "choice" item.
     static class ChoiceItem {
 
-      String text;
-      Bitmap icon;
-      int id;
+      final String text;
+      final Bitmap icon;
+      final int id;
 
       ChoiceItem(String s, Bitmap b, int i) {
         text = s;
diff --git a/java/com/android/dialer/dialpadview/DialpadKeyButton.java b/java/com/android/dialer/dialpadview/DialpadKeyButton.java
index 47553b6..6b8d818 100644
--- a/java/com/android/dialer/dialpadview/DialpadKeyButton.java
+++ b/java/com/android/dialer/dialpadview/DialpadKeyButton.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2012 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -50,7 +51,7 @@
   private AccessibilityManager accessibilityManager;
 
   /** Bounds used to filter HOVER_EXIT events. */
-  private RectF hoverBounds = new RectF();
+  private final RectF hoverBounds = new RectF();
 
   /** Alternate content description for long-hover state. */
   private CharSequence longHoverContentDesc;
diff --git a/java/com/android/dialer/dialpadview/DialpadTextView.java b/java/com/android/dialer/dialpadview/DialpadTextView.java
index 50cd1bc..8a1a8c3 100644
--- a/java/com/android/dialer/dialpadview/DialpadTextView.java
+++ b/java/com/android/dialer/dialpadview/DialpadTextView.java
@@ -35,7 +35,7 @@
  */
 public class DialpadTextView extends AppCompatTextView {
 
-  private Rect textBounds = new Rect();
+  private final Rect textBounds = new Rect();
   private String textStr;
 
   public DialpadTextView(Context context, AttributeSet attrs) {
diff --git a/java/com/android/dialer/dialpadview/SpecialCharSequenceMgr.java b/java/com/android/dialer/dialpadview/SpecialCharSequenceMgr.java
index 267e280..157b1cf 100644
--- a/java/com/android/dialer/dialpadview/SpecialCharSequenceMgr.java
+++ b/java/com/android/dialer/dialpadview/SpecialCharSequenceMgr.java
@@ -461,8 +461,8 @@
     public int contactNum;
 
     // Used to identify the query request.
-    private int token;
-    private QueryHandler handler;
+    private final int token;
+    private final QueryHandler handler;
 
     // The text field we're going to update
     private EditText textField;
diff --git a/java/com/android/dialer/helplines/HelplineActivity.java b/java/com/android/dialer/helplines/HelplineActivity.java
index 8e7338b..fefe692 100755
--- a/java/com/android/dialer/helplines/HelplineActivity.java
+++ b/java/com/android/dialer/helplines/HelplineActivity.java
@@ -159,7 +159,7 @@
                 Context.MODE_PRIVATE);
     }
 
-    private LoadHelplinesTask.Callback mCallback = new LoadHelplinesTask.Callback () {
+    private final LoadHelplinesTask.Callback mCallback = new LoadHelplinesTask.Callback () {
         @Override
         public void onLoadListProgress(int progress) {
             mProgressBar.setProgress(progress);
@@ -177,7 +177,7 @@
         }
     };
 
-    private HelplineAdapter.Listener mListener = new HelplineAdapter.Listener() {
+    private final HelplineAdapter.Listener mListener = new HelplineAdapter.Listener() {
         private AlertDialog mDialog;
 
         @Override
diff --git a/java/com/android/dialer/helplines/HelplineAdapter.java b/java/com/android/dialer/helplines/HelplineAdapter.java
index 297d2fb..26e9011 100644
--- a/java/com/android/dialer/helplines/HelplineAdapter.java
+++ b/java/com/android/dialer/helplines/HelplineAdapter.java
@@ -36,9 +36,9 @@
 
 class HelplineAdapter extends RecyclerView.Adapter<HelplineAdapter.ViewHolder> {
 
-    private Resources mResources;
+    private final Resources mResources;
     private List<HelplineItem> mList = new ArrayList<>();
-    private Listener mListener;
+    private final Listener mListener;
 
     HelplineAdapter(Resources resources, Listener listener) {
         mResources = resources;
@@ -75,8 +75,8 @@
     }
 
     private static class Callback extends DiffUtil.Callback {
-        List<HelplineItem> mOldList;
-        List<HelplineItem> mNewList;
+        final List<HelplineItem> mOldList;
+        final List<HelplineItem> mNewList;
 
         public Callback(List<HelplineItem> oldList,
                         List<HelplineItem> newList) {
diff --git a/java/com/android/dialer/interactions/PhoneNumberInteraction.java b/java/com/android/dialer/interactions/PhoneNumberInteraction.java
index 2fa61da..a38ba29 100644
--- a/java/com/android/dialer/interactions/PhoneNumberInteraction.java
+++ b/java/com/android/dialer/interactions/PhoneNumberInteraction.java
@@ -118,7 +118,7 @@
   private final CallSpecificAppData callSpecificAppData;
   private long contactId = UNKNOWN_CONTACT_ID;
   private CursorLoader loader;
-  private boolean isVideoCall;
+  private final boolean isVideoCall;
 
   /** Error codes for interactions. */
   @Retention(RetentionPolicy.SOURCE)
diff --git a/java/com/android/dialer/lookup/dastelefonbuch/TelefonbuchApi.java b/java/com/android/dialer/lookup/dastelefonbuch/TelefonbuchApi.java
index ee58019..16407b7 100644
--- a/java/com/android/dialer/lookup/dastelefonbuch/TelefonbuchApi.java
+++ b/java/com/android/dialer/lookup/dastelefonbuch/TelefonbuchApi.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2014 Danny Baumann <dannybaumann@web.de>
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -29,12 +30,12 @@
   private static final String REVERSE_LOOKUP_URL =
           "https://www.dastelefonbuch.de/R%C3%BCckw%C3%A4rts-Suche/";
 
-  private static String RELEVANT_CONTENT_REGEX =
+  private static final String RELEVANT_CONTENT_REGEX =
           "<div class=\"vcard\">(.*)<div class=\"additional\">";
-  private static String NAME_REGEX ="<div class=\"name\" title=\"(.*?)\">";
-  private static String NUMBER_REGEX = "<!-- phoneTo: (.*?) -->";
-  private static String ADDRESS_REGEX = "<address.*?>\n?(.*?)</address>";
-  private static String WEBSITE_REGEX = "<div.*class=\"url\">.*<a.*?href=\"(.*?)\"";
+  private static final String NAME_REGEX ="<div class=\"name\" title=\"(.*?)\">";
+  private static final String NUMBER_REGEX = "<!-- phoneTo: (.*?) -->";
+  private static final String ADDRESS_REGEX = "<address.*?>\n?(.*?)</address>";
+  private static final String WEBSITE_REGEX = "<div.*class=\"url\">.*<a.*?href=\"(.*?)\"";
 
   private TelefonbuchApi() {
   }
diff --git a/java/com/android/dialer/promotion/PromotionManager.java b/java/com/android/dialer/promotion/PromotionManager.java
index 24830de..0918bcc 100644
--- a/java/com/android/dialer/promotion/PromotionManager.java
+++ b/java/com/android/dialer/promotion/PromotionManager.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2018 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -30,7 +31,7 @@
 public final class PromotionManager {
 
   /** Promotion priority order list. Promotions with higher priority must be added first. */
-  private ImmutableList<Promotion> priorityPromotionList;
+  private final ImmutableList<Promotion> priorityPromotionList;
 
   @Inject
   public PromotionManager(ImmutableList<Promotion> priorityPromotionList) {
diff --git a/java/com/android/dialer/searchfragment/list/SearchAdapter.java b/java/com/android/dialer/searchfragment/list/SearchAdapter.java
index 009ca64..4dc222f 100644
--- a/java/com/android/dialer/searchfragment/list/SearchAdapter.java
+++ b/java/com/android/dialer/searchfragment/list/SearchAdapter.java
@@ -51,7 +51,7 @@
   private String rawNumber;
   private OnClickListener allowClickListener;
   private OnClickListener dismissClickListener;
-  private RowClickListener rowClickListener;
+  private final RowClickListener rowClickListener;
 
   public SearchAdapter(
       Context context, SearchCursorManager searchCursorManager, RowClickListener rowClickListener) {
diff --git a/java/com/android/dialer/simulator/Simulator.java b/java/com/android/dialer/simulator/Simulator.java
index 3b0a705..00a6152 100644
--- a/java/com/android/dialer/simulator/Simulator.java
+++ b/java/com/android/dialer/simulator/Simulator.java
@@ -43,8 +43,8 @@
   })
   @interface ConferenceType {}
 
-  static final int CONFERENCE_TYPE_GSM = 1;
-  static final int CONFERENCE_TYPE_VOLTE = 2;
+  int CONFERENCE_TYPE_GSM = 1;
+  int CONFERENCE_TYPE_VOLTE = 2;
 
   /** The types of connection service listener events */
   @Retention(RetentionPolicy.SOURCE)
@@ -55,11 +55,11 @@
   })
   @interface ConnectionServiceEventType {}
 
-  static final int ON_NEW_OUTGOING_CONNECTION = 1;
-  static final int ON_NEW_INCOMING_CONNECTION = 2;
-  static final int ON_CONFERENCE = 3;
+  int ON_NEW_OUTGOING_CONNECTION = 1;
+  int ON_NEW_INCOMING_CONNECTION = 2;
+  int ON_CONFERENCE = 3;
 
-  static final String CALLER_ID_PRESENTATION_TYPE = "caller_id_";
+  String CALLER_ID_PRESENTATION_TYPE = "caller_id_";
 
   /** Bundle keys that are used in making fake call. */
   @Retention(RetentionPolicy.SOURCE)
@@ -69,8 +69,8 @@
   })
   @interface BundleKey {}
 
-  public final String IS_VOLTE = "ISVOLTE";
-  public final String PRESENTATION_CHOICE = "PRESENTATIONCHOICE";
+  String IS_VOLTE = "ISVOLTE";
+  String PRESENTATION_CHOICE = "PRESENTATIONCHOICE";
 
   boolean isSimulatorMode();
 
@@ -79,7 +79,7 @@
   void disableSimulatorMode();
 
   /** Information about a connection event. */
-  public static class Event {
+  class Event {
     /** The type of connection event. */
     @Retention(RetentionPolicy.SOURCE)
     @IntDef({
diff --git a/java/com/android/dialer/simulator/impl/SimulatorMenu.java b/java/com/android/dialer/simulator/impl/SimulatorMenu.java
index 8c9cf1e..0d4deb0 100644
--- a/java/com/android/dialer/simulator/impl/SimulatorMenu.java
+++ b/java/com/android/dialer/simulator/impl/SimulatorMenu.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2018 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -30,9 +31,9 @@
 /** Makes option menu for simulator. */
 public final class SimulatorMenu extends ActionProvider {
 
-  SimulatorPortalEntryGroup portal;
+  final SimulatorPortalEntryGroup portal;
 
-  Context context;
+  final Context context;
 
   public SimulatorMenu(@NonNull Context context, SimulatorPortalEntryGroup portal) {
     super(Assert.isNotNull(context));
diff --git a/java/com/android/dialer/simulator/impl/SimulatorUtils.java b/java/com/android/dialer/simulator/impl/SimulatorUtils.java
index 9bb8618..debcd75 100644
--- a/java/com/android/dialer/simulator/impl/SimulatorUtils.java
+++ b/java/com/android/dialer/simulator/impl/SimulatorUtils.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2018 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -195,8 +196,8 @@
   }
 
   private static class PopulateDatabaseWorkerInput {
-    Context context;
-    boolean fastMode;
+    final Context context;
+    final boolean fastMode;
 
     PopulateDatabaseWorkerInput(Context context, boolean fastMode) {
       this.context = context;
diff --git a/java/com/android/dialer/telecom/TelecomUtil.java b/java/com/android/dialer/telecom/TelecomUtil.java
index 2d75973..cb769b9 100644
--- a/java/com/android/dialer/telecom/TelecomUtil.java
+++ b/java/com/android/dialer/telecom/TelecomUtil.java
@@ -59,7 +59,7 @@
   private static final String TAG = "TelecomUtil";
   private static boolean warningLogged = false;
 
-  private static TelecomUtilImpl instance = new TelecomUtilImpl();
+  private static final TelecomUtilImpl instance = new TelecomUtilImpl();
 
   /**
    * Cache for {@link #isVoicemailNumber(Context, PhoneAccountHandle, String)}. Both
diff --git a/java/com/android/dialer/util/ExpirableCache.java b/java/com/android/dialer/util/ExpirableCache.java
index a1b0afd..ba3951e 100644
--- a/java/com/android/dialer/util/ExpirableCache.java
+++ b/java/com/android/dialer/util/ExpirableCache.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2011 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -100,7 +101,7 @@
    */
   private final AtomicInteger generation;
   /** The underlying cache used to stored the cached values. */
-  private LruCache<K, CachedValue<V>> cache;
+  private final LruCache<K, CachedValue<V>> cache;
 
   private ExpirableCache(LruCache<K, CachedValue<V>> cache) {
     this.cache = cache;
diff --git a/java/com/android/dialer/util/TouchPointManager.java b/java/com/android/dialer/util/TouchPointManager.java
index ad5b007..625558d 100644
--- a/java/com/android/dialer/util/TouchPointManager.java
+++ b/java/com/android/dialer/util/TouchPointManager.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -27,9 +28,9 @@
 
   public static final String TOUCH_POINT = "touchPoint";
 
-  private static TouchPointManager instance = new TouchPointManager();
+  private static final TouchPointManager instance = new TouchPointManager();
 
-  private Point point = new Point();
+  private final Point point = new Point();
 
   /** Private constructor. Instance should only be acquired through getRunningInstance(). */
   private TouchPointManager() {}
diff --git a/java/com/android/dialer/voicemail/settings/VoicemailChangePinActivity.java b/java/com/android/dialer/voicemail/settings/VoicemailChangePinActivity.java
index 4606f72..47d8ee3 100644
--- a/java/com/android/dialer/voicemail/settings/VoicemailChangePinActivity.java
+++ b/java/com/android/dialer/voicemail/settings/VoicemailChangePinActivity.java
@@ -98,7 +98,7 @@
   private Button cancelButton;
   private Button nextButton;
 
-  private Handler handler = new ChangePinHandler(new WeakReference<>(this));
+  private final Handler handler = new ChangePinHandler(new WeakReference<>(this));
 
   private enum State {
     /**
diff --git a/java/com/android/dialer/voicemailstatus/VisualVoicemailEnabledChecker.java b/java/com/android/dialer/voicemailstatus/VisualVoicemailEnabledChecker.java
index 47ec4e5..3e651c2 100644
--- a/java/com/android/dialer/voicemailstatus/VisualVoicemailEnabledChecker.java
+++ b/java/com/android/dialer/voicemailstatus/VisualVoicemailEnabledChecker.java
@@ -45,15 +45,15 @@
 
   public static final String PREF_KEY_HAS_ACTIVE_VOICEMAIL_PROVIDER =
       "has_active_voicemail_provider";
-  private SharedPreferences prefs;
+  private final SharedPreferences prefs;
   private boolean hasActiveVoicemailProvider;
   private Context context;
-  private Callback callback;
+  private final Callback callback;
 
   public VisualVoicemailEnabledChecker(Context context, @Nullable Callback callback) {
     this.context = context;
     this.callback = callback;
-    prefs = PreferenceManager.getDefaultSharedPreferences(this.context);
+    prefs = PreferenceManager.getDefaultSharedPreferences(context);
     hasActiveVoicemailProvider = prefs.getBoolean(PREF_KEY_HAS_ACTIVE_VOICEMAIL_PROVIDER, false);
   }
 
diff --git a/java/com/android/dialer/widget/EmptyContentView.java b/java/com/android/dialer/widget/EmptyContentView.java
index 6c5571e..10e3f99 100644
--- a/java/com/android/dialer/widget/EmptyContentView.java
+++ b/java/com/android/dialer/widget/EmptyContentView.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -41,9 +42,9 @@
   public static final int NO_LABEL = 0;
   public static final int NO_IMAGE = 0;
 
-  private ImageView imageView;
-  private TextView descriptionView;
-  private Button actionView;
+  private final ImageView imageView;
+  private final TextView descriptionView;
+  private final Button actionView;
   private OnEmptyViewActionButtonClickedListener onActionButtonClickedListener;
 
   private @StringRes int actionLabel;
diff --git a/java/com/android/incallui/AccelerometerListener.java b/java/com/android/incallui/AccelerometerListener.java
index 92e62b0..378971a 100644
--- a/java/com/android/incallui/AccelerometerListener.java
+++ b/java/com/android/incallui/AccelerometerListener.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2009 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -42,8 +43,8 @@
   private static final int VERTICAL_DEBOUNCE = 100;
   private static final int HORIZONTAL_DEBOUNCE = 500;
   private static final double VERTICAL_ANGLE = 50.0;
-  private SensorManager sensorManager;
-  private Sensor sensor;
+  private final SensorManager sensorManager;
+  private final Sensor sensor;
   // mOrientation is the orientation value most recently reported to the client.
   private int orientation;
   // mPendingOrientation is the latest orientation computed based on the sensor value.
@@ -75,7 +76,7 @@
           }
         }
       };
-  SensorEventListener sensorListener =
+  final SensorEventListener sensorListener =
       new SensorEventListener() {
         @Override
         public void onSensorChanged(SensorEvent event) {
diff --git a/java/com/android/incallui/CallButtonPresenter.java b/java/com/android/incallui/CallButtonPresenter.java
index b78563b..5ac76aa 100644
--- a/java/com/android/incallui/CallButtonPresenter.java
+++ b/java/com/android/incallui/CallButtonPresenter.java
@@ -76,7 +76,7 @@
   private boolean isInCallButtonUiReady;
   private PhoneAccountHandle otherAccount;
 
-  private CallRecorder.RecordingProgressListener recordingProgressListener =
+  private final CallRecorder.RecordingProgressListener recordingProgressListener =
       new CallRecorder.RecordingProgressListener() {
     @Override
     public void onStartRecording() {
diff --git a/java/com/android/incallui/ConferenceParticipantListAdapter.java b/java/com/android/incallui/ConferenceParticipantListAdapter.java
index f0f31c6..3760342 100644
--- a/java/com/android/incallui/ConferenceParticipantListAdapter.java
+++ b/java/com/android/incallui/ConferenceParticipantListAdapter.java
@@ -90,7 +90,7 @@
         }
       };
   /** The conference participants to show in the ListView. */
-  private List<ParticipantInfo> conferenceParticipants = new ArrayList<>();
+  private final List<ParticipantInfo> conferenceParticipants = new ArrayList<>();
   /** {@code True} if the conference parent supports separating calls from the conference. */
   private boolean parentCanSeparate;
 
diff --git a/java/com/android/incallui/ExternalCallNotifier.java b/java/com/android/incallui/ExternalCallNotifier.java
index 29de0c1..3be820d 100644
--- a/java/com/android/incallui/ExternalCallNotifier.java
+++ b/java/com/android/incallui/ExternalCallNotifier.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2017 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -75,7 +76,7 @@
 
   private final Context context;
   private final ContactInfoCache contactInfoCache;
-  private Map<Call, NotificationInfo> notifications = new ArrayMap<>();
+  private final Map<Call, NotificationInfo> notifications = new ArrayMap<>();
   private int nextUniqueNotificationId;
 
   /** Initializes a new instance of the external call notifier. */
diff --git a/java/com/android/incallui/InCallCameraManager.java b/java/com/android/incallui/InCallCameraManager.java
index b5a8f91..2296afb 100644
--- a/java/com/android/incallui/InCallCameraManager.java
+++ b/java/com/android/incallui/InCallCameraManager.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2014 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -41,7 +42,7 @@
    */
   private boolean isInitialized = false;
   /** The context. */
-  private Context context;
+  private final Context context;
 
   /**
    * Initializes the InCall CameraManager.
diff --git a/java/com/android/incallui/InCallDndHandler.java b/java/com/android/incallui/InCallDndHandler.java
index 3aef772..062ab34 100644
--- a/java/com/android/incallui/InCallDndHandler.java
+++ b/java/com/android/incallui/InCallDndHandler.java
@@ -31,10 +31,10 @@
 
   private static final String KEY_ENABLE_DND = "incall_enable_dnd";
 
-  private SharedPreferences prefs;
+  private final SharedPreferences prefs;
   private DialerCall activeCall;
-  private NotificationManager notificationManager;
-  private int userSelectedDndMode;
+  private final NotificationManager notificationManager;
+  private final int userSelectedDndMode;
 
   public InCallDndHandler(Context context) {
     prefs = PreferenceManager.getDefaultSharedPreferences(
diff --git a/java/com/android/incallui/InCallPresenter.java b/java/com/android/incallui/InCallPresenter.java
index 9e0dd49..ada3935 100644
--- a/java/com/android/incallui/InCallPresenter.java
+++ b/java/com/android/incallui/InCallPresenter.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2013 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -212,7 +213,7 @@
 
   private boolean awaitingCallListUpdate = false;
 
-  private ExternalCallList.ExternalCallListener externalCallListener =
+  private final ExternalCallList.ExternalCallListener externalCallListener =
       new ExternalCallList.ExternalCallListener() {
 
         @Override
diff --git a/java/com/android/incallui/InCallVibrationHandler.java b/java/com/android/incallui/InCallVibrationHandler.java
index 092c134..8ce8d0b 100644
--- a/java/com/android/incallui/InCallVibrationHandler.java
+++ b/java/com/android/incallui/InCallVibrationHandler.java
@@ -41,8 +41,8 @@
   private static final String KEY_VIBRATE_45SECS = "incall_vibrate_45secs";
   private static final String KEY_VIBRATE_HANGUP = "incall_vibrate_hangup";
 
-  private SharedPreferences prefs;
-  private Vibrator vibrator;
+  private final SharedPreferences prefs;
+  private final Vibrator vibrator;
   private DialerCall activeCall;
 
   public InCallVibrationHandler(Context context) {
diff --git a/java/com/android/incallui/ProximitySensor.java b/java/com/android/incallui/ProximitySensor.java
index b124d45..ad5b77c 100644
--- a/java/com/android/incallui/ProximitySensor.java
+++ b/java/com/android/incallui/ProximitySensor.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2013 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -271,7 +272,7 @@
    */
   public class ProximityDisplayListener implements DisplayListener {
 
-    private DisplayManager displayManager;
+    private final DisplayManager displayManager;
     private boolean isDisplayOn = true;
 
     ProximityDisplayListener(DisplayManager displayManager) {
diff --git a/java/com/android/incallui/StatusBarNotifier.java b/java/com/android/incallui/StatusBarNotifier.java
index 563c157..423e401 100644
--- a/java/com/android/incallui/StatusBarNotifier.java
+++ b/java/com/android/incallui/StatusBarNotifier.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2013 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -978,7 +979,7 @@
 
   private class StatusBarCallListener implements DialerCallListener {
 
-    private DialerCall dialerCall;
+    private final DialerCall dialerCall;
 
     StatusBarCallListener(DialerCall dialerCall) {
       this.dialerCall = dialerCall;
diff --git a/java/com/android/incallui/answer/impl/AffordanceHolderLayout.java b/java/com/android/incallui/answer/impl/AffordanceHolderLayout.java
index 7b6c200..a0833ff 100644
--- a/java/com/android/incallui/answer/impl/AffordanceHolderLayout.java
+++ b/java/com/android/incallui/answer/impl/AffordanceHolderLayout.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,7 +34,7 @@
 /** Layout that delegates touches to its SwipeButtonHelper */
 public class AffordanceHolderLayout extends FrameLayout {
 
-  private SwipeButtonHelper affordanceHelper;
+  private final SwipeButtonHelper affordanceHelper;
 
   private Callback affordanceCallback;
 
diff --git a/java/com/android/incallui/answer/impl/AnswerFragment.java b/java/com/android/incallui/answer/impl/AnswerFragment.java
index 78eb1b6..a171b22 100644
--- a/java/com/android/incallui/answer/impl/AnswerFragment.java
+++ b/java/com/android/incallui/answer/impl/AnswerFragment.java
@@ -158,7 +158,7 @@
   private SecondaryBehavior answerAndReleaseBehavior;
   private ContactGridManager contactGridManager;
   private VideoCallScreen answerVideoCallScreen;
-  private Handler handler = new Handler(Looper.getMainLooper());
+  private final Handler handler = new Handler(Looper.getMainLooper());
 
   private enum SecondaryBehavior {
     REJECT_WITH_SMS(
@@ -195,7 +195,7 @@
     };
 
     @DrawableRes
-    public int icon;
+    public final int icon;
     @StringRes
     public final int contentDescription;
     @StringRes public final int accessibilityLabel;
@@ -336,7 +336,7 @@
         }
       };
 
-  private Runnable swipeHintRestoreTimer = this::restoreSwipeHintTexts;
+  private final Runnable swipeHintRestoreTimer = this::restoreSwipeHintTexts;
 
   private void performSecondaryButtonAction() {
     secondaryBehavior.performAction(this);
diff --git a/java/com/android/incallui/answer/impl/affordance/SwipeButtonHelper.java b/java/com/android/incallui/answer/impl/affordance/SwipeButtonHelper.java
index abeb2a7..3271162 100644
--- a/java/com/android/incallui/answer/impl/affordance/SwipeButtonHelper.java
+++ b/java/com/android/incallui/answer/impl/affordance/SwipeButtonHelper.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -63,7 +64,7 @@
   private int touchTargetSize;
   private View targetedView;
   private boolean touchSlopExeeded;
-  private AnimatorListenerAdapter flingEndListener =
+  private final AnimatorListenerAdapter flingEndListener =
       new AnimatorListenerAdapter() {
         @Override
         public void onAnimationEnd(Animator animation) {
diff --git a/java/com/android/incallui/answer/impl/affordance/SwipeButtonView.java b/java/com/android/incallui/answer/impl/affordance/SwipeButtonView.java
index fb512f3..a875723 100644
--- a/java/com/android/incallui/answer/impl/affordance/SwipeButtonView.java
+++ b/java/com/android/incallui/answer/impl/affordance/SwipeButtonView.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -62,9 +63,9 @@
   private ValueAnimator scaleAnimator;
   private float circleStartValue;
   private boolean circleWillBeHidden;
-  private int[] tempPoint = new int[2];
+  private final int[] tempPoint = new int[2];
   private float tmageScale = 1f;
-  private int circleColor;
+  private final int circleColor;
   private View previewView;
   private float circleStartRadius;
   private float maxCircleSize;
@@ -73,28 +74,28 @@
   private boolean finishing;
   private boolean launchingAffordance;
 
-  private AnimatorListenerAdapter clipEndListener =
+  private final AnimatorListenerAdapter clipEndListener =
       new AnimatorListenerAdapter() {
         @Override
         public void onAnimationEnd(Animator animation) {
           previewClipper = null;
         }
       };
-  private AnimatorListenerAdapter circleEndListener =
+  private final AnimatorListenerAdapter circleEndListener =
       new AnimatorListenerAdapter() {
         @Override
         public void onAnimationEnd(Animator animation) {
           circleAnimator = null;
         }
       };
-  private AnimatorListenerAdapter scaleEndListener =
+  private final AnimatorListenerAdapter scaleEndListener =
       new AnimatorListenerAdapter() {
         @Override
         public void onAnimationEnd(Animator animation) {
           scaleAnimator = null;
         }
       };
-  private AnimatorListenerAdapter alphaEndListener =
+  private final AnimatorListenerAdapter alphaEndListener =
       new AnimatorListenerAdapter() {
         @Override
         public void onAnimationEnd(Animator animation) {
diff --git a/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java b/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java
index e773983..53080cb 100644
--- a/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java
+++ b/java/com/android/incallui/answer/impl/answermethod/FlingUpDownMethod.java
@@ -1137,8 +1137,8 @@
     private static final long RAMP_DOWN_END_MS = RAMP_DOWN_BEGIN_MS + RAMP_DOWN_DURATION_MS;
     private static final long RAMP_TOTAL_TIME_MS = RAMP_DOWN_END_MS;
     private final float ampMax;
-    private final float freqMax = 80;
-    private Interpolator sliderInterpolator = new FastOutSlowInInterpolator();
+    private static final float FREQ_MAX = 80;
+    private final Interpolator sliderInterpolator = new FastOutSlowInInterpolator();
 
     VibrateInterpolator(Context context) {
       ampMax = DpUtil.dpToPx(context, 1 /* dp */);
@@ -1168,7 +1168,7 @@
       }
 
       float ampNormalized = ampMax * slider;
-      float freqNormalized = freqMax * slider;
+      float freqNormalized = FREQ_MAX * slider;
 
       return (float) (ampNormalized * Math.sin(time * freqNormalized));
     }
diff --git a/java/com/android/incallui/answer/impl/answermethod/FlingUpDownTouchHandler.java b/java/com/android/incallui/answer/impl/answermethod/FlingUpDownTouchHandler.java
index 39d97d1..f42e6bd 100644
--- a/java/com/android/incallui/answer/impl/answermethod/FlingUpDownTouchHandler.java
+++ b/java/com/android/incallui/answer/impl/answermethod/FlingUpDownTouchHandler.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -143,7 +144,7 @@
   @NonNull private final OnProgressChangedListener listener;
 
   private VelocityTracker velocityTracker;
-  private FlingAnimationUtils flingAnimationUtils;
+  private final FlingAnimationUtils flingAnimationUtils;
 
   private boolean touchEnabled = true;
   private boolean flingEnabled = true;
@@ -156,14 +157,14 @@
   private int trackingPointer;
   private Animator progressAnimator;
 
-  private float touchSlop;
+  private final float touchSlop;
   private float initialTouchY;
   private float acceptThresholdY;
   private float rejectThresholdY;
   private float zeroY;
 
   private boolean touchAboveFalsingThreshold;
-  private float falsingThresholdPx;
+  private final float falsingThresholdPx;
   private boolean touchUsesFalsing;
 
   private final float acceptThresholdPx;
diff --git a/java/com/android/incallui/answer/impl/classifier/AnglesClassifier.java b/java/com/android/incallui/answer/impl/classifier/AnglesClassifier.java
index 24f04c4..8c997c7 100644
--- a/java/com/android/incallui/answer/impl/classifier/AnglesClassifier.java
+++ b/java/com/android/incallui/answer/impl/classifier/AnglesClassifier.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -47,7 +48,7 @@
  * angels or right angles)
  */
 class AnglesClassifier extends StrokeClassifier {
-  private Map<Stroke, Data> strokeMap = new ArrayMap<>();
+  private final Map<Stroke, Data> strokeMap = new ArrayMap<>();
 
   public AnglesClassifier(ClassifierData classifierData) {
     this.classifierData = classifierData;
@@ -87,7 +88,7 @@
     private static final float ANGLE_DEVIATION = (float) Math.PI / 20.0f;
     private static final float MIN_MOVE_DIST_DP = .01f;
 
-    private List<Point> lastThreePoints = new ArrayList<>();
+    private final List<Point> lastThreePoints = new ArrayList<>();
     private float firstAngleVariance;
     private float previousAngle;
     private float biggestAngle;
diff --git a/java/com/android/incallui/answer/impl/classifier/ClassifierData.java b/java/com/android/incallui/answer/impl/classifier/ClassifierData.java
index fe3fbe0..462204a 100644
--- a/java/com/android/incallui/answer/impl/classifier/ClassifierData.java
+++ b/java/com/android/incallui/answer/impl/classifier/ClassifierData.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -26,8 +27,8 @@
  * example, provide information on the current touch state.
  */
 class ClassifierData {
-  private SparseArray<Stroke> currentStrokes = new SparseArray<>();
-  private ArrayList<Stroke> endingStrokes = new ArrayList<>();
+  private final SparseArray<Stroke> currentStrokes = new SparseArray<>();
+  private final ArrayList<Stroke> endingStrokes = new ArrayList<>();
   private final float dpi;
   private final float screenHeight;
 
diff --git a/java/com/android/incallui/answer/impl/classifier/HistoryEvaluator.java b/java/com/android/incallui/answer/impl/classifier/HistoryEvaluator.java
index c0256a5..ac76a01 100644
--- a/java/com/android/incallui/answer/impl/classifier/HistoryEvaluator.java
+++ b/java/com/android/incallui/answer/impl/classifier/HistoryEvaluator.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -103,7 +104,7 @@
    * to 1.0
    */
   private static class Data {
-    public float evaluation;
+    public final float evaluation;
     public float weight;
 
     public Data(float evaluation) {
diff --git a/java/com/android/incallui/answer/impl/classifier/Point.java b/java/com/android/incallui/answer/impl/classifier/Point.java
index 5ea48b4..2919e79 100644
--- a/java/com/android/incallui/answer/impl/classifier/Point.java
+++ b/java/com/android/incallui/answer/impl/classifier/Point.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,9 +18,9 @@
 package com.android.incallui.answer.impl.classifier;
 
 class Point {
-  public float x;
-  public float y;
-  public long timeOffsetNano;
+  public final float x;
+  public final float y;
+  public final long timeOffsetNano;
 
   public Point(float x, float y) {
     this.x = x;
diff --git a/java/com/android/incallui/answer/impl/classifier/SpeedAnglesClassifier.java b/java/com/android/incallui/answer/impl/classifier/SpeedAnglesClassifier.java
index 034c4fe..2fc7b0f 100644
--- a/java/com/android/incallui/answer/impl/classifier/SpeedAnglesClassifier.java
+++ b/java/com/android/incallui/answer/impl/classifier/SpeedAnglesClassifier.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,7 +34,7 @@
  * a good stroke is most often increases, so most of these angels should be in this interval.
  */
 class SpeedAnglesClassifier extends StrokeClassifier {
-  private Map<Stroke, Data> strokeMap = new ArrayMap<>();
+  private final Map<Stroke, Data> strokeMap = new ArrayMap<>();
 
   public SpeedAnglesClassifier(ClassifierData classifierData) {
     this.classifierData = classifierData;
@@ -79,7 +80,7 @@
     private static final float LENGTH_SCALE = 1.0f;
     private static final float ANGLE_DEVIATION = (float) Math.PI / 10.0f;
 
-    private List<Point> lastThreePoints = new ArrayList<>();
+    private final List<Point> lastThreePoints = new ArrayList<>();
     private Point previousPoint;
     private float previousAngle;
     private float sumSquares;
diff --git a/java/com/android/incallui/answer/impl/classifier/Stroke.java b/java/com/android/incallui/answer/impl/classifier/Stroke.java
index a334249..caba894 100644
--- a/java/com/android/incallui/answer/impl/classifier/Stroke.java
+++ b/java/com/android/incallui/answer/impl/classifier/Stroke.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -26,8 +27,8 @@
 
   private static final float NANOS_TO_SECONDS = 1e9f;
 
-  private ArrayList<Point> points = new ArrayList<>();
-  private long startTimeNano;
+  private final ArrayList<Point> points = new ArrayList<>();
+  private final long startTimeNano;
   private long endTimeNano;
   private float length;
   private final float dpi;
diff --git a/java/com/android/incallui/answer/impl/utils/FlingAnimationUtils.java b/java/com/android/incallui/answer/impl/utils/FlingAnimationUtils.java
index b30afa0..6d142de 100644
--- a/java/com/android/incallui/answer/impl/utils/FlingAnimationUtils.java
+++ b/java/com/android/incallui/answer/impl/utils/FlingAnimationUtils.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -35,13 +36,13 @@
   /** Fancy math. http://en.wikipedia.org/wiki/B%C3%A9zier_curve */
   private static final float LINEAR_OUT_SLOW_IN_START_GRADIENT = 1.0f / LINEAR_OUT_SLOW_IN_X2;
 
-  private Interpolator linearOutSlowIn;
+  private final Interpolator linearOutSlowIn;
 
-  private float minVelocityPxPerSecond;
-  private float maxLengthSeconds;
-  private float highVelocityPxPerSecond;
+  private final float minVelocityPxPerSecond;
+  private final float maxLengthSeconds;
+  private final float highVelocityPxPerSecond;
 
-  private AnimatorProperties animatorProperties = new AnimatorProperties();
+  private final AnimatorProperties animatorProperties = new AnimatorProperties();
 
   public FlingAnimationUtils(Context ctx, float maxLengthSeconds) {
     this.maxLengthSeconds = maxLengthSeconds;
@@ -246,9 +247,9 @@
   /** An interpolator which interpolates two interpolators with an interpolator. */
   private static final class InterpolatorInterpolator implements Interpolator {
 
-    private Interpolator interpolator1;
-    private Interpolator interpolator2;
-    private Interpolator crossfader;
+    private final Interpolator interpolator1;
+    private final Interpolator interpolator2;
+    private final Interpolator crossfader;
 
     InterpolatorInterpolator(
         Interpolator interpolator1, Interpolator interpolator2, Interpolator crossfader) {
@@ -268,9 +269,9 @@
   /** An interpolator which interpolates with a fixed velocity. */
   private static final class VelocityInterpolator implements Interpolator {
 
-    private float durationSeconds;
-    private float velocity;
-    private float diff;
+    private final float durationSeconds;
+    private final float velocity;
+    private final float diff;
 
     private VelocityInterpolator(float durationSeconds, float velocity, float diff) {
       this.durationSeconds = durationSeconds;
diff --git a/java/com/android/incallui/baseui/BaseFragment.java b/java/com/android/incallui/baseui/BaseFragment.java
index 0fa2684..ac05984 100644
--- a/java/com/android/incallui/baseui/BaseFragment.java
+++ b/java/com/android/incallui/baseui/BaseFragment.java
@@ -26,7 +26,7 @@
 
   private static final String KEY_FRAGMENT_HIDDEN = "key_fragment_hidden";
 
-  private T presenter;
+  private final T presenter;
 
   protected BaseFragment() {
     presenter = createPresenter();
diff --git a/java/com/android/incallui/call/CallRecorder.java b/java/com/android/incallui/call/CallRecorder.java
index 867d5a5..105f756 100644
--- a/java/com/android/incallui/call/CallRecorder.java
+++ b/java/com/android/incallui/call/CallRecorder.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2014 The CyanogenMod Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -67,11 +68,10 @@
   private boolean initialized = false;
   private ICallRecorderService service = null;
 
-  private HashSet<RecordingProgressListener> progressListeners =
-      new HashSet<RecordingProgressListener>();
-  private Handler handler = new Handler();
+  private final HashSet<RecordingProgressListener> progressListeners = new HashSet<>();
+  private final Handler handler = new Handler(Looper.getMainLooper());
 
-  private ServiceConnection connection = new ServiceConnection() {
+  private final ServiceConnection connection = new ServiceConnection() {
     @Override
     public void onServiceConnected(ComponentName name, IBinder service) {
       CallRecorder.this.service = ICallRecorderService.Stub.asInterface(service);
@@ -286,7 +286,7 @@
 
   private static final int UPDATE_INTERVAL = 500;
 
-  private Runnable updateRecordingProgressTask = new Runnable() {
+  private final Runnable updateRecordingProgressTask = new Runnable() {
     @Override
     public void run() {
       CallRecording active = getActiveRecording();
diff --git a/java/com/android/incallui/call/DialerCall.java b/java/com/android/incallui/call/DialerCall.java
index b5101a9..87aa087 100644
--- a/java/com/android/incallui/call/DialerCall.java
+++ b/java/com/android/incallui/call/DialerCall.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2013 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -345,7 +346,7 @@
         }
       };
 
-  private long timeAddedMs;
+  private final long timeAddedMs;
   private int peerDimensionWidth = UNKNOWN_PEER_DIMENSIONS;
   private int peerDimensionHeight = UNKNOWN_PEER_DIMENSIONS;
 
diff --git a/java/com/android/incallui/call/InCallVideoCallCallbackNotifier.java b/java/com/android/incallui/call/InCallVideoCallCallbackNotifier.java
index 610d03d..59b83ac 100644
--- a/java/com/android/incallui/call/InCallVideoCallCallbackNotifier.java
+++ b/java/com/android/incallui/call/InCallVideoCallCallbackNotifier.java
@@ -28,7 +28,8 @@
 public class InCallVideoCallCallbackNotifier {
 
   /** Singleton instance of this class. */
-  private static InCallVideoCallCallbackNotifier instance = new InCallVideoCallCallbackNotifier();
+  private static final InCallVideoCallCallbackNotifier instance =
+          new InCallVideoCallCallbackNotifier();
 
   /**
    * ConcurrentHashMap constructor params: 8 is initial table size, 0.9f is load factor before
diff --git a/java/com/android/incallui/incall/impl/InCallButtonGridFragment.java b/java/com/android/incallui/incall/impl/InCallButtonGridFragment.java
index 5929c15..cd8ff81 100644
--- a/java/com/android/incallui/incall/impl/InCallButtonGridFragment.java
+++ b/java/com/android/incallui/incall/impl/InCallButtonGridFragment.java
@@ -41,7 +41,7 @@
   private static final int BUTTON_COUNT = 6;
   private static final int BUTTONS_PER_ROW = 3;
 
-  private CheckableLabeledButton[] buttons = new CheckableLabeledButton[BUTTON_COUNT];
+  private final CheckableLabeledButton[] buttons = new CheckableLabeledButton[BUTTON_COUNT];
   private OnButtonGridCreatedListener buttonGridListener;
 
   public static Fragment newInstance() {
diff --git a/java/com/android/incallui/incall/impl/InCallFragment.java b/java/com/android/incallui/incall/impl/InCallFragment.java
index 65b6f0b..12e1927 100644
--- a/java/com/android/incallui/incall/impl/InCallFragment.java
+++ b/java/com/android/incallui/incall/impl/InCallFragment.java
@@ -81,7 +81,7 @@
         AudioRouteSelectorPresenter,
         OnButtonGridCreatedListener {
 
-  private List<ButtonController> buttonControllers = new ArrayList<>();
+  private final List<ButtonController> buttonControllers = new ArrayList<>();
   private View endCallButton;
   private InCallPaginator paginator;
   private LockableViewPager pager;
diff --git a/java/com/android/incallui/video/impl/SpeakerButtonController.java b/java/com/android/incallui/video/impl/SpeakerButtonController.java
index e7a8978..6efc089 100644
--- a/java/com/android/incallui/video/impl/SpeakerButtonController.java
+++ b/java/com/android/incallui/video/impl/SpeakerButtonController.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -38,7 +39,7 @@
   @NonNull private final VideoCallScreenDelegate videoCallScreenDelegate;
 
   @NonNull
-  private CheckableImageButton button;
+  private final CheckableImageButton button;
 
   @DrawableRes
   private int icon = R.drawable.quantum_ic_volume_up_vd_theme_24;
diff --git a/java/com/android/incallui/video/impl/SwitchOnHoldCallController.java b/java/com/android/incallui/video/impl/SwitchOnHoldCallController.java
index de4e5e7..a90850f 100644
--- a/java/com/android/incallui/video/impl/SwitchOnHoldCallController.java
+++ b/java/com/android/incallui/video/impl/SwitchOnHoldCallController.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,12 +32,15 @@
 public class SwitchOnHoldCallController implements OnClickListener {
 
   @NonNull
-  private InCallScreenDelegate inCallScreenDelegate;
-  @NonNull private VideoCallScreenDelegate videoCallScreenDelegate;
+  private final InCallScreenDelegate inCallScreenDelegate;
+  @NonNull
+  private final VideoCallScreenDelegate videoCallScreenDelegate;
 
-  @NonNull private View switchOnHoldButton;
+  @NonNull
+  private final View switchOnHoldButton;
 
-  @NonNull private View onHoldBanner;
+  @NonNull
+  private final View onHoldBanner;
 
   private boolean isVisible;
 
diff --git a/java/com/android/voicemail/impl/OmtpConstants.java b/java/com/android/voicemail/impl/OmtpConstants.java
index aa09ff5..593cc98 100644
--- a/java/com/android/voicemail/impl/OmtpConstants.java
+++ b/java/com/android/voicemail/impl/OmtpConstants.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -232,7 +233,7 @@
     return String.format("%s.%s.%s", manufacturer, model, version);
   }
 
-  private static final String truncate(String string, int length) {
+  private static String truncate(String string, int length) {
     return string.substring(0, Math.min(length, string.length()));
   }
 
diff --git a/java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java b/java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java
index 96994f3..9178bbe 100644
--- a/java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java
+++ b/java/com/android/voicemail/impl/OmtpVvmCarrierConfigHelper.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -98,7 +99,7 @@
   @Nullable
   private final PersistableBundle overrideConfig;
 
-  private PhoneAccountHandle phoneAccountHandle;
+  private final PhoneAccountHandle phoneAccountHandle;
 
   public OmtpVvmCarrierConfigHelper(Context context, @Nullable PhoneAccountHandle handle) {
     this.context = context;
diff --git a/java/com/android/voicemail/impl/VoicemailStatus.java b/java/com/android/voicemail/impl/VoicemailStatus.java
index d04df77..0599977 100644
--- a/java/com/android/voicemail/impl/VoicemailStatus.java
+++ b/java/com/android/voicemail/impl/VoicemailStatus.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -36,7 +37,7 @@
     @Nullable
     private final PhoneAccountHandle phoneAccountHandle;
 
-    private ContentValues values = new ContentValues();
+    private final ContentValues values = new ContentValues();
 
     private Editor(Context context, PhoneAccountHandle phoneAccountHandle) {
       this.context = context;
diff --git a/java/com/android/voicemail/impl/VvmPhoneStateListener.java b/java/com/android/voicemail/impl/VvmPhoneStateListener.java
index a9082e8..ff8b106 100644
--- a/java/com/android/voicemail/impl/VvmPhoneStateListener.java
+++ b/java/com/android/voicemail/impl/VvmPhoneStateListener.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -31,8 +32,8 @@
 
   private static final String TAG = "VvmPhoneStateListener";
 
-  private PhoneAccountHandle phoneAccount;
-  private Context context;
+  private final PhoneAccountHandle phoneAccount;
+  private final Context context;
   private int previousState = -1;
 
   public VvmPhoneStateListener(Context context, PhoneAccountHandle accountHandle) {
diff --git a/java/com/android/voicemail/impl/imap/ImapHelper.java b/java/com/android/voicemail/impl/imap/ImapHelper.java
index edf7a61..f2c2e5f 100644
--- a/java/com/android/voicemail/impl/imap/ImapHelper.java
+++ b/java/com/android/voicemail/impl/imap/ImapHelper.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -69,7 +70,7 @@
   private static final String TAG = "ImapHelper";
 
   private ImapFolder folder;
-  private ImapStore imapStore;
+  private final ImapStore imapStore;
 
   private final Context context;
   private final PhoneAccountHandle phoneAccount;
diff --git a/java/com/android/voicemail/impl/mail/MessagingException.java b/java/com/android/voicemail/impl/mail/MessagingException.java
index fda5fbc..8522769 100644
--- a/java/com/android/voicemail/impl/mail/MessagingException.java
+++ b/java/com/android/voicemail/impl/mail/MessagingException.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -70,9 +71,9 @@
   /** The server indicates it experienced an internal error */
   public static final int SERVER_ERROR = 19;
 
-  protected int exceptionType;
+  protected final int exceptionType;
   // Exception type-specific data
-  protected Object exceptionData;
+  protected final Object exceptionData;
 
   public MessagingException(String message, Throwable throwable) {
     this(UNSPECIFIED_EXCEPTION, message, throwable);
diff --git a/java/com/android/voicemail/impl/mail/Multipart.java b/java/com/android/voicemail/impl/mail/Multipart.java
index c226ca5..429a262 100644
--- a/java/com/android/voicemail/impl/mail/Multipart.java
+++ b/java/com/android/voicemail/impl/mail/Multipart.java
@@ -20,7 +20,7 @@
 public abstract class Multipart implements Body {
   protected Part parent;
 
-  protected ArrayList<BodyPart> parts = new ArrayList<BodyPart>();
+  protected final ArrayList<BodyPart> parts = new ArrayList<>();
 
   protected String contentType;
 
diff --git a/java/com/android/voicemail/impl/mail/PackedString.java b/java/com/android/voicemail/impl/mail/PackedString.java
index de04b6b..5b74b56 100644
--- a/java/com/android/voicemail/impl/mail/PackedString.java
+++ b/java/com/android/voicemail/impl/mail/PackedString.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -36,7 +37,7 @@
 
   private static final char DELIMITER_TAG = '\2';
 
-  private String string;
+  private final String string;
   private ArrayMap<String, String> exploded;
   private static final ArrayMap<String, String> EMPTY_MAP = new ArrayMap<String, String>();
 
@@ -118,7 +119,7 @@
    * PackedString representations.
    */
   public static class Builder {
-    ArrayMap<String, String> map;
+    final ArrayMap<String, String> map;
 
     /** Create a builder that's empty (for filling) */
     public Builder() {
diff --git a/java/com/android/voicemail/impl/mail/internet/MimeBodyPart.java b/java/com/android/voicemail/impl/mail/internet/MimeBodyPart.java
index 12a2b0b..5445611 100644
--- a/java/com/android/voicemail/impl/mail/internet/MimeBodyPart.java
+++ b/java/com/android/voicemail/impl/mail/internet/MimeBodyPart.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -27,7 +28,7 @@
 
 /** TODO this is a close approximation of Message, need to update along with Message. */
 public class MimeBodyPart extends BodyPart {
-  protected MimeHeader header = new MimeHeader();
+  protected final MimeHeader header = new MimeHeader();
   protected MimeHeader extendedHeader;
   protected Body body;
   protected int size;
diff --git a/java/com/android/voicemail/impl/mail/internet/MimeHeader.java b/java/com/android/voicemail/impl/mail/internet/MimeHeader.java
index 00a9ecc..17d2556 100644
--- a/java/com/android/voicemail/impl/mail/internet/MimeHeader.java
+++ b/java/com/android/voicemail/impl/mail/internet/MimeHeader.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -143,12 +144,12 @@
     return (fields == null) ? null : fields.toString();
   }
 
-  public static final boolean arrayContains(Object[] a, Object o) {
+  public static boolean arrayContains(Object[] a, Object o) {
     int index = arrayIndex(a, o);
     return (index >= 0);
   }
 
-  public static final int arrayIndex(Object[] a, Object o) {
+  public static int arrayIndex(Object[] a, Object o) {
     for (int i = 0, count = a.length; i < count; i++) {
       if (a[i].equals(o)) {
         return i;
diff --git a/java/com/android/voicemail/impl/mail/internet/TextBody.java b/java/com/android/voicemail/impl/mail/internet/TextBody.java
index 506e1f5..b3bccb7 100644
--- a/java/com/android/voicemail/impl/mail/internet/TextBody.java
+++ b/java/com/android/voicemail/impl/mail/internet/TextBody.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,7 +26,7 @@
 import java.io.UnsupportedEncodingException;
 
 public class TextBody implements Body {
-  String body;
+  final String body;
 
   public TextBody(String body) {
     this.body = body;
diff --git a/java/com/android/voicemail/impl/mail/store/ImapConnection.java b/java/com/android/voicemail/impl/mail/store/ImapConnection.java
index ac43f8d..31511b7 100644
--- a/java/com/android/voicemail/impl/mail/store/ImapConnection.java
+++ b/java/com/android/voicemail/impl/mail/store/ImapConnection.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -46,7 +47,7 @@
   private ImapStore imapStore;
   private MailTransport transport;
   private ImapResponseParser parser;
-  private Set<String> capabilities = new ArraySet<>();
+  private final Set<String> capabilities = new ArraySet<>();
 
   static final String IMAP_REDACTED_LOG = "[IMAP command redacted]";
 
diff --git a/java/com/android/voicemail/impl/mail/store/ImapFolder.java b/java/com/android/voicemail/impl/mail/store/ImapFolder.java
index d0a8fe0..bf99dde 100644
--- a/java/com/android/voicemail/impl/mail/store/ImapFolder.java
+++ b/java/com/android/voicemail/impl/mail/store/ImapFolder.java
@@ -743,7 +743,7 @@
     exists = true;
   }
 
-  public class Quota {
+  public static class Quota {
 
     public final int occupied;
     public final int total;
diff --git a/java/com/android/voicemail/impl/mail/store/ImapStore.java b/java/com/android/voicemail/impl/mail/store/ImapStore.java
index 44b78be..3561da1 100644
--- a/java/com/android/voicemail/impl/mail/store/ImapStore.java
+++ b/java/com/android/voicemail/impl/mail/store/ImapStore.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -101,7 +102,7 @@
   }
 
   static class ImapMessage extends MimeMessage {
-    private ImapFolder folder;
+    private final ImapFolder folder;
 
     ImapMessage(String uid, ImapFolder folder) {
       this.uid = uid;
diff --git a/java/com/android/voicemail/impl/mail/store/imap/DigestMd5Utils.java b/java/com/android/voicemail/impl/mail/store/imap/DigestMd5Utils.java
index 133209c..7be99b5 100644
--- a/java/com/android/voicemail/impl/mail/store/imap/DigestMd5Utils.java
+++ b/java/com/android/voicemail/impl/mail/store/imap/DigestMd5Utils.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -54,14 +55,14 @@
 
     private static final String CHARSET = "utf-8";
 
-    public String username;
-    public String password;
-    public String realm;
-    public String nonce;
-    public String nc;
-    public String cnonce;
-    public String digestUri;
-    public String qop;
+    public final String username;
+    public final String password;
+    public final String realm;
+    public final String nonce;
+    public final String nc;
+    public final String cnonce;
+    public final String digestUri;
+    public final String qop;
 
     public Data(ImapStore imapStore, MailTransport transport, Map<String, String> challenge) {
       username = imapStore.getUsername();
@@ -114,7 +115,7 @@
 
     private static class ResponseBuilder {
 
-      private StringBuilder builder = new StringBuilder();
+      private final StringBuilder builder = new StringBuilder();
 
       public ResponseBuilder appendQuoted(String key, String value) {
         if (builder.length() != 0) {
@@ -223,7 +224,7 @@
 
     private final String message;
     private int position = 0;
-    private Map<String, String> result = new ArrayMap<>();
+    private final Map<String, String> result = new ArrayMap<>();
 
     public DigestMessageParser(String message) {
       this.message = message;
diff --git a/java/com/android/voicemail/impl/mail/store/imap/ImapList.java b/java/com/android/voicemail/impl/mail/store/imap/ImapList.java
index a72883f..9fcd562 100644
--- a/java/com/android/voicemail/impl/mail/store/imap/ImapList.java
+++ b/java/com/android/voicemail/impl/mail/store/imap/ImapList.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -190,7 +191,7 @@
    * <p>We can't use toString(), because it's for debugging (meaning the format may change any
    * time), and it won't expand literals.
    */
-  private final StringBuilder flatten(StringBuilder sb) {
+  private StringBuilder flatten(StringBuilder sb) {
     sb.append('[');
     for (int i = 0; i < list.size(); i++) {
       if (i > 0) {
diff --git a/java/com/android/voicemail/impl/mail/store/imap/ImapSimpleString.java b/java/com/android/voicemail/impl/mail/store/imap/ImapSimpleString.java
index 76d3c6e..9fb5c7b 100644
--- a/java/com/android/voicemail/impl/mail/store/imap/ImapSimpleString.java
+++ b/java/com/android/voicemail/impl/mail/store/imap/ImapSimpleString.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -23,7 +24,7 @@
 
 /** Subclass of {@link ImapString} used for non literals. */
 public class ImapSimpleString extends ImapString {
-  private final String TAG = "ImapSimpleString";
+  private static final String TAG = "ImapSimpleString";
   private String string;
 
   /* package */ ImapSimpleString(String string) {
diff --git a/java/com/android/voicemail/impl/protocol/CvvmProtocol.java b/java/com/android/voicemail/impl/protocol/CvvmProtocol.java
index a4b54f6..ae5c6d9 100644
--- a/java/com/android/voicemail/impl/protocol/CvvmProtocol.java
+++ b/java/com/android/voicemail/impl/protocol/CvvmProtocol.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -29,9 +30,9 @@
  */
 public class CvvmProtocol extends VisualVoicemailProtocol {
 
-  private static String IMAP_CHANGE_TUI_PWD_FORMAT = "CHANGE_TUI_PWD PWD=%1$s OLD_PWD=%2$s";
-  private static String IMAP_CHANGE_VM_LANG_FORMAT = "CHANGE_VM_LANG Lang=%1$s";
-  private static String IMAP_CLOSE_NUT = "CLOSE_NUT";
+  private static final String IMAP_CHANGE_TUI_PWD_FORMAT = "CHANGE_TUI_PWD PWD=%1$s OLD_PWD=%2$s";
+  private static final String IMAP_CHANGE_VM_LANG_FORMAT = "CHANGE_VM_LANG Lang=%1$s";
+  private static final String IMAP_CLOSE_NUT = "CLOSE_NUT";
 
   @Override
   public OmtpMessageSender createMessageSender(
diff --git a/java/com/android/voicemail/impl/scheduling/MinimalIntervalPolicy.java b/java/com/android/voicemail/impl/scheduling/MinimalIntervalPolicy.java
index 6d6a0a1..df4d5c8 100644
--- a/java/com/android/voicemail/impl/scheduling/MinimalIntervalPolicy.java
+++ b/java/com/android/voicemail/impl/scheduling/MinimalIntervalPolicy.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -29,7 +30,7 @@
 
   BaseTask task;
   TaskId id;
-  int blockForMillis;
+  final int blockForMillis;
 
   public MinimalIntervalPolicy(int blockForMillis) {
     this.blockForMillis = blockForMillis;
diff --git a/java/com/android/voicemail/impl/sms/StatusSmsFetcher.java b/java/com/android/voicemail/impl/sms/StatusSmsFetcher.java
index 883827b..9a41c11 100644
--- a/java/com/android/voicemail/impl/sms/StatusSmsFetcher.java
+++ b/java/com/android/voicemail/impl/sms/StatusSmsFetcher.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -60,7 +61,7 @@
 
   private static final int ACTION_REQUEST_SENT_REQUEST_CODE = 0;
 
-  private CompletableFuture<Bundle> future = new CompletableFuture<>();
+  private final CompletableFuture<Bundle> future = new CompletableFuture<>();
 
   private final Context context;
   private final PhoneAccountHandle phoneAccountHandle;
diff --git a/java/com/android/voicemail/impl/sync/OmtpVvmSyncService.java b/java/com/android/voicemail/impl/sync/OmtpVvmSyncService.java
index 439afd9..561ba63 100644
--- a/java/com/android/voicemail/impl/sync/OmtpVvmSyncService.java
+++ b/java/com/android/voicemail/impl/sync/OmtpVvmSyncService.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -301,8 +302,8 @@
   /** Callback for {@link ImapHelper#fetchTranscription(TranscriptionFetchedCallback, String)} */
   public static class TranscriptionFetchedCallback {
 
-    private Context context;
-    private Voicemail voicemail;
+    private final Context context;
+    private final Voicemail voicemail;
 
     public TranscriptionFetchedCallback(Context context, Voicemail voicemail) {
       this.context = context;
diff --git a/java/com/android/voicemail/impl/sync/VoicemailStatusQueryHelper.java b/java/com/android/voicemail/impl/sync/VoicemailStatusQueryHelper.java
index 259d79b..4cdf330 100644
--- a/java/com/android/voicemail/impl/sync/VoicemailStatusQueryHelper.java
+++ b/java/com/android/voicemail/impl/sync/VoicemailStatusQueryHelper.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -39,9 +40,9 @@
   public static final int NOTIFICATION_CHANNEL_STATE = 2;
   public static final int SOURCE_PACKAGE = 3;
 
-  private Context context;
-  private ContentResolver contentResolver;
-  private Uri sourceUri;
+  private final Context context;
+  private final ContentResolver contentResolver;
+  private final Uri sourceUri;
 
   public VoicemailStatusQueryHelper(Context context) {
     this.context = context;
diff --git a/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java b/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java
index a033ba8..43ba5af 100644
--- a/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java
+++ b/java/com/android/voicemail/impl/sync/VoicemailsQueryHelper.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -52,9 +53,9 @@
   static final String DELETED_SELECTION = Voicemails.DELETED + "=1";
   static final String ARCHIVED_SELECTION = Voicemails.ARCHIVED + "=0";
 
-  private Context context;
-  private ContentResolver contentResolver;
-  private Uri sourceUri;
+  private final Context context;
+  private final ContentResolver contentResolver;
+  private final Uri sourceUri;
 
   public VoicemailsQueryHelper(Context context) {
     this.context = context;
diff --git a/java/com/android/voicemail/impl/sync/VvmNetworkRequestCallback.java b/java/com/android/voicemail/impl/sync/VvmNetworkRequestCallback.java
index 8136f43..1fdf917 100644
--- a/java/com/android/voicemail/impl/sync/VvmNetworkRequestCallback.java
+++ b/java/com/android/voicemail/impl/sync/VvmNetworkRequestCallback.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -50,9 +51,9 @@
   public static final String NETWORK_REQUEST_FAILED_TIMEOUT = "timeout";
   public static final String NETWORK_REQUEST_FAILED_LOST = "lost";
 
-  protected Context context;
-  protected PhoneAccountHandle phoneAccount;
-  protected NetworkRequest networkRequest;
+  protected final Context context;
+  protected final PhoneAccountHandle phoneAccount;
+  protected final NetworkRequest networkRequest;
   private ConnectivityManager connectivityManager;
   private final OmtpVvmCarrierConfigHelper carrierConfigHelper;
   private final VoicemailStatus.Editor status;
diff --git a/java/com/android/voicemail/impl/utils/IndentingPrintWriter.java b/java/com/android/voicemail/impl/utils/IndentingPrintWriter.java
index b72aece..ab00c6b 100644
--- a/java/com/android/voicemail/impl/utils/IndentingPrintWriter.java
+++ b/java/com/android/voicemail/impl/utils/IndentingPrintWriter.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,7 +34,7 @@
   private final int wrapLength;
 
   /** Mutable version of current indent */
-  private StringBuilder indentBuilder = new StringBuilder();
+  private final StringBuilder indentBuilder = new StringBuilder();
   /** Cache of current {@link #indentBuilder} value */
   private char[] currentIndent;
   /** Length of current line being built, excluding any indent */
@@ -45,7 +46,7 @@
    */
   private boolean emptyLine = true;
 
-  private char[] singleChar = new char[1];
+  private final char[] singleChar = new char[1];
 
   public IndentingPrintWriter(Writer writer, String singleIndent) {
     this(writer, singleIndent, -1);
diff --git a/java/com/android/voicemail/impl/utils/XmlUtils.java b/java/com/android/voicemail/impl/utils/XmlUtils.java
index f5703f3..4abb34c 100644
--- a/java/com/android/voicemail/impl/utils/XmlUtils.java
+++ b/java/com/android/voicemail/impl/utils/XmlUtils.java
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2023 The LineageOS Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,7 +26,7 @@
 
 public class XmlUtils {
 
-  public static final ArrayMap<String, ?> readThisArrayMapXml(
+  public static ArrayMap<String, ?> readThisArrayMapXml(
       XmlPullParser parser, String endTag, String[] name, ReadMapCallback callback)
       throws XmlPullParserException, java.io.IOException {
     ArrayMap<String, Object> map = new ArrayMap<>();
@@ -57,7 +58,7 @@
    * @param name An array of one string, used to return the name attribute of the list's tag.
    * @return HashMap The newly generated list.
    */
-  public static final ArrayList readThisListXml(
+  public static ArrayList readThisListXml(
       XmlPullParser parser,
       String endTag,
       String[] name,
@@ -197,7 +198,7 @@
     throw new XmlPullParserException("Unexpected end of document in <" + tagName + ">");
   }
 
-  private static final Object readThisPrimitiveValueXml(XmlPullParser parser, String tagName)
+  private static Object readThisPrimitiveValueXml(XmlPullParser parser, String tagName)
       throws XmlPullParserException, java.io.IOException {
     try {
       if (tagName.equals("int")) {