Java Code Examples for org.telegram.tgnet.TLRPC#TL_account_password

The following examples show how to use org.telegram.tgnet.TLRPC#TL_account_password . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PrivacySettingsActivity.java    From Telegram-FOSS with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void didReceivedNotification(int id, int account, Object... args) {
    if (id == NotificationCenter.privacyRulesUpdated) {
        if (listAdapter != null) {
            listAdapter.notifyDataSetChanged();
        }
    } else if (id == NotificationCenter.blockedUsersDidLoad) {
        listAdapter.notifyItemChanged(blockedRow);
    } else if (id == NotificationCenter.didSetOrRemoveTwoStepPassword) {
        if (args.length > 0) {
            currentPassword = (TLRPC.TL_account_password) args[0];
            if (listAdapter != null) {
                listAdapter.notifyItemChanged(passwordRow);
            }
        } else {
            loadPasswordSettings();
        }
    }
}
 
Example 2
Source File: PrivacySettingsActivity.java    From Telegram with GNU General Public License v2.0 6 votes vote down vote up
@Override
public void didReceivedNotification(int id, int account, Object... args) {
    if (id == NotificationCenter.privacyRulesUpdated) {
        if (listAdapter != null) {
            listAdapter.notifyDataSetChanged();
        }
    } else if (id == NotificationCenter.blockedUsersDidLoad) {
        listAdapter.notifyItemChanged(blockedRow);
    } else if (id == NotificationCenter.didSetOrRemoveTwoStepPassword) {
        if (args.length > 0) {
            currentPassword = (TLRPC.TL_account_password) args[0];
            if (listAdapter != null) {
                listAdapter.notifyItemChanged(passwordRow);
            }
        } else {
            loadPasswordSettings();
        }
    }
}
 
Example 3
Source File: TwoStepVerificationActivity.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
public static boolean canHandleCurrentPassword(TLRPC.TL_account_password password, boolean login) {
    if (login) {
        if (password.current_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown) {
            return false;
        }
    } else {
        if (password.new_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown ||
                password.current_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown ||
                password.new_secure_algo instanceof TLRPC.TL_securePasswordKdfAlgoUnknown) {
            return false;
        }
    }
    return true;
}
 
Example 4
Source File: TwoStepVerificationSetupActivity.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
public TwoStepVerificationSetupActivity(int account, int type, TLRPC.TL_account_password password) {
    super();
    currentAccount = account;
    currentType = type;
    currentPassword = password;
    waitingForEmail = !TextUtils.isEmpty(currentPassword.email_unconfirmed_pattern);
    if (currentPassword == null && currentType == TYPE_INTRO) {
        loadPasswordInfo();
    }
}
 
Example 5
Source File: TwoStepVerificationActivity.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
public static boolean canHandleCurrentPassword(TLRPC.TL_account_password password, boolean login) {
    if (login) {
        if (password.current_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown) {
            return false;
        }
    } else {
        if (password.new_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown ||
                password.current_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown ||
                password.new_secure_algo instanceof TLRPC.TL_securePasswordKdfAlgoUnknown) {
            return false;
        }
    }
    return true;
}
 
Example 6
Source File: TwoStepVerificationSetupActivity.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
public TwoStepVerificationSetupActivity(int type, TLRPC.TL_account_password password) {
    super();
    currentType = type;
    currentPassword = password;
    if (currentPassword == null && currentType == TYPE_INTRO) {
        loadPasswordInfo();
    } else {
        waitingForEmail = !TextUtils.isEmpty(currentPassword.email_unconfirmed_pattern);
    }
}
 
Example 7
Source File: PaymentFormActivity.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
private void setCurrentPassword(TLRPC.TL_account_password password) {
    if (password.has_password) {
        if (getParentActivity() == null) {
            return;
        }
        goToNextStep();
    } else {
        currentPassword = password;
        if (currentPassword != null) {
            waitingForEmail = !TextUtils.isEmpty(currentPassword.email_unconfirmed_pattern);
        }
        updatePasswordFields();
    }
}
 
Example 8
Source File: TwoStepVerificationActivity.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
public static boolean canHandleCurrentPassword(TLRPC.TL_account_password password, boolean login) {
    if (login) {
        if (password.current_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown) {
            return false;
        }
    } else {
        if (password.new_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown ||
                password.current_algo instanceof TLRPC.TL_passwordKdfAlgoUnknown ||
                password.new_secure_algo instanceof TLRPC.TL_securePasswordKdfAlgoUnknown) {
            return false;
        }
    }
    return true;
}
 
Example 9
Source File: PaymentFormActivity.java    From TelePlus-Android with GNU General Public License v2.0 5 votes vote down vote up
private void setCurrentPassword(TLRPC.TL_account_password password) {
    if (password.has_password) {
        if (getParentActivity() == null) {
            return;
        }
        goToNextStep();
    } else {
        currentPassword = password;
        if (currentPassword != null) {
            waitingForEmail = !TextUtils.isEmpty(currentPassword.email_unconfirmed_pattern);
        }
        updatePasswordFields();
    }
}
 
Example 10
Source File: TwoStepVerificationActivity.java    From Telegram-FOSS with GNU General Public License v2.0 5 votes vote down vote up
public void setCurrentPasswordParams(TLRPC.TL_account_password password, byte[] passwordHash, long secretId, byte[] secret) {
    currentPassword = password;
    currentPasswordHash = passwordHash;
    currentSecret = secret;
    currentSecretId = secretId;
    passwordEntered = currentPasswordHash != null && currentPasswordHash.length > 0 || !currentPassword.has_password;
}
 
Example 11
Source File: TwoStepVerificationSetupActivity.java    From Telegram with GNU General Public License v2.0 5 votes vote down vote up
public TwoStepVerificationSetupActivity(int account, int type, TLRPC.TL_account_password password) {
    super();
    currentAccount = account;
    currentType = type;
    currentPassword = password;
    waitingForEmail = !TextUtils.isEmpty(currentPassword.email_unconfirmed_pattern);
    if (currentPassword == null && currentType == TYPE_INTRO) {
        loadPasswordInfo();
    }
}
 
Example 12
Source File: TwoStepVerificationActivity.java    From Telegram-FOSS with GNU General Public License v2.0 4 votes vote down vote up
public void setPassword(TLRPC.TL_account_password password) {
    currentPassword = password;
}
 
Example 13
Source File: TwoStepVerificationActivity.java    From Telegram with GNU General Public License v2.0 4 votes vote down vote up
public void setPassword(TLRPC.TL_account_password password) {
    currentPassword = password;
}
 
Example 14
Source File: TwoStepVerificationActivity.java    From Telegram with GNU General Public License v2.0 4 votes vote down vote up
public void setCurrentPasswordInfo(byte[] hash, TLRPC.TL_account_password password) {
    if (hash != null) {
        currentPasswordHash = hash;
    }
    currentPassword = password;
}
 
Example 15
Source File: TwoStepVerificationActivity.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
protected void setRecoveryParams(TLRPC.TL_account_password password) {
    currentPassword = password;
    passwordSetState = 4;
}
 
Example 16
Source File: TwoStepVerificationActivity.java    From TelePlus-Android with GNU General Public License v2.0 4 votes vote down vote up
public void setCurrentPasswordInfo(byte[] hash, TLRPC.TL_account_password password) {
    currentPasswordHash = hash;
    currentPassword = password;
}
 
Example 17
Source File: PaymentFormActivity.java    From Telegram with GNU General Public License v2.0 votes vote down vote up
void currentPasswordUpdated(TLRPC.TL_account_password password); 
Example 18
Source File: PaymentFormActivity.java    From TelePlus-Android with GNU General Public License v2.0 votes vote down vote up
void currentPasswordUpdated(TLRPC.TL_account_password password); 
Example 19
Source File: PaymentFormActivity.java    From Telegram-FOSS with GNU General Public License v2.0 votes vote down vote up
void currentPasswordUpdated(TLRPC.TL_account_password password); 
Example 20
Source File: PaymentFormActivity.java    From TelePlus-Android with GNU General Public License v2.0 votes vote down vote up
void currentPasswordUpdated(TLRPC.TL_account_password password);