FragmentUtils { @SuppressWarnings("deprecation") public static boolean areAnimationsEnabled(@NonNull final Context context) { float animatorDurationScale = -1; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { animatorDurationScale = Settings.Global.getFloat( context.getContentResolver(), Settings.Global.ANIMATOR_DURATION_SCALE, animatorDurationScale ); } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { animatorDurationScale = Settings.System.getFloat( context.getContentResolver(), Settings.System.ANIMATOR_DURATION_SCALE, animatorDurationScale ); } return animatorDurationScale == -1 || animatorDurationScale > 0; } private  FragmentUtils(); static boolean willBeCustomAnimationsPlayed(@NonNull final Context context); static boolean isPowerSaveModeActive(@NonNull final Context context); @SuppressWarnings("deprecation") static boolean areAnimationsEnabled(@NonNull final Context context); @SuppressLint("NewApi") @Nullable static Transition inflateTransition(@NonNull final Context context, @TransitionRes final int resource); @SuppressLint("NewApi") @Nullable static TransitionManager inflateTransitionManager(
			@NonNull final Context context,
			@TransitionRes final int resource,
			@NonNull final ViewGroup sceneRoot
	); @Nullable static Drawable getVectorDrawable(
			@NonNull final Resources resources,
			@DrawableRes final int resId,
			@Nullable final Resources.Theme theme
	); @SuppressWarnings({"NewApi", "deprecation"}) @Nullable static Drawable getDrawable(
			@NonNull final Resources resources,
			@DrawableRes final int resId,
			@Nullable final Resources.Theme theme
	);  }
@Test public void testAreAnimationsEnabled() { assertThat(FragmentUtils.areAnimationsEnabled(context), is(true)); }