Skip to content

Commit bae77ac

Browse files
committed
don't require permission to input methods to bind to the key event relay service
1 parent 6d3772f commit bae77ac

1 file changed

Lines changed: 75 additions & 64 deletions

File tree

app/src/main/AndroidManifest.xml

Lines changed: 75 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- Copyright (C) 2012 The Android Open Source Project
1+
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2012 The Android Open Source Project
32
43
Licensed under the Apache License, Version 2.0 (the "License");
54
you may not use this file except in compliance with the License.
@@ -17,13 +16,11 @@
1716
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
1817
coreApp="true"
1918
package="io.github.sds100.keymapper.inputmethod.latin">
19+
2020
<uses-permission android:name="android.permission.READ_USER_DICTIONARY" />
2121
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
2222
<uses-permission android:name="android.permission.VIBRATE" />
2323
<uses-permission android:name="android.permission.WRITE_USER_DICTIONARY" />
24-
<uses-permission android:name="io.github.sds100.keymapper.KEY_EVENT_RELAY_SERVICE" />
25-
<uses-permission android:name="io.github.sds100.keymapper.debug.KEY_EVENT_RELAY_SERVICE" />
26-
<uses-permission android:name="io.github.sds100.keymapper.ci.KEY_EVENT_RELAY_SERVICE" />
2724

2825
<!-- A signature-protected permission to ask AOSP Keyboard to close the software keyboard.
2926
To use this, add the following line into calling application's AndroidManifest.xml
@@ -39,49 +36,57 @@
3936
.setPackage("io.github.sds100.keymapper.inputmethod.latin"));
4037
}
4138
</pre> -->
42-
<permission android:name="io.github.sds100.keymapper.inputmethod.latin.HIDE_SOFT_INPUT"
43-
android:protectionLevel="signature" />
44-
45-
<application android:label="@string/english_ime_name"
46-
android:icon="@mipmap/ic_launcher"
47-
android:roundIcon="@mipmap/ic_launcher_round"
48-
android:supportsRtl="true"
49-
android:allowBackup="true"
50-
android:defaultToDeviceProtectedStorage="true"
51-
android:directBootAware="true"
52-
android:extractNativeLibs="false">
39+
<permission
40+
android:name="io.github.sds100.keymapper.inputmethod.latin.HIDE_SOFT_INPUT"
41+
android:protectionLevel="signature" />
42+
43+
<application
44+
android:allowBackup="true"
45+
android:defaultToDeviceProtectedStorage="true"
46+
android:directBootAware="true"
47+
android:extractNativeLibs="false"
48+
android:icon="@mipmap/ic_launcher"
49+
android:label="@string/english_ime_name"
50+
android:roundIcon="@mipmap/ic_launcher_round"
51+
android:supportsRtl="true">
5352

5453
<!-- Services -->
55-
<service android:name="LatinIME"
56-
android:label="@string/english_ime_name"
57-
android:permission="android.permission.BIND_INPUT_METHOD"
58-
android:directBootAware="true"
59-
android:exported="true">
54+
<service
55+
android:name="LatinIME"
56+
android:directBootAware="true"
57+
android:exported="true"
58+
android:label="@string/english_ime_name"
59+
android:permission="android.permission.BIND_INPUT_METHOD">
6060
<intent-filter>
6161
<action android:name="android.view.InputMethod" />
6262
</intent-filter>
63-
<meta-data android:name="android.view.im" android:resource="@xml/method" />
63+
<meta-data
64+
android:name="android.view.im"
65+
android:resource="@xml/method" />
6466
</service>
6567

66-
<service android:name=".spellcheck.AndroidSpellCheckerService"
67-
android:label="@string/spell_checker_service_name"
68-
android:permission="android.permission.BIND_TEXT_SERVICE"
69-
android:exported="true">
68+
<service
69+
android:name=".spellcheck.AndroidSpellCheckerService"
70+
android:exported="true"
71+
android:label="@string/spell_checker_service_name"
72+
android:permission="android.permission.BIND_TEXT_SERVICE">
7073
<intent-filter>
7174
<action android:name="android.service.textservice.SpellCheckerService" />
7275
</intent-filter>
73-
<meta-data android:name="android.view.textservice.scs"
74-
android:resource="@xml/spellchecker" />
76+
<meta-data
77+
android:name="android.view.textservice.scs"
78+
android:resource="@xml/spellchecker" />
7579
</service>
7680

7781
<!-- Activities -->
78-
<activity android:name=".setup.SetupActivity"
79-
android:theme="@style/platformActivityTheme"
80-
android:label="@string/english_ime_name"
81-
android:icon="@mipmap/ic_launcher"
82-
android:launchMode="singleTask"
83-
android:noHistory="true"
84-
android:exported="true">
82+
<activity
83+
android:name=".setup.SetupActivity"
84+
android:exported="true"
85+
android:icon="@mipmap/ic_launcher"
86+
android:label="@string/english_ime_name"
87+
android:launchMode="singleTask"
88+
android:noHistory="true"
89+
android:theme="@style/platformActivityTheme">
8590
<intent-filter>
8691
<action android:name="android.intent.action.MAIN" />
8792
<category android:name="android.intent.category.LAUNCHER" />
@@ -90,47 +95,51 @@
9095

9196
<activity
9297
android:name=".permissions.PermissionsActivity"
93-
android:theme="@android:style/Theme.Translucent.NoTitleBar"
9498
android:exported="false"
95-
android:taskAffinity="" >
96-
</activity>
99+
android:taskAffinity=""
100+
android:theme="@android:style/Theme.Translucent.NoTitleBar"></activity>
97101

98-
<activity android:name=".setup.SetupWizardActivity"
99-
android:theme="@style/platformActivityTheme"
100-
android:label="@string/english_ime_name"
101-
android:clearTaskOnLaunch="true"
102-
android:exported="true">
102+
<activity
103+
android:name=".setup.SetupWizardActivity"
104+
android:clearTaskOnLaunch="true"
105+
android:exported="true"
106+
android:label="@string/english_ime_name"
107+
android:theme="@style/platformActivityTheme">
103108
<intent-filter>
104109
<action android:name="android.intent.action.MAIN" />
105110
</intent-filter>
106111
</activity>
107112

108-
<activity android:name=".settings.SettingsActivity"
109-
android:theme="@style/platformActivityTheme"
110-
android:label="@string/ime_settings"
111-
android:excludeFromRecents="true"
112-
android:exported="true">
113+
<activity
114+
android:name=".settings.SettingsActivity"
115+
android:excludeFromRecents="true"
116+
android:exported="true"
117+
android:label="@string/ime_settings"
118+
android:theme="@style/platformActivityTheme">
113119
<intent-filter>
114120
<action android:name="android.intent.action.MAIN" />
115121
</intent-filter>
116122
</activity>
117123

118-
<activity android:name=".spellcheck.SpellCheckerSettingsActivity"
119-
android:theme="@style/platformActivityTheme"
120-
android:label="@string/android_spell_checker_settings"
121-
android:exported="true">
124+
<activity
125+
android:name=".spellcheck.SpellCheckerSettingsActivity"
126+
android:exported="true"
127+
android:label="@string/android_spell_checker_settings"
128+
android:theme="@style/platformActivityTheme">
122129
<intent-filter>
123130
<action android:name="android.intent.action.MAIN" />
124131
</intent-filter>
125132
</activity>
126133

127134
<!-- Unexported activity used for tests. -->
128-
<activity android:name=".settings.TestFragmentActivity"
129-
android:exported="false" />
135+
<activity
136+
android:name=".settings.TestFragmentActivity"
137+
android:exported="false" />
130138

131139
<!-- Broadcast receivers -->
132-
<receiver android:name="SystemBroadcastReceiver"
133-
android:exported="true">
140+
<receiver
141+
android:name="SystemBroadcastReceiver"
142+
android:exported="true">
134143
<intent-filter>
135144
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
136145
<action android:name="android.intent.action.BOOT_COMPLETED" />
@@ -139,19 +148,21 @@
139148
</intent-filter>
140149
</receiver>
141150

142-
<receiver android:name="DictionaryPackInstallBroadcastReceiver" android:exported="false">
151+
<receiver
152+
android:name="DictionaryPackInstallBroadcastReceiver"
153+
android:exported="false">
143154
<intent-filter>
144155
<action android:name="io.github.sds100.keymapper.inputmethod.dictionarypack.aosp.UNKNOWN_CLIENT" />
145156
</intent-filter>
146157
</receiver>
147158

148159
<!-- Content providers -->
149-
<provider android:name="io.github.sds100.keymapper.inputmethod.dictionarypack.DictionaryProvider"
150-
android:grantUriPermissions="true"
151-
android:exported="false"
152-
android:authorities="@string/authority"
153-
android:multiprocess="false"
154-
android:label="@string/dictionary_provider_name">
155-
</provider>
160+
<provider
161+
android:name="io.github.sds100.keymapper.inputmethod.dictionarypack.DictionaryProvider"
162+
android:authorities="@string/authority"
163+
android:exported="false"
164+
android:grantUriPermissions="true"
165+
android:label="@string/dictionary_provider_name"
166+
android:multiprocess="false"></provider>
156167
</application>
157168
</manifest>

0 commit comments

Comments
 (0)