Always use Slog in InputMethodSubtypeSwitchingController

Mixing android.util.Log and android.util.Slog doesn't make much sense.
Let's always android.util.Slog here for consistency.

There should be no observable behavior change as the logging code in
question is used only when InputMethodSubtypeSwitchingController#DEBUG
is set to "true" before rebuilding the system image.

Bug: 171827834
Test: presubmit
Test: atest FrameworksServicesTests:InputMethodSubtypeSwitchingControllerTest
Change-Id: I9f2dce3447051981cc30a00525ecf37f8e588ee9
This commit is contained in:
Yohei Yukawa
2021-03-16 20:43:12 -07:00
parent c415157f45
commit 106259febb

View File

@@ -21,7 +21,6 @@ import android.content.Context;
import android.content.pm.PackageManager;
import android.text.TextUtils;
import android.util.ArraySet;
import android.util.Log;
import android.util.Printer;
import android.util.Slog;
import android.view.inputmethod.InputMethodInfo;
@@ -502,7 +501,7 @@ final class InputMethodSubtypeSwitchingController {
public void onUserActionLocked(InputMethodInfo imi, InputMethodSubtype subtype) {
if (mController == null) {
if (DEBUG) {
Log.e(TAG, "mController shouldn't be null.");
Slog.e(TAG, "mController shouldn't be null.");
}
return;
}
@@ -520,7 +519,7 @@ final class InputMethodSubtypeSwitchingController {
InputMethodSubtype subtype) {
if (mController == null) {
if (DEBUG) {
Log.e(TAG, "mController shouldn't be null.");
Slog.e(TAG, "mController shouldn't be null.");
}
return null;
}