use proper theme in restore activity. fixes #3389
This commit is contained in:
parent
a243cdb944
commit
417a6e8307
|
@ -23,6 +23,7 @@ import eu.siacs.conversations.databinding.ActivityImportBackupBinding;
|
||||||
import eu.siacs.conversations.databinding.DialogEnterPasswordBinding;
|
import eu.siacs.conversations.databinding.DialogEnterPasswordBinding;
|
||||||
import eu.siacs.conversations.services.ImportBackupService;
|
import eu.siacs.conversations.services.ImportBackupService;
|
||||||
import eu.siacs.conversations.ui.adapter.BackupFileAdapter;
|
import eu.siacs.conversations.ui.adapter.BackupFileAdapter;
|
||||||
|
import eu.siacs.conversations.utils.ThemeHelper;
|
||||||
|
|
||||||
public class ImportBackupActivity extends ActionBarActivity implements ServiceConnection, ImportBackupService.OnBackupFilesLoaded, BackupFileAdapter.OnItemClickedListener, ImportBackupService.OnBackupProcessed {
|
public class ImportBackupActivity extends ActionBarActivity implements ServiceConnection, ImportBackupService.OnBackupFilesLoaded, BackupFileAdapter.OnItemClickedListener, ImportBackupService.OnBackupProcessed {
|
||||||
|
|
||||||
|
@ -31,8 +32,12 @@ public class ImportBackupActivity extends ActionBarActivity implements ServiceCo
|
||||||
private BackupFileAdapter backupFileAdapter;
|
private BackupFileAdapter backupFileAdapter;
|
||||||
private ImportBackupService service;
|
private ImportBackupService service;
|
||||||
|
|
||||||
|
private int mTheme;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(final Bundle savedInstanceState) {
|
protected void onCreate(final Bundle savedInstanceState) {
|
||||||
|
this.mTheme = ThemeHelper.find(this);
|
||||||
|
setTheme(this.mTheme);
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
binding = DataBindingUtil.setContentView(this, R.layout.activity_import_backup);
|
binding = DataBindingUtil.setContentView(this, R.layout.activity_import_backup);
|
||||||
setSupportActionBar((Toolbar) binding.toolbar);
|
setSupportActionBar((Toolbar) binding.toolbar);
|
||||||
|
@ -45,8 +50,13 @@ public class ImportBackupActivity extends ActionBarActivity implements ServiceCo
|
||||||
@Override
|
@Override
|
||||||
public void onStart() {
|
public void onStart() {
|
||||||
super.onStart();
|
super.onStart();
|
||||||
|
final int theme = ThemeHelper.find(this);
|
||||||
|
if (this.mTheme != theme) {
|
||||||
|
recreate();
|
||||||
|
} else {
|
||||||
bindService(new Intent(this, ImportBackupService.class), this, Context.BIND_AUTO_CREATE);
|
bindService(new Intent(this, ImportBackupService.class), this, Context.BIND_AUTO_CREATE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop() {
|
public void onStop() {
|
||||||
|
|
Loading…
Reference in New Issue