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

Commit cbf1df8e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove redundant synchronized blocks"

parents b93800a9 83b7d72a
Loading
Loading
Loading
Loading
+39 −57
Original line number Diff line number Diff line
@@ -2147,17 +2147,15 @@ public final class InputMethodManager {
     * @hide
     */
    public void showInputMethodPicker(boolean showAuxiliarySubtypes) {
        synchronized (mH) {
        final int mode = showAuxiliarySubtypes
                ? SHOW_IM_PICKER_MODE_INCLUDE_AUXILIARY_SUBTYPES
                : SHOW_IM_PICKER_MODE_EXCLUDE_AUXILIARY_SUBTYPES;
        try {
                final int mode = showAuxiliarySubtypes ?
                        SHOW_IM_PICKER_MODE_INCLUDE_AUXILIARY_SUBTYPES:
                        SHOW_IM_PICKER_MODE_EXCLUDE_AUXILIARY_SUBTYPES;
            mService.showInputMethodPickerFromClient(mClient, mode);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }
    }

    private void showInputMethodPickerLocked() {
        try {
@@ -2193,14 +2191,12 @@ public final class InputMethodManager {
     * subtypes of all input methods will be shown.
     */
    public void showInputMethodAndSubtypeEnabler(String imiId) {
        synchronized (mH) {
        try {
            mService.showInputMethodAndSubtypeEnablerFromClient(mClient, imiId);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }
    }

    /**
     * Returns the current input method subtype. This subtype is one of the subtypes in
@@ -2223,14 +2219,12 @@ public final class InputMethodManager {
     */
    @RequiresPermission(WRITE_SECURE_SETTINGS)
    public boolean setCurrentInputMethodSubtype(InputMethodSubtype subtype) {
        synchronized (mH) {
        try {
            return mService.setCurrentInputMethodSubtype(subtype);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }
    }

    /**
     * Notify that a user took some action with this input method.
@@ -2313,14 +2307,12 @@ public final class InputMethodManager {
     */
    @UnsupportedAppUsage
    public int getInputMethodWindowVisibleHeight() {
        synchronized (mH) {
        try {
            return mService.getInputMethodWindowVisibleHeight();
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }
    }

    /**
     * Force switch to the last used input method and subtype. If the last input method didn't have
@@ -2343,14 +2335,12 @@ public final class InputMethodManager {
     * @hide
     */
    public boolean switchToPreviousInputMethodInternal(IBinder imeToken) {
        synchronized (mH) {
        try {
            return mService.switchToPreviousInputMethod(imeToken);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }
    }

    /**
     * Force switch to the next input method and subtype. If there is no IME enabled except
@@ -2374,14 +2364,12 @@ public final class InputMethodManager {
     * @hide
     */
    public boolean switchToNextInputMethodInternal(IBinder imeToken, boolean onlyCurrentIme) {
        synchronized (mH) {
        try {
            return mService.switchToNextInputMethod(imeToken, onlyCurrentIme);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }
    }

    /**
     * Returns true if the current IME needs to offer the users ways to switch to a next input
@@ -2406,14 +2394,12 @@ public final class InputMethodManager {
     * @hide
     */
    public boolean shouldOfferSwitchingToNextInputMethodInternal(IBinder imeToken) {
        synchronized (mH) {
        try {
            return mService.shouldOfferSwitchingToNextInputMethod(imeToken);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }
    }

    /**
     * Set additional input method subtypes. Only a process which shares the same uid with the IME
@@ -2441,24 +2427,20 @@ public final class InputMethodManager {
     * @param subtypes subtypes will be added as additional subtypes of the current input method.
     */
    public void setAdditionalInputMethodSubtypes(String imiId, InputMethodSubtype[] subtypes) {
        synchronized (mH) {
        try {
            mService.setAdditionalInputMethodSubtypes(imiId, subtypes);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }
    }

    public InputMethodSubtype getLastInputMethodSubtype() {
        synchronized (mH) {
        try {
            return mService.getLastInputMethodSubtype();
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }
    }

    void doDump(FileDescriptor fd, PrintWriter fout, String[] args) {
        final Printer p = new PrintWriterPrinter(fout);