mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 1502118 - Add @AnyThread to APIs that can be used from any thread. r=snorp.
This patch adds @AnyThread to any API that can be explicitely called from any thread. Depends on D10239 Differential Revision: https://phabricator.services.mozilla.com/D10240 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
e5460c7403
commit
1390e64ce3
@ -41,6 +41,7 @@ import android.os.IInterface;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.os.SystemClock;
|
||||
import android.support.annotation.AnyThread;
|
||||
import android.support.annotation.IntDef;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.NonNull;
|
||||
@ -1104,6 +1105,7 @@ public class GeckoSession extends LayerSession
|
||||
*
|
||||
* @return SessionTextInput instance.
|
||||
*/
|
||||
@AnyThread
|
||||
public @NonNull SessionTextInput getTextInput() {
|
||||
// May be called on any thread.
|
||||
return mTextInput;
|
||||
|
@ -23,6 +23,7 @@ import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.os.Build;
|
||||
import android.os.Handler;
|
||||
import android.support.annotation.AnyThread;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.UiThread;
|
||||
@ -339,6 +340,7 @@ public final class SessionTextInput {
|
||||
* @param defHandler Handler returned by the system {@code getHandler} implementation.
|
||||
* @return Handler to return to the system through {@code getHandler}.
|
||||
*/
|
||||
@AnyThread
|
||||
public synchronized @NonNull Handler getHandler(final @NonNull Handler defHandler) {
|
||||
// May be called on any thread.
|
||||
if (mInputConnection != null) {
|
||||
@ -389,6 +391,7 @@ public final class SessionTextInput {
|
||||
* @return InputConnection instance, or null if there is no active input
|
||||
* (or if in viewless mode).
|
||||
*/
|
||||
@AnyThread
|
||||
public synchronized @Nullable InputConnection onCreateInputConnection(
|
||||
final @NonNull EditorInfo attrs) {
|
||||
// May be called on any thread.
|
||||
|
Loading…
Reference in New Issue
Block a user