Issue #128 device spoofing fixed

This commit is contained in:
Sergey Eremin
2017-04-12 15:07:12 +03:00
parent c32ae0275d
commit 74cd380055

View File

@@ -70,7 +70,7 @@ public class PlayStoreApiAuthenticator {
com.github.yeriomin.playstoreapi.PlayStoreApiBuilder builder = new com.github.yeriomin.playstoreapi.PlayStoreApiBuilder()
.setHttpClient(new NativeHttpClientAdapter())
.setDeviceInfoProvider(getDeviceInfoProvider())
.setLocale(new Locale(locale))
.setLocale(TextUtils.isEmpty(locale) ? Locale.getDefault() : new Locale(locale))
.setEmail(email)
.setPassword(password)
.setGsfId(gsfId)
@@ -102,6 +102,7 @@ public class PlayStoreApiAuthenticator {
} else {
deviceInfoProvider = new PropertiesDeviceInfoProvider();
((PropertiesDeviceInfoProvider) deviceInfoProvider).setProperties(new SpoofDeviceManager(context).getProperties(spoofDevice));
((PropertiesDeviceInfoProvider) deviceInfoProvider).setLocaleString(Locale.getDefault().toString());
}
return deviceInfoProvider;
}