1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 11:42:16 -05:00

Add check to display database upgrade screen to more activities

Through shortcuts, widgets, etc. users can start the app using another
activity than Accounts. We still want to display the database upgrade
screen in such cases.
This commit is contained in:
cketti 2013-01-14 09:07:51 +01:00
parent ae7ddcdd5f
commit b0b0ee6678
3 changed files with 18 additions and 0 deletions

View File

@ -287,6 +287,12 @@ public class FolderList extends K9ListActivity implements OnNavigationListener {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (UpgradeDatabases.actionUpgradeDatabases(this, getIntent())) {
finish();
return;
}
mActionBarProgressView = getLayoutInflater().inflate(R.layout.actionbar_indeterminate_progress_actionview, null);
mActionBar = getSupportActionBar();
initializeActionBar();

View File

@ -480,6 +480,12 @@ public class MessageCompose extends K9Activity implements OnClickListener {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (UpgradeDatabases.actionUpgradeDatabases(this, getIntent())) {
finish();
return;
}
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.message_compose);

View File

@ -125,6 +125,12 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (UpgradeDatabases.actionUpgradeDatabases(this, getIntent())) {
finish();
return;
}
setContentView(R.layout.message_list);
mActionBar = getSupportActionBar();