From f5251dc6b9f65a458114c266ce11757184fc22a1 Mon Sep 17 00:00:00 2001 From: Scott Warner Date: Wed, 24 Jun 2020 15:38:56 -0400 Subject: Dialer: Use a DayNight launch theme This prevents the white launch screen from appearing when the system theme is dark Change-Id: I1ee8ff493910578b5e5c9de67ea1f7390178051a --- java/com/android/dialer/main/impl/AndroidManifest.xml | 2 +- java/com/android/dialer/main/impl/MainActivity.java | 2 ++ java/com/android/dialer/main/impl/res/values/styles.xml | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'java') diff --git a/java/com/android/dialer/main/impl/AndroidManifest.xml b/java/com/android/dialer/main/impl/AndroidManifest.xml index a1ed5eb9e..55eea5d66 100644 --- a/java/com/android/dialer/main/impl/AndroidManifest.xml +++ b/java/com/android/dialer/main/impl/AndroidManifest.xml @@ -30,7 +30,7 @@ android:label="@string/main_activity_label" android:launchMode="singleTask" android:resizeableActivity="true" - android:theme="@style/MainActivityTheme" + android:theme="@style/LaunchTheme" android:windowSoftInputMode="stateAlwaysHidden|adjustNothing"> diff --git a/java/com/android/dialer/main/impl/MainActivity.java b/java/com/android/dialer/main/impl/MainActivity.java index 1129609ed..f539bdcee 100644 --- a/java/com/android/dialer/main/impl/MainActivity.java +++ b/java/com/android/dialer/main/impl/MainActivity.java @@ -29,6 +29,7 @@ import com.android.dialer.interactions.PhoneNumberInteraction.InteractionErrorCo import com.android.dialer.interactions.PhoneNumberInteraction.InteractionErrorListener; import com.android.dialer.main.MainActivityPeer; import com.android.dialer.main.impl.bottomnav.BottomNavBar.TabIndex; +import com.android.dialer.R; import com.android.dialer.util.TransactionSafeActivity; /** This is the main activity for dialer. It hosts favorites, call log, search, dialpad, etc... */ @@ -72,6 +73,7 @@ public class MainActivity extends TransactionSafeActivity @Override protected void onCreate(Bundle savedInstanceState) { + setTheme(R.style.MainActivityTheme); super.onCreate(savedInstanceState); LogUtil.enterBlock("MainActivity.onCreate"); // If peer was set by the super, don't reset it. diff --git a/java/com/android/dialer/main/impl/res/values/styles.xml b/java/com/android/dialer/main/impl/res/values/styles.xml index 25f247e15..139b8b249 100644 --- a/java/com/android/dialer/main/impl/res/values/styles.xml +++ b/java/com/android/dialer/main/impl/res/values/styles.xml @@ -16,6 +16,13 @@ --> + +