Allow adding another prompt after notifications
(cherry picked from commit 75a34db9e5561fe4877f00520e8764022acc315b)
This commit is contained in:
parent
127bc51034
commit
d55df65131
1 changed files with 4 additions and 2 deletions
|
@ -756,7 +756,7 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
|
||||||
if (offerToSetupDiallerIntegration()) return;
|
if (offerToSetupDiallerIntegration()) return;
|
||||||
if (offerToDownloadStickers()) return;
|
if (offerToDownloadStickers()) return;
|
||||||
if (openBatteryOptimizationDialogIfNeeded()) return;
|
if (openBatteryOptimizationDialogIfNeeded()) return;
|
||||||
requestNotificationPermissionIfNeeded();
|
if (requestNotificationPermissionIfNeeded()) return;
|
||||||
xmppConnectionService.rescanStickers();
|
xmppConnectionService.rescanStickers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -794,10 +794,12 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void requestNotificationPermissionIfNeeded() {
|
private boolean requestNotificationPermissionIfNeeded() {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU && ActivityCompat.checkSelfPermission(this, Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU && ActivityCompat.checkSelfPermission(this, Manifest.permission.POST_NOTIFICATIONS) != PackageManager.PERMISSION_GRANTED) {
|
||||||
requestPermissions(new String[]{Manifest.permission.POST_NOTIFICATIONS}, REQUEST_POST_NOTIFICATION);
|
requestPermissions(new String[]{Manifest.permission.POST_NOTIFICATIONS}, REQUEST_POST_NOTIFICATION);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean offerToDownloadStickers() {
|
private boolean offerToDownloadStickers() {
|
||||||
|
|
Loading…
Reference in a new issue