Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f0ac318 authored by Xin Li's avatar Xin Li
Browse files

Merge Android 14

Bug: 298295554
Merged-In: Ia66766322d6ae8a010b1cb55cc22993fbc6d012c
Change-Id: Ic4fcb094b37b72031f9bbd615e2044164aa460a6
parents d847619a 176fd72c
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -54,6 +54,13 @@
    <permission android:name="com.android.inputmethod.latin.HIDE_SOFT_INPUT"
         android:protectionLevel="signature"/>

    <!-- To query enabled input methods. -->
    <queries>
        <intent>
            <action android:name="android.view.InputMethod" />
        </intent>
    </queries>

    <application android:label="@string/english_ime_name"
         android:icon="@drawable/ic_launcher_keyboard"
         android:supportsRtl="true"
@@ -65,7 +72,8 @@
        <service android:name="LatinIME"
             android:label="@string/english_ime_name"
             android:permission="android.permission.BIND_INPUT_METHOD"
             android:exported="true">
             android:exported="true"
             android:visibleToInstantApps="true">
            <intent-filter>
                <action android:name="android.view.InputMethod"/>
            </intent-filter>
@@ -149,7 +157,7 @@
        <activity android:name="com.android.inputmethod.dictionarypack.DownloadOverMeteredDialog"
             android:theme="@style/platformActivityTheme"
             android:label="@string/dictionary_install_over_metered_network_prompt"
             android:exported="true">
             android:exported="false">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
            </intent-filter>
+12 −32
Original line number Diff line number Diff line
@@ -26,56 +26,36 @@
    <issue
        id="NewApi"
        message="Call requires API level 23 (current min is 21): `android.content.Context#getSystemService`"
        errorLine1="        final WindowManager wm = getSystemService(WindowManager.class);"
        errorLine1="        final UserManager userManager = context.getSystemService(UserManager.class);"
        errorLine2="                                                ~~~~~~~~~~~~~~~~">
        <location
            file="packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/LatinIME.java"
            line="606"
            column="34"/>
            file="packages/inputmethods/LatinIME/java/src/com/android/inputmethod/compat/UserManagerCompatUtils.java"
            line="69"
            column="49"/>
    </issue>

    <issue
        id="NewApi"
        message="Call requires API level 23 (current min is 21): `android.content.Context#getSystemService`"
        errorLine1="        final WindowManager wm = getSystemService(WindowManager.class);"
        errorLine2="                                 ~~~~~~~~~~~~~~~~">
        message="Call requires API level 23 (current min is 21): `android.app.ActivityOptions#makeBasic`">
        <location
            file="packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/LatinIME.java"
            line="804"
            column="34"/>
            line="1842"/>
    </issue>

    <issue
        id="NewApi"
        message="Call requires API level 23 (current min is 21): `android.app.ActivityOptions#makeBasic`"
        errorLine1="                ActivityOptions.makeBasic().setLaunchDisplayId(currentDisplayId).toBundle());"
        errorLine2="                                ~~~~~~~~~">
        message="Call requires API level 23 (current min is 21): `android.content.Context#getSystemService`">
        <location
            file="packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/LatinIME.java"
            line="1823"
            column="33"/>
            line="605"/>
    </issue>

    <issue
        id="NewApi"
        message="Call requires API level 26 (current min is 21): `android.app.ActivityOptions#setLaunchDisplayId`"
        errorLine1="                ActivityOptions.makeBasic().setLaunchDisplayId(currentDisplayId).toBundle());"
        errorLine2="                                            ~~~~~~~~~~~~~~~~~~">
        message="Call requires API level 26 (current min is 21): `android.app.ActivityOptions#setLaunchDisplayId`">
        <location
            file="packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/LatinIME.java"
            line="1823"
            column="45"/>
    </issue>

    <issue
        id="NewApi"
        message="Call requires API level 23 (current min is 21): `android.content.Context#getSystemService`"
        errorLine1="        final UserManager userManager = context.getSystemService(UserManager.class);"
        errorLine2="                                                ~~~~~~~~~~~~~~~~">
        <location
            file="packages/inputmethods/LatinIME/java/src/com/android/inputmethod/compat/UserManagerCompatUtils.java"
            line="69"
            column="49"/>
            line="1842"/>
    </issue>

</issues>
 No newline at end of file
+19 −4
Original line number Diff line number Diff line
@@ -628,16 +628,31 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen

        final IntentFilter newDictFilter = new IntentFilter();
        newDictFilter.addAction(DictionaryPackConstants.NEW_DICTIONARY_INTENT_ACTION);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
            registerReceiver(mDictionaryPackInstallReceiver, newDictFilter,
                    Context.RECEIVER_NOT_EXPORTED);
        } else {
            registerReceiver(mDictionaryPackInstallReceiver, newDictFilter);
        }

        final IntentFilter dictDumpFilter = new IntentFilter();
        dictDumpFilter.addAction(DictionaryDumpBroadcastReceiver.DICTIONARY_DUMP_INTENT_ACTION);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
            registerReceiver(mDictionaryDumpBroadcastReceiver, dictDumpFilter,
                    Context.RECEIVER_NOT_EXPORTED);
        } else {
            registerReceiver(mDictionaryDumpBroadcastReceiver, dictDumpFilter);
        }

        final IntentFilter hideSoftInputFilter = new IntentFilter();
        hideSoftInputFilter.addAction(ACTION_HIDE_SOFT_INPUT);
        registerReceiver(mHideSoftInputReceiver, hideSoftInputFilter, PERMISSION_HIDE_SOFT_INPUT,
                null /* scheduler */);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
            registerReceiver(mHideSoftInputReceiver, hideSoftInputFilter,
                    PERMISSION_HIDE_SOFT_INPUT, null /* scheduler */, Context.RECEIVER_EXPORTED);
        } else {
            registerReceiver(mHideSoftInputReceiver, hideSoftInputFilter,
                    PERMISSION_HIDE_SOFT_INPUT, null /* scheduler */);
        }

        StatsUtils.onCreate(mSettings.getCurrent(), mRichImm);
    }
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@
        hence we cannot rely on "test-file-name" to install LatinIME.apk
    -->

    <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
        <option name="cleanup-apks" value="true" />
        <option name="test-file-name" value="LatinIMETests.apk" />
    </target_preparer>