forked from mirror/monocles_chat_clean
Code cleanup
This commit is contained in:
parent
25f20f8786
commit
cd51d2f46a
1 changed files with 4 additions and 3 deletions
|
@ -225,7 +225,7 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
|
||||||
if (this.mPostponedActivityResult != null) {
|
if (this.mPostponedActivityResult != null) {
|
||||||
this.onActivityResult(mPostponedActivityResult.first, RESULT_OK, mPostponedActivityResult.second);
|
this.onActivityResult(mPostponedActivityResult.first, RESULT_OK, mPostponedActivityResult.second);
|
||||||
}
|
}
|
||||||
if (Config.X509_VERIFICATION && this.accountList.size() == 0) {
|
if (Config.X509_VERIFICATION && this.accountList.isEmpty()) {
|
||||||
if (mInvokedAddAccount.compareAndSet(false, true)) {
|
if (mInvokedAddAccount.compareAndSet(false, true)) {
|
||||||
addAccountFromKey();
|
addAccountFromKey();
|
||||||
}
|
}
|
||||||
|
@ -333,13 +333,14 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
||||||
|
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||||
if (grantResults.length > 0) {
|
if (grantResults.length > 0) {
|
||||||
if (allGranted(grantResults)) {
|
if (allGranted(grantResults)) {
|
||||||
switch (requestCode) {
|
switch (requestCode) {
|
||||||
case REQUEST_MICROPHONE:
|
case REQUEST_MICROPHONE:
|
||||||
try {
|
try {
|
||||||
startActivity(mMicIntent);
|
startActivity(mMicIntent);
|
||||||
} catch (final android.content.ActivityNotFoundException e) {
|
} catch (final ActivityNotFoundException e) {
|
||||||
Toast.makeText(this, "Your OS has blocked dialler integration", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "Your OS has blocked dialler integration", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
mMicIntent = null;
|
mMicIntent = null;
|
||||||
|
@ -365,7 +366,7 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onNavigateUp() {
|
public boolean onNavigateUp() {
|
||||||
if (xmppConnectionService.getConversations().size() == 0) {
|
if (xmppConnectionService.getConversations().isEmpty()) {
|
||||||
Intent contactsIntent = new Intent(this,
|
Intent contactsIntent = new Intent(this,
|
||||||
StartConversationActivity.class);
|
StartConversationActivity.class);
|
||||||
contactsIntent.setFlags(
|
contactsIntent.setFlags(
|
||||||
|
|
Loading…
Reference in a new issue