Skip to content

Commit 95a4e95

Browse files
authored
Support for Android 12 (#456)
1 parent 2860ec4 commit 95a4e95

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

test-app/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ buildscript {
55

66
repositories {
77
google()
8+
mavenCentral()
89
jcenter()
910
}
1011
dependencies {
@@ -20,6 +21,7 @@ buildscript {
2021
allprojects {
2122
repositories {
2223
google()
24+
mavenCentral()
2325
jcenter()
2426
maven { url 'https://jitpack.io' }
2527
maven { url "https://s3.amazonaws.com/repo.commonsware.com" }

test-app/r2-testapp/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ android {
5757
freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
5858
}
5959
buildFeatures {
60-
dataBinding = true
61-
viewBinding = true
60+
dataBinding true
61+
viewBinding true
6262
}
6363
buildTypes {
6464
release {

test-app/r2-testapp/src/main/AndroidManifest.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
tools:targetApi="n">
3232
<activity android:name=".MainActivity"
3333
android:clearTaskOnLaunch="true"
34-
android:configChanges="orientation|screenSize">
34+
android:configChanges="orientation|screenSize"
35+
android:exported="true">
3536
<intent-filter>
3637
<action android:name="android.intent.action.MAIN" />
3738

@@ -43,7 +44,8 @@
4344
android:name=".utils.R2DispatcherActivity"
4445
android:launchMode="singleInstance"
4546
android:noHistory="true"
46-
android:theme="@android:style/Theme.NoDisplay">
47+
android:theme="@android:style/Theme.NoDisplay"
48+
android:exported="true">
4749

4850
<!--
4951
WARNING: Matching with intent-filters on media types and file extensions is a mess.

test-app/r2-testapp/src/main/java/org/readium/r2/testapp/reader/EpubReaderFragment.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,8 @@ class EpubReaderFragment : VisualReaderFragment(), EpubNavigatorFragment.Listene
236236
model.cancelSearch()
237237
menuSearchView.setQuery("", false)
238238

239-
(activity?.getSystemService(Context.INPUT_METHOD_SERVICE) as? InputMethodManager)?.toggleSoftInput(
240-
InputMethodManager.SHOW_FORCED,
241-
InputMethodManager.HIDE_IMPLICIT_ONLY
239+
(activity?.getSystemService(Context.INPUT_METHOD_SERVICE) as? InputMethodManager)?.showSoftInput(
240+
this.view, InputMethodManager.SHOW_FORCED
242241
)
243242
}
244243
}

0 commit comments

Comments
 (0)