Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
- Deprecate `SentryUserFeedbackButton` (View-based and Compose-based) ([#5350](https://github.com/getsentry/sentry-java/pull/5350))
- It will be removed in the next major version

### Fixes

- Fix soft input keyboard not being shown on the Feedback form ([#5359](https://github.com/getsentry/sentry-java/pull/5359))

### Dependencies

- Bump Native SDK from v0.13.7 to v0.13.8 ([#5334](https://github.com/getsentry/sentry-java/pull/5334))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
Expand Down Expand Up @@ -55,6 +57,10 @@ public void setCancelable(boolean cancelable) {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.sentry_dialog_user_feedback);
final @Nullable Window window = getWindow();
if (window != null) {
window.clearFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
}
setCancelable(isCancelable);

final @NotNull SentryFeedbackOptions feedbackOptions =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.sentry.android.core

import android.content.Context
import android.view.WindowManager
import android.widget.TextView
import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
Expand All @@ -17,6 +18,7 @@ import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertNotEquals
import kotlin.test.assertNotNull
import org.junit.runner.RunWith
import org.mockito.Mockito.mockStatic
import org.mockito.kotlin.eq
Expand Down Expand Up @@ -130,4 +132,15 @@ class SentryUserFeedbackFormTest {
// And the original options should not be modified
assertNotEquals("custom title", fixture.options.feedbackOptions.formTitle)
}

@Test
fun `dialog window does not have FLAG_ALT_FOCUSABLE_IM so soft keyboard can appear`() {
fixture.options.isEnabled = true
val sut = fixture.getSut()
sut.show()
val window = sut.window
assertNotNull(window)
val flags = window.attributes.flags
assertEquals(0, flags and WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM)
}
}
Loading