Change method name 'with' to 'getInstance'

This commit is contained in:
hungphd
2019-08-01 11:25:12 -05:00
committed by Fredrik Fornwall
parent 94e5bc86fb
commit 549f09573f
2 changed files with 2 additions and 3 deletions

View File

@@ -10,7 +10,7 @@ public class BellUtil {
private static BellUtil instance = null;
private static final Object lock = new Object();
public static BellUtil with(Context context) {
public static BellUtil getInstance(Context context) {
if (instance == null) {
synchronized (lock) {
if (instance == null) {

View File

@@ -24,7 +24,6 @@ import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.IBinder;
import android.os.Vibrator;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.TextUtils;
@@ -402,7 +401,7 @@ public final class TermuxActivity extends Activity implements ServiceConnection
mBellSoundPool.play(mBellSoundId, 1.f, 1.f, 1, 0, 1.f);
break;
case TermuxPreferences.BELL_VIBRATE:
BellUtil.with(TermuxActivity.this).doBell();
BellUtil.getInstance(TermuxActivity.this).doBell();
break;
case TermuxPreferences.BELL_IGNORE:
// Ignore the bell character.