Fix ugly flash between boot animation and setup wizard (1/2)
When FallbackHome is displayed before the setup wizard, we need to match the last frame of the boot animation in FallbackHome. Bug: 29054814 Change-Id: I4f0096d398341c3749820177cebc26dea85cea05
This commit is contained in:
19
res/drawable/fallback_home_unprovisioned_background.xml
Normal file
19
res/drawable/fallback_home_unprovisioned_background.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2016 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
|
||||
-->
|
||||
|
||||
<color xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="#000000" />
|
@@ -293,4 +293,13 @@
|
||||
<item name="android:navigationBarColor">#00000000</item>
|
||||
</style>
|
||||
|
||||
<style name="FallbackHome.SetupWizard" parent="@android:style/Theme.Material.NoActionBar.Fullscreen">
|
||||
<item name="android:windowBackground">@drawable/fallback_home_unprovisioned_background</item>
|
||||
<item name="android:colorBackgroundCacheHint">@null</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
||||
<item name="android:statusBarColor">#00000000</item>
|
||||
<item name="android:navigationBarColor">#00000000</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
@@ -28,6 +28,7 @@ import android.os.Message;
|
||||
import android.os.UserManager;
|
||||
import android.provider.Settings;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -42,7 +43,9 @@ public class FallbackHome extends Activity {
|
||||
// we don't flash the wallpaper before SUW
|
||||
if (Settings.Global.getInt(getContentResolver(),
|
||||
Settings.Global.DEVICE_PROVISIONED, 0) == 0) {
|
||||
setTheme(android.R.style.Theme_Black_NoTitleBar_Fullscreen);
|
||||
setTheme(R.style.FallbackHome_SetupWizard);
|
||||
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
|
||||
}
|
||||
|
||||
registerReceiver(mReceiver, new IntentFilter(Intent.ACTION_USER_UNLOCKED));
|
||||
|
Reference in New Issue
Block a user