Move spoof detection to main method

This commit is contained in:
Oizaro 2020-09-30 00:33:58 +02:00
parent bdb343fa31
commit f12501076d
4 changed files with 6 additions and 7 deletions

View File

@ -94,11 +94,13 @@ public class LoginActivity extends AssistantActivity {
private InputMethodManager inputMethodManager; private InputMethodManager inputMethodManager;
private ViewGroup authContent; private ViewGroup authContent;
private int state = 0; private int state = 0;
private Bundle initialSavedInstanceState;
@SuppressLint("AddJavascriptInterface") @SuppressLint("AddJavascriptInterface")
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
initialSavedInstanceState = savedInstanceState;
accountType = AuthConstants.DEFAULT_ACCOUNT_TYPE; accountType = AuthConstants.DEFAULT_ACCOUNT_TYPE;
accountManager = AccountManager.get(LoginActivity.this); accountManager = AccountManager.get(LoginActivity.this);
inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE); inputMethodManager = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
@ -147,7 +149,6 @@ public class LoginActivity extends AssistantActivity {
} else { } else {
setMessage(R.string.auth_before_connect); setMessage(R.string.auth_before_connect);
setBackButtonText(android.R.string.cancel); setBackButtonText(android.R.string.cancel);
CheckinClient.brandSpoof = false;
setNextButtonText(R.string.auth_sign_in); setNextButtonText(R.string.auth_sign_in);
} }
} }
@ -156,8 +157,8 @@ public class LoginActivity extends AssistantActivity {
protected void onSpoofButtonClicked() { protected void onSpoofButtonClicked() {
super.onSpoofButtonClicked(); super.onSpoofButtonClicked();
CheckinClient.brandSpoof = true; CheckinClient.brandSpoof = true;
state = 1; state = 0;
init(); onCreate(initialSavedInstanceState);
} }
@Override @Override
@ -353,6 +354,7 @@ public class LoginActivity extends AssistantActivity {
accountManager.setUserData(account, "GoogleUserId", accountId); accountManager.setUserData(account, "GoogleUserId", accountId);
checkin(true); checkin(true);
finish(); finish();
CheckinClient.brandSpoof = false;
} }
@Override @Override
public void onException(Exception exception) { public void onException(Exception exception) {

View File

@ -80,6 +80,7 @@ public class CheckinClient {
DeviceIdentifier deviceIdent, PhoneInfo phoneInfo, DeviceIdentifier deviceIdent, PhoneInfo phoneInfo,
LastCheckinInfo checkinInfo, Locale locale, LastCheckinInfo checkinInfo, Locale locale,
List<Account> accounts) { List<Account> accounts) {
Log.e("sono io sono io", ""+brandSpoof);
CheckinRequest.Builder builder = new CheckinRequest.Builder() CheckinRequest.Builder builder = new CheckinRequest.Builder()
.accountCookie(new ArrayList<String>()) .accountCookie(new ArrayList<String>())
.androidId(checkinInfo.androidId) .androidId(checkinInfo.androidId)

View File

@ -90,8 +90,6 @@ Ini bisa berlangsung beberapa menit."</string>
<string name="pref_about_title">Tentang Vanced microG</string> <string name="pref_about_title">Tentang Vanced microG</string>
<string name="pref_cast_double_fix">Perbaikan Cast terduplikasi</string> <string name="pref_cast_double_fix">Perbaikan Cast terduplikasi</string>
<string name="brand_spoof_button">Spoof</string>
<string name="pref_switcher_title">Registrasi perangkat</string> <string name="pref_switcher_title">Registrasi perangkat</string>
<string name="pref_checkin_enable_summary">Registrasi perangkat anda ke layanan Google dan buat pengenal perangkat unik. Vanced microG strips mengenal bits selain dari akun Google anda dari data registrasi.</string> <string name="pref_checkin_enable_summary">Registrasi perangkat anda ke layanan Google dan buat pengenal perangkat unik. Vanced microG strips mengenal bits selain dari akun Google anda dari data registrasi.</string>
<string name="pref_device_registration_android_id">Android ID</string> <string name="pref_device_registration_android_id">Android ID</string>

View File

@ -90,8 +90,6 @@ Questo potrà richiedere un paio di minuti"</string>
<string name="pref_about_title">Informazioni su Vanced microG</string> <string name="pref_about_title">Informazioni su Vanced microG</string>
<string name="pref_cast_double_fix">Correzione cast duplicato</string> <string name="pref_cast_double_fix">Correzione cast duplicato</string>
<string name="brand_spoof_button">Spoof</string>
<string name="pref_switcher_title">Registra dispositivo</string> <string name="pref_switcher_title">Registra dispositivo</string>
<string name="pref_checkin_enable_summary">Registra il tuo dispositivo sui servizi Google e crea un identificatore univoco del dispositivo. Verranno rimossi dai Servizi Vanced microG alcuni bit utili per identificare i dati di registrazione, oltre al nome dell\'account Google.</string> <string name="pref_checkin_enable_summary">Registra il tuo dispositivo sui servizi Google e crea un identificatore univoco del dispositivo. Verranno rimossi dai Servizi Vanced microG alcuni bit utili per identificare i dati di registrazione, oltre al nome dell\'account Google.</string>
<string name="pref_device_registration_android_id">ID Android</string> <string name="pref_device_registration_android_id">ID Android</string>