LOCATION_MODE_HIGH_ACCURACY_DENIED
This will be returned on devices running on Android versions 4.4 to 8.1 when user has not set location mode as Settings.Secure (https://developer.android.com/reference/android/provider/Settings.Secure.html?is-external=true#LOCATION_MODE_HIGH_ACCURACY). In android versions 4.4 to Android 8.1, a user can choose location mode based on accuracy, speed, and battery use.
Settings.Secure (https://developer.android.com/reference/android/provider/Settings.Secure.html?is-external=true#LOCATION_MODE_HIGH_ACCURACY): Use GPS, Wi-Fi, mobile networks, and sensors to get the most accurate location. Use Google Location Services to help estimate your phone's location faster and more accurately.
Settings.Secure (https://developer.android.com/reference/android/provider/Settings.Secure.html?is-external=true#LOCATION_MODE_HIGH_ACCURACY): Use sources that use less battery, like Wi-Fi and mobile networks. Use Google Location Services to help estimate your phone's location faster and more accurately.
Settings.Secure (https://developer.android.com/reference/android/provider/Settings.Secure.html?is-external=true#LOCATION_MODE_HIGH_ACCURACY): Use only GPS. Do not use Google Location Services to provide location information. This can estimate your phone's location more slowly and use more battery.
Settings.Secure (https://developer.android.com/reference/android/provider/Settings.Secure.html?is-external=true#LOCATION_MODE_HIGH_ACCURACY) is the best among above three modes for trip detection.