Added compatibility with Android P (Pie)