Removed "last_tab_enabled" flag.
END_PUBLIC

The bottom nav buttons do not work correctly when this flag is not enabled (see bugs). This flag is intended to always be true via an experiment but can be false for example when the user clears data or just launched dialer for the first time and hasn't received config flags.

It is not likely that we will ever want to turn off this behavior, so this change simply removes all support for it.

TEST=unit
Bug: 109762667,79485008
Test: unit
PiperOrigin-RevId: 199660314
Change-Id: I105f6c553c7541673b6d5dd7abf4d29f566e155f
diff --git a/java/com/android/dialer/main/impl/OldMainActivityPeer.java b/java/com/android/dialer/main/impl/OldMainActivityPeer.java
index 9169dc3..165d108 100644
--- a/java/com/android/dialer/main/impl/OldMainActivityPeer.java
+++ b/java/com/android/dialer/main/impl/OldMainActivityPeer.java
@@ -441,11 +441,9 @@
     } else if (isShowTabIntent(intent)) {
       LogUtil.i("OldMainActivityPeer.onHandleIntent", "Show tab intent");
       tabToSelect = getTabFromIntent(intent);
-    } else if (lastTabController.isEnabled) {
+    } else {
       LogUtil.i("OldMainActivityPeer.onHandleIntent", "Show last tab");
       tabToSelect = lastTabController.getLastTab();
-    } else {
-      tabToSelect = TabIndex.SPEED_DIAL;
     }
     logImpressionForSelectedTab(tabToSelect);
     bottomNav.selectTab(tabToSelect);
@@ -1614,29 +1612,26 @@
 
     private final Context context;
     private final BottomNavBar bottomNavBar;
-    private final boolean isEnabled;
     private final boolean canShowVoicemailTab;
 
     LastTabController(Context context, BottomNavBar bottomNavBar, boolean canShowVoicemailTab) {
       this.context = context;
       this.bottomNavBar = bottomNavBar;
-      isEnabled =
-          ConfigProviderComponent.get(context)
-              .getConfigProvider()
-              .getBoolean("last_tab_enabled", false);
       this.canShowVoicemailTab = canShowVoicemailTab;
     }
 
-    /** Sets the last tab if the feature is enabled, otherwise defaults to speed dial. */
+    /**
+     * Get the last tab shown to the user, or the speed dial tab if this is the first time the user
+     * has opened the app.
+     */
     @TabIndex
     int getLastTab() {
       @TabIndex int tabIndex = TabIndex.SPEED_DIAL;
-      if (isEnabled) {
-        tabIndex =
-            StorageComponent.get(context)
-                .unencryptedSharedPrefs()
-                .getInt(KEY_LAST_TAB, TabIndex.SPEED_DIAL);
-      }
+
+      tabIndex =
+          StorageComponent.get(context)
+              .unencryptedSharedPrefs()
+              .getInt(KEY_LAST_TAB, TabIndex.SPEED_DIAL);
 
       // If the voicemail tab cannot be shown, default to showing speed dial
       if (tabIndex == TabIndex.VOICEMAIL && !canShowVoicemailTab) {