Skip to content

Commit

Permalink
Merge pull request #3301 from deltachat/adb/issue-3300
Browse files Browse the repository at this point in the history
revert hack introduced in #2835
  • Loading branch information
adbenitez committed Sep 17, 2024
2 parents e41e337 + f3fa1d5 commit 5c9afb9
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/main/java/org/thoughtcrime/securesms/ConversationActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
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;
Expand Down Expand Up @@ -301,12 +300,6 @@ protected void onResume() {
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
Expand All @@ -322,23 +315,6 @@ protected void onPause() {
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 + ")");
Expand Down

0 comments on commit 5c9afb9

Please sign in to comment.