diff --git a/java/com/android/dialer/app/DialtactsActivity.java b/java/com/android/dialer/app/DialtactsActivity.java
index 4b0384e..23f4d40 100644
--- a/java/com/android/dialer/app/DialtactsActivity.java
+++ b/java/com/android/dialer/app/DialtactsActivity.java
@@ -119,8 +119,6 @@
 import com.android.dialer.logging.LoggingBindings;
 import com.android.dialer.logging.ScreenEvent;
 import com.android.dialer.logging.UiAction;
-import com.android.dialer.main.Main;
-import com.android.dialer.main.MainComponent;
 import com.android.dialer.p13n.inference.P13nRanking;
 import com.android.dialer.p13n.inference.protocol.P13nRanker;
 import com.android.dialer.p13n.inference.protocol.P13nRanker.P13nRefreshCompleteListener;
@@ -798,7 +796,7 @@
       Logger.get(this).logScreenView(ScreenEvent.Type.SETTINGS, this);
       return true;
     } else if (resId == R.id.menu_new_ui_launcher_shortcut) {
-      MainComponent.get(this).getMain().createNewUiLauncherShortcut(this);
+      MainComponent.createNewUiLauncherShortcut(this);
       return true;
     }
     return false;
@@ -1752,9 +1750,8 @@
         simulatorMenuItem.setVisible(false);
       }
 
-      Main dialtacts = MainComponent.get(context).getMain();
       menu.findItem(R.id.menu_new_ui_launcher_shortcut)
-          .setVisible(dialtacts.isNewUiEnabled(context));
+          .setVisible(MainComponent.isNewUiEnabled(context));
 
       super.show();
     }
diff --git a/java/com/android/dialer/app/MainComponent.java b/java/com/android/dialer/app/MainComponent.java
new file mode 100644
index 0000000..b19ad90
--- /dev/null
+++ b/java/com/android/dialer/app/MainComponent.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.dialer.app;
+
+import android.annotation.TargetApi;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.os.Build;
+import android.os.Build.VERSION_CODES;
+import android.support.v4.content.pm.ShortcutInfoCompat;
+import android.support.v4.content.pm.ShortcutManagerCompat;
+import android.support.v4.graphics.drawable.IconCompat;
+import com.android.dialer.configprovider.ConfigProviderBindings;
+
+/** This class is a copy of dialer.main.impl.MainImpl to get around a dependency issue. */
+public class MainComponent {
+
+  private static final String SHORTCUT_KEY = "nui_launcher_shortcut";
+
+  public static boolean isNewUiEnabled(Context context) {
+    return ConfigProviderBindings.get(context).getBoolean("is_nui_shortcut_enabled", false);
+  }
+
+  public static void createNewUiLauncherShortcut(Context context) {
+    enableComponent(context);
+    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+      createLauncherShortcutO(context);
+    } else {
+      createLauncherShortcutPreO(context);
+    }
+  }
+
+  /**
+   * Enables the NUI activity component. By default the component is disabled and can't be accessed.
+   * Once the component has been enabled the user will get an option to use the new UI to handle
+   * DIAL (and other) intents.
+   */
+  private static void enableComponent(Context context) {
+    context
+        .getPackageManager()
+        .setComponentEnabledSetting(
+            new ComponentName(context, "com.android.dialer.main.impl.MainActivity"),
+            PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
+            PackageManager.DONT_KILL_APP);
+  }
+
+  @TargetApi(VERSION_CODES.O)
+  private static void createLauncherShortcutO(Context context) {
+    ShortcutInfoCompat shortcutInfo =
+        new ShortcutInfoCompat.Builder(context, SHORTCUT_KEY)
+            .setIcon(IconCompat.createWithResource(context, R.drawable.nui_launcher_icon))
+            .setIntent(getIntent(context))
+            .setShortLabel(context.getString(R.string.nui_shortcut_name))
+            .build();
+    ShortcutManagerCompat.requestPinShortcut(context, shortcutInfo, null);
+  }
+
+  private static void createLauncherShortcutPreO(Context context) {
+    Intent intent = new Intent("com.android.launcher.action.INSTALL_SHORTCUT");
+    intent.putExtra(
+        Intent.EXTRA_SHORTCUT_ICON,
+        Intent.ShortcutIconResource.fromContext(context, R.drawable.nui_launcher_icon));
+    intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, context.getString(R.string.nui_shortcut_name));
+    intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, getIntent(context));
+    context.sendBroadcast(intent);
+  }
+
+  /**
+   * @param context Context of the application package implementing MainActivity class.
+   * @return intent for MainActivity.class
+   */
+  public static Intent getIntent(Context context) {
+    Intent intent = new Intent();
+    intent.setComponent(new ComponentName(context, "com.android.dialer.main.impl.MainActivity"));
+    intent.setAction(Intent.ACTION_VIEW);
+    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+    return intent;
+  }
+}
diff --git a/java/com/android/dialer/app/res/drawable-xxxhdpi/nui_launcher_icon.png b/java/com/android/dialer/app/res/drawable-xxxhdpi/nui_launcher_icon.png
new file mode 100644
index 0000000..7845ebc
--- /dev/null
+++ b/java/com/android/dialer/app/res/drawable-xxxhdpi/nui_launcher_icon.png
Binary files differ
diff --git a/java/com/android/dialer/app/res/values/strings.xml b/java/com/android/dialer/app/res/values/strings.xml
index 5554059..d4f3f81 100644
--- a/java/com/android/dialer/app/res/values/strings.xml
+++ b/java/com/android/dialer/app/res/values/strings.xml
@@ -716,4 +716,8 @@
   <!-- If a user deletes a call that has attachments (photo, message, ect) bundled with it, they need
         to be told that they need to go to the SMS app to delete the attachments. [CHAR LIMIT=NONE] -->
   <string name="multiple_ec_data_deleted">Calls deleted. View and delete attachments shared during calls in Messages.</string>
+
+  <!-- Name of launcher shortcut for the new UI main activity.
+       TODO(38502365): Remove this once we're ready to launch the new UI. -->
+  <string translatable="false" name="nui_shortcut_name">Phone NUI</string>
 </resources>
diff --git a/java/com/android/voicemail/impl/OmtpService.java b/java/com/android/voicemail/impl/OmtpService.java
index 4e8860c..e10a275 100644
--- a/java/com/android/voicemail/impl/OmtpService.java
+++ b/java/com/android/voicemail/impl/OmtpService.java
@@ -197,14 +197,14 @@
   }
 
   private static void setShuttingDown(Context context, boolean value) {
-    PreferenceManager.getDefaultSharedPreferences(context)
+    PreferenceManager.getDefaultSharedPreferences(context.getApplicationContext())
         .edit()
         .putBoolean(IS_SHUTTING_DOWN, value)
         .apply();
   }
 
   private static boolean isShuttingDown(Context context) {
-    return PreferenceManager.getDefaultSharedPreferences(context)
+    return PreferenceManager.getDefaultSharedPreferences(context.getApplicationContext())
         .getBoolean(IS_SHUTTING_DOWN, false);
   }
 }
diff --git a/java/com/android/voicemail/impl/VisualVoicemailPreferences.java b/java/com/android/voicemail/impl/VisualVoicemailPreferences.java
index 72506eb..1d7204e 100644
--- a/java/com/android/voicemail/impl/VisualVoicemailPreferences.java
+++ b/java/com/android/voicemail/impl/VisualVoicemailPreferences.java
@@ -31,7 +31,7 @@
     super(
         context,
         phoneAccountHandle,
-        PreferenceManager.getDefaultSharedPreferences(context),
+        PreferenceManager.getDefaultSharedPreferences(context.getApplicationContext()),
         "visual_voicemail_");
   }
 }
