Testing device performance to enable/disable animations

In my application, there is two complex forms in which I use animations (new angular 2 animations engine) to display/hide some fields depending on user entries.
On old devices (android 4.2 and 4.4), animations are not smooth.
So I’d like to disable animations on oldest devices.
How to know/test if the device on which the app is running is a recent and fast enough to enable animations?