revert hack introduced in #2835

This commit is contained in:
adbenitez
2024-09-17 19:16:39 +02:00
parent 529842ad60
commit f3fa1d5e7c
@@ -35,7 +35,6 @@ import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.os.PowerManager;
import android.os.Vibrator;
import android.provider.Browser;
import android.text.Editable;
@@ -301,12 +300,6 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
DcHelper.getNotificationCenter(this).updateVisibleChat(dcContext.getAccountId(), chatId);
attachmentManager.onResume();
// action bar might be hidden by workaround in onStop()
ActionBar supportActionBar = getSupportActionBar();
if (supportActionBar != null && !supportActionBar.isShowing()) {
supportActionBar.show();
}
}
@Override
@@ -322,23 +315,6 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
AudioSlidePlayer.stopAll();
}
@Override
public void onStop() {
super.onStop();
// hack/workaround to fix https://github.com/deltachat/deltachat-android/issues/2798
// the real cause of the problem is still unknown but hiding the action bar here fixes it
if ( Build.VERSION.SDK_INT >= 34) {
ActionBar supportActionBar = getSupportActionBar();
if (supportActionBar != null && container.isKeyboardOpen()) {
PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
if (!pm.isInteractive()) {
supportActionBar.hide();
}
}
}
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
Log.i(TAG, "onConfigurationChanged(" + newConfig.orientation + ")");