Loading src/java/com/android/ims/HandlerExecutor.java 0 → 100644 +46 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.ims; import android.annotation.NonNull; import android.os.Handler; import com.android.internal.util.Preconditions; import java.util.concurrent.Executor; import java.util.concurrent.RejectedExecutionException; /** * An adapter {@link Executor} that posts all executed tasks onto the given * {@link Handler}. * * @hide */ public class HandlerExecutor implements Executor { private final Handler mHandler; public HandlerExecutor(@NonNull Handler handler) { mHandler = Preconditions.checkNotNull(handler); } @Override public void execute(Runnable command) { if (!mHandler.post(command)) { throw new RejectedExecutionException(mHandler + " is shutting down"); } } } No newline at end of file src/java/com/android/ims/ImsManager.java +0 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import android.content.Context; import android.content.pm.PackageManager; import android.os.Bundle; import android.os.Handler; import android.os.HandlerExecutor; import android.os.Looper; import android.os.Message; import android.os.Parcel; Loading src/java/com/android/ims/MmTelFeatureConnection.java +0 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.content.Context; import android.os.Handler; import android.os.HandlerExecutor; import android.os.IBinder; import android.os.IInterface; import android.os.Looper; Loading Loading
src/java/com/android/ims/HandlerExecutor.java 0 → 100644 +46 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.ims; import android.annotation.NonNull; import android.os.Handler; import com.android.internal.util.Preconditions; import java.util.concurrent.Executor; import java.util.concurrent.RejectedExecutionException; /** * An adapter {@link Executor} that posts all executed tasks onto the given * {@link Handler}. * * @hide */ public class HandlerExecutor implements Executor { private final Handler mHandler; public HandlerExecutor(@NonNull Handler handler) { mHandler = Preconditions.checkNotNull(handler); } @Override public void execute(Runnable command) { if (!mHandler.post(command)) { throw new RejectedExecutionException(mHandler + " is shutting down"); } } } No newline at end of file
src/java/com/android/ims/ImsManager.java +0 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ import android.content.Context; import android.content.pm.PackageManager; import android.os.Bundle; import android.os.Handler; import android.os.HandlerExecutor; import android.os.Looper; import android.os.Message; import android.os.Parcel; Loading
src/java/com/android/ims/MmTelFeatureConnection.java +0 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.content.Context; import android.os.Handler; import android.os.HandlerExecutor; import android.os.IBinder; import android.os.IInterface; import android.os.Looper; Loading