1 package org.robolectric.fakes; 2 3 import android.annotation.RequiresApi; 4 import android.annotation.StyleRes; 5 import android.os.Build; 6 import android.window.SplashScreen; 7 8 /** Robolectric implementation of {@link android.window.SplashScreen}. */ 9 @RequiresApi(api = Build.VERSION_CODES.S) 10 public class RoboSplashScreen implements SplashScreen { 11 12 @StyleRes private int themeId; 13 14 @Override setOnExitAnimationListener(SplashScreen.OnExitAnimationListener listener)15 public void setOnExitAnimationListener(SplashScreen.OnExitAnimationListener listener) {} 16 17 @Override clearOnExitAnimationListener()18 public void clearOnExitAnimationListener() {} 19 20 @Override setSplashScreenTheme(@tyleRes int themeId)21 public void setSplashScreenTheme(@StyleRes int themeId) { 22 this.themeId = themeId; 23 } 24 25 @StyleRes getSplashScreenTheme()26 public int getSplashScreenTheme() { 27 return themeId; 28 } 29 } 30