Skip to content

Commit 6aa44a8

Browse files
committedDec 27, 2021
Target API 31; export some activities to pass lint
+ Update dependencies
1 parent 72c5e2a commit 6aa44a8

File tree

4 files changed

+31
-13
lines changed

4 files changed

+31
-13
lines changed
 

‎app/build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ dependencies {
77
implementation 'com.googlecode.json-simple:json-simple:1.1'
88
implementation 'com.koushikdutta.async:androidasync:3.1.0'
99
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
10-
implementation 'androidx.appcompat:appcompat:1.3.1'
10+
implementation 'androidx.appcompat:appcompat:1.4.0'
1111
implementation 'androidx.preference:preference:1.1.1'
1212
implementation 'androidx.recyclerview:recyclerview:1.2.1'
13-
// implementation 'androidx.activity:activity:1.3.0-alpha03'
13+
// implementation 'androidx.activity:activity:1.4.0'
1414
implementation 'androidx.dynamicanimation:dynamicanimation:1.0.0'
1515
implementation 'com.google.android.material:material:1.4.0'
1616
}
@@ -26,9 +26,9 @@ android {
2626
defaultConfig {
2727
applicationId 'ee.ioc.phon.android.speak'
2828
minSdkVersion 21
29-
targetSdkVersion 30
30-
versionCode 1810
31-
versionName '1.8.10'
29+
targetSdkVersion 31
30+
versionCode 1811
31+
versionName '1.8.11'
3232
vectorDrawables.useSupportLibrary = true
3333
// Keep only en and et resources
3434
resConfigs "en", "et"

‎app/src/main/AndroidManifest.xml

+22-4
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,12 @@ Also, failed to set the launchMode from the resource, INSTALL_PARSE_FAILED_UNEXP
222222
</receiver>
223223

224224
<!-- Preferences are exported by default because they have intent filters.
225-
But they should be not exported to avoid a security issue on older Androids (see lint check). -->
225+
But they should be not exported to avoid a security issue on older Androids (see lint check).
226+
But on Android 12 they must be exported again...
227+
-->
226228
<activity
227229
android:name=".activity.Preferences"
228-
android:exported="false"
230+
android:exported="true"
229231
android:label="@string/labelActivityPreferences">
230232
<intent-filter>
231233
<action android:name="android.intent.action.MAIN" />
@@ -236,7 +238,7 @@ Also, failed to set the launchMode from the resource, INSTALL_PARSE_FAILED_UNEXP
236238

237239
<activity
238240
android:name=".PreferencesRecognitionServiceHttp"
239-
android:exported="false"
241+
android:exported="true"
240242
android:label="@string/labelActivityPreferencesRecognitionServiceHttp"
241243
android:parentActivityName=".activity.RecServiceSelectorActivity">
242244
<intent-filter>
@@ -248,7 +250,7 @@ Also, failed to set the launchMode from the resource, INSTALL_PARSE_FAILED_UNEXP
248250

249251
<activity
250252
android:name=".PreferencesRecognitionServiceWs"
251-
android:exported="false"
253+
android:exported="true"
252254
android:label="@string/labelActivityPreferencesRecognitionServiceWs"
253255
android:parentActivityName=".activity.RecServiceSelectorActivity">
254256
<intent-filter>
@@ -260,6 +262,7 @@ Also, failed to set the launchMode from the resource, INSTALL_PARSE_FAILED_UNEXP
260262

261263
<activity
262264
android:name=".AboutActivity"
265+
android:exported="false"
263266
android:label="@string/labelActivityAbout"
264267
android:parentActivityName=".activity.Preferences"
265268
android:theme="@style/Theme.K6nele" />
@@ -268,13 +271,16 @@ Also, failed to set the launchMode from the resource, INSTALL_PARSE_FAILED_UNEXP
268271
<!-- TODO: do not reparent -->
269272
<activity
270273
android:name=".activity.DetailsActivity"
274+
android:exported="false"
271275
android:theme="@style/Theme.K6nele.Dialog" />
272276
<!-- TODO: remove Light (once style inheritance works) -->
273277
<activity
274278
android:name=".activity.RewritesErrorsActivity"
279+
android:exported="false"
275280
android:theme="@style/Theme.K6nele.Light.Dialog" />
276281
<activity
277282
android:name=".activity.ComboSelectorActivity"
283+
android:exported="false"
278284
android:label="@string/dialogTitleCombo"
279285
android:parentActivityName=".activity.Preferences" />
280286
<activity
@@ -284,14 +290,17 @@ Also, failed to set the launchMode from the resource, INSTALL_PARSE_FAILED_UNEXP
284290
android:parentActivityName=".activity.Preferences" />
285291
<activity
286292
android:name=".activity.AppListActivity"
293+
android:exported="false"
287294
android:label="@string/labelActivityAppList"
288295
android:parentActivityName=".activity.Preferences" />
289296
<activity
290297
android:name=".activity.GrammarListActivity"
298+
android:exported="false"
291299
android:label="@string/labelActivityGrammarList"
292300
android:parentActivityName=".activity.Preferences" />
293301
<activity
294302
android:name=".activity.ServerListActivity"
303+
android:exported="false"
295304
android:label="@string/labelActivityServerList"
296305
android:parentActivityName=".PreferencesRecognitionServiceHttp" />
297306
<!-- Exporting this to allow a shortcut to be created e.g. using Tasker. -->
@@ -302,6 +311,7 @@ Also, failed to set the launchMode from the resource, INSTALL_PARSE_FAILED_UNEXP
302311
android:parentActivityName=".activity.Preferences" />
303312
<activity
304313
android:name=".activity.RewritesLoaderActivity"
314+
android:exported="false"
305315
android:label="@string/labelActivityRewritesLoader"
306316
android:theme="@style/Theme.K6nele.Dialog.NoActionBar"
307317
android:windowSoftInputMode="stateUnchanged">
@@ -330,6 +340,7 @@ Also, failed to set the launchMode from the resource, INSTALL_PARSE_FAILED_UNEXP
330340
</activity>
331341
<activity
332342
android:name=".activity.RewritesActivity"
343+
android:exported="false"
333344
android:parentActivityName=".activity.RewritesSelectorActivity">
334345
<!--
335346
<meta-data
@@ -339,6 +350,7 @@ Also, failed to set the launchMode from the resource, INSTALL_PARSE_FAILED_UNEXP
339350
</activity>
340351
<activity
341352
android:name=".activity.PermissionsRequesterActivity"
353+
android:exported="false"
342354
android:theme="@style/Theme.K6nele.Translucent" />
343355
<activity
344356
android:name=".activity.FetchUrlActivity"
@@ -352,22 +364,26 @@ Also, failed to set the launchMode from the resource, INSTALL_PARSE_FAILED_UNEXP
352364
android:theme="@style/Theme.K6nele.Translucent" />
353365
<activity
354366
android:name=".activity.QuickSettingsActivity"
367+
android:exported="false"
355368
android:label="@string/labelActivityQuickSettings"
356369
android:parentActivityName=".activity.Preferences" />
357370
<activity
358371
android:name=".activity.RecognitionServiceWsUrlActivity"
372+
android:exported="false"
359373
android:label="@string/titleWsServer"
360374
android:parentActivityName=".PreferencesRecognitionServiceWs"
361375
android:windowSoftInputMode="stateUnchanged" />
362376
<activity
363377
android:name=".demo.SimpleDemo"
378+
android:exported="false"
364379
android:theme="@style/Theme.K6nele.Translucent" />
365380
<activity
366381
android:name=".demo.ExtrasDemo"
367382
android:exported="true"
368383
android:theme="@style/Theme.K6nele.Translucent" />
369384
<activity
370385
android:name=".demo.HandsfreeDemoActivity"
386+
android:exported="true"
371387
android:label="@string/labelActivityHandsfreeDemo">
372388
<intent-filter>
373389
<action android:name="android.intent.action.MAIN" />
@@ -382,6 +398,7 @@ Also, failed to set the launchMode from the resource, INSTALL_PARSE_FAILED_UNEXP
382398
android:theme="@style/Theme.K6nele.Light" />
383399
<activity
384400
android:name=".demo.VoiceSearchDemo"
401+
android:exported="false"
385402
android:label="@string/labelActivityVoiceSearchDemo" />
386403

387404
<activity
@@ -458,6 +475,7 @@ Also, failed to set the launchMode from the resource, INSTALL_PARSE_FAILED_UNEXP
458475

459476
<service
460477
android:name=".service.SpeechInputMethodService"
478+
android:exported="true"
461479
android:foregroundServiceType="microphone"
462480
android:label="@string/labelIme"
463481
android:permission="android.permission.BIND_INPUT_METHOD">

‎build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
buildscript {
2-
ext.kotlin_version = '1.5.31'
2+
ext.kotlin_version = '1.6.10'
33
repositories {
44
google()
55
mavenCentral()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:7.0.3'
8+
classpath 'com.android.tools.build:gradle:7.0.4'
99
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1010
}
1111
}
@@ -19,5 +19,5 @@ allprojects {
1919
}
2020

2121
ext {
22-
compileSdkVersion = 30
22+
compileSdkVersion = 31
2323
}

‎speechutils

0 commit comments

Comments
 (0)
Failed to load comments.