File tree Expand file tree Collapse file tree
main/java/io/sentry/android/core
test/java/io/sentry/android/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313- Deprecate `SentryUserFeedbackButton` (View-based and Compose-based) ([#5350](https://github.com/getsentry/sentry-java/pull/5350))
1414 - It will be removed in the next major version
1515
16+ ### Fixes
17+
18+ - Fix soft input keyboard not being shown on the Feedback form ([#5359](https://github.com/getsentry/sentry-java/pull/5359))
19+
1620### Dependencies
1721
1822- Bump Native SDK from v0.13.7 to v0.13.8 ([#5334](https://github.com/getsentry/sentry-java/pull/5334))
Original file line number Diff line number Diff line change 44import android .content .Context ;
55import android .os .Bundle ;
66import android .view .View ;
7+ import android .view .Window ;
8+ import android .view .WindowManager ;
79import android .widget .Button ;
810import android .widget .EditText ;
911import android .widget .ImageView ;
@@ -55,6 +57,10 @@ public void setCancelable(boolean cancelable) {
5557 protected void onCreate (Bundle savedInstanceState ) {
5658 super .onCreate (savedInstanceState );
5759 setContentView (R .layout .sentry_dialog_user_feedback );
60+ final @ Nullable Window window = getWindow ();
61+ if (window != null ) {
62+ window .clearFlags (WindowManager .LayoutParams .FLAG_ALT_FOCUSABLE_IM );
63+ }
5864 setCancelable (isCancelable );
5965
6066 final @ NotNull SentryFeedbackOptions feedbackOptions =
Original file line number Diff line number Diff line change 11package io.sentry.android.core
22
33import android.content.Context
4+ import android.view.WindowManager
45import android.widget.TextView
56import androidx.test.core.app.ApplicationProvider
67import androidx.test.ext.junit.runners.AndroidJUnit4
@@ -17,6 +18,7 @@ import kotlin.test.BeforeTest
1718import kotlin.test.Test
1819import kotlin.test.assertEquals
1920import kotlin.test.assertNotEquals
21+ import kotlin.test.assertNotNull
2022import org.junit.runner.RunWith
2123import org.mockito.Mockito.mockStatic
2224import org.mockito.kotlin.eq
@@ -130,4 +132,18 @@ class SentryUserFeedbackFormTest {
130132 // And the original options should not be modified
131133 assertNotEquals(" custom title" , fixture.options.feedbackOptions.formTitle)
132134 }
135+
136+ @Test
137+ fun `dialog window does not have FLAG_ALT_FOCUSABLE_IM so soft keyboard can appear` () {
138+ fixture.options.isEnabled = true
139+ val sut = fixture.getSut()
140+ sut.show()
141+ val window = sut.window
142+ assertNotNull(window)
143+ val flags = window.attributes.flags
144+ assertEquals(
145+ 0 ,
146+ flags and WindowManager .LayoutParams .FLAG_ALT_FOCUSABLE_IM ,
147+ )
148+ }
133149}
You can’t perform that action at this time.
0 commit comments