SpoofProvider: Use Locale.Builder to construct locale for spoofing
Locale() constructor has been deprecated and the new of() method is API 36. Locale.Builder is backwards compatible. Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -79,10 +79,10 @@ class SpoofProvider @Inject constructor(
|
|||||||
get() = Preferences.getBoolean(context, DEVICE_SPOOF_ENABLED)
|
get() = Preferences.getBoolean(context, DEVICE_SPOOF_ENABLED)
|
||||||
|
|
||||||
private val spoofLocale: Locale
|
private val spoofLocale: Locale
|
||||||
get() = Locale(
|
get() = Locale.Builder()
|
||||||
Preferences.getString(context, LOCALE_SPOOF_LANG),
|
.setLanguage(Preferences.getString(context, LOCALE_SPOOF_LANG))
|
||||||
Preferences.getString(context, LOCALE_SPOOF_COUNTRY)
|
.setRegion(Preferences.getString(context, LOCALE_SPOOF_COUNTRY))
|
||||||
)
|
.build()
|
||||||
|
|
||||||
private val spoofDeviceProperties: Properties
|
private val spoofDeviceProperties: Properties
|
||||||
get() = gson.fromJson(
|
get() = gson.fromJson(
|
||||||
|
|||||||
Reference in New Issue
Block a user