Fixed feed when animations are off
Introduced a check if corresponding animations on the devices are enabled
This commit is contained in:
parent
2310e8c1d6
commit
38ce800685
2 changed files with 15 additions and 2 deletions
|
|
@ -6,6 +6,7 @@ import android.content.pm.PackageManager;
|
|||
import android.content.res.Configuration;
|
||||
import android.os.BatteryManager;
|
||||
import android.os.Build;
|
||||
import android.provider.Settings;
|
||||
import android.util.TypedValue;
|
||||
import android.view.KeyEvent;
|
||||
|
||||
|
|
@ -144,4 +145,11 @@ public final class DeviceUtils {
|
|||
public static boolean isInMultiWindow(final AppCompatActivity activity) {
|
||||
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && activity.isInMultiWindowMode();
|
||||
}
|
||||
|
||||
public static boolean hasAnimationsAnimatorDurationEnabled(final Context context) {
|
||||
return Settings.System.getFloat(
|
||||
context.getContentResolver(),
|
||||
Settings.Global.ANIMATOR_DURATION_SCALE,
|
||||
1F) != 0F;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue