Java Code Examples for org.telegram.messenger.SharedConfig#lastPauseTime()
The following examples show how to use
org.telegram.messenger.SharedConfig#lastPauseTime() .
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: ExternalActionActivity.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
private void onPasscodePause() { if (lockRunnable != null) { AndroidUtilities.cancelRunOnUIThread(lockRunnable); lockRunnable = null; } if (SharedConfig.passcodeHash.length() != 0) { SharedConfig.lastPauseTime = ConnectionsManager.getInstance(UserConfig.selectedAccount).getCurrentTime(); lockRunnable = new Runnable() { @Override public void run() { if (lockRunnable == this) { if (AndroidUtilities.needShowPasscode(true)) { if (BuildVars.LOGS_ENABLED) { FileLog.d("lock app"); } showPasscodeActivity(); } else { if (BuildVars.LOGS_ENABLED) { FileLog.d("didn't pass lock check"); } } lockRunnable = null; } } }; if (SharedConfig.appLocked) { AndroidUtilities.runOnUIThread(lockRunnable, 1000); } else if (SharedConfig.autoLockIn != 0) { AndroidUtilities.runOnUIThread(lockRunnable, (long) SharedConfig.autoLockIn * 1000 + 1000); } } else { SharedConfig.lastPauseTime = 0; } SharedConfig.saveConfig(); }
Example 2
Source File: ExternalActionActivity.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
private void onPasscodeResume() { if (lockRunnable != null) { AndroidUtilities.cancelRunOnUIThread(lockRunnable); lockRunnable = null; } if (AndroidUtilities.needShowPasscode(true)) { showPasscodeActivity(); } if (SharedConfig.lastPauseTime != 0) { SharedConfig.lastPauseTime = 0; SharedConfig.saveConfig(); } }
Example 3
Source File: ExternalActionActivity.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
private void onPasscodePause() { if (lockRunnable != null) { AndroidUtilities.cancelRunOnUIThread(lockRunnable); lockRunnable = null; } if (SharedConfig.passcodeHash.length() != 0) { SharedConfig.lastPauseTime = ConnectionsManager.getInstance(UserConfig.selectedAccount).getCurrentTime(); lockRunnable = new Runnable() { @Override public void run() { if (lockRunnable == this) { if (AndroidUtilities.needShowPasscode(true)) { if (BuildVars.LOGS_ENABLED) { FileLog.d("lock app"); } showPasscodeActivity(); } else { if (BuildVars.LOGS_ENABLED) { FileLog.d("didn't pass lock check"); } } lockRunnable = null; } } }; if (SharedConfig.appLocked) { AndroidUtilities.runOnUIThread(lockRunnable, 1000); } else if (SharedConfig.autoLockIn != 0) { AndroidUtilities.runOnUIThread(lockRunnable, (long) SharedConfig.autoLockIn * 1000 + 1000); } } else { SharedConfig.lastPauseTime = 0; } SharedConfig.saveConfig(); }
Example 4
Source File: ExternalActionActivity.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
private void onPasscodeResume() { if (lockRunnable != null) { AndroidUtilities.cancelRunOnUIThread(lockRunnable); lockRunnable = null; } if (AndroidUtilities.needShowPasscode(true)) { showPasscodeActivity(); } if (SharedConfig.lastPauseTime != 0) { SharedConfig.lastPauseTime = 0; SharedConfig.saveConfig(); } }
Example 5
Source File: ExternalActionActivity.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
private void onPasscodePause() { if (lockRunnable != null) { AndroidUtilities.cancelRunOnUIThread(lockRunnable); lockRunnable = null; } if (SharedConfig.passcodeHash.length() != 0) { SharedConfig.lastPauseTime = (int) (SystemClock.elapsedRealtime() / 1000); lockRunnable = new Runnable() { @Override public void run() { if (lockRunnable == this) { if (AndroidUtilities.needShowPasscode(true)) { if (BuildVars.LOGS_ENABLED) { FileLog.d("lock app"); } showPasscodeActivity(); } else { if (BuildVars.LOGS_ENABLED) { FileLog.d("didn't pass lock check"); } } lockRunnable = null; } } }; if (SharedConfig.appLocked) { AndroidUtilities.runOnUIThread(lockRunnable, 1000); } else if (SharedConfig.autoLockIn != 0) { AndroidUtilities.runOnUIThread(lockRunnable, (long) SharedConfig.autoLockIn * 1000 + 1000); } } else { SharedConfig.lastPauseTime = 0; } SharedConfig.saveConfig(); }
Example 6
Source File: ExternalActionActivity.java From Telegram-FOSS with GNU General Public License v2.0 | 5 votes |
private void onPasscodeResume() { if (lockRunnable != null) { AndroidUtilities.cancelRunOnUIThread(lockRunnable); lockRunnable = null; } if (AndroidUtilities.needShowPasscode(true)) { showPasscodeActivity(); } if (SharedConfig.lastPauseTime != 0) { SharedConfig.lastPauseTime = 0; SharedConfig.saveConfig(); } }
Example 7
Source File: ExternalActionActivity.java From Telegram with GNU General Public License v2.0 | 5 votes |
private void onPasscodePause() { if (lockRunnable != null) { AndroidUtilities.cancelRunOnUIThread(lockRunnable); lockRunnable = null; } if (SharedConfig.passcodeHash.length() != 0) { SharedConfig.lastPauseTime = (int) (SystemClock.elapsedRealtime() / 1000); lockRunnable = new Runnable() { @Override public void run() { if (lockRunnable == this) { if (AndroidUtilities.needShowPasscode(true)) { if (BuildVars.LOGS_ENABLED) { FileLog.d("lock app"); } showPasscodeActivity(); } else { if (BuildVars.LOGS_ENABLED) { FileLog.d("didn't pass lock check"); } } lockRunnable = null; } } }; if (SharedConfig.appLocked) { AndroidUtilities.runOnUIThread(lockRunnable, 1000); } else if (SharedConfig.autoLockIn != 0) { AndroidUtilities.runOnUIThread(lockRunnable, (long) SharedConfig.autoLockIn * 1000 + 1000); } } else { SharedConfig.lastPauseTime = 0; } SharedConfig.saveConfig(); }
Example 8
Source File: ExternalActionActivity.java From Telegram with GNU General Public License v2.0 | 5 votes |
private void onPasscodeResume() { if (lockRunnable != null) { AndroidUtilities.cancelRunOnUIThread(lockRunnable); lockRunnable = null; } if (AndroidUtilities.needShowPasscode(true)) { showPasscodeActivity(); } if (SharedConfig.lastPauseTime != 0) { SharedConfig.lastPauseTime = 0; SharedConfig.saveConfig(); } }