IMS: Update user preferred TTY mode always for UI TTY setting
UI TTY mode always depends on user preferred tty mode so
read from data base during power up and update same to
lower layers.
Change-Id: I4f47f58c2e1b39f9c7e2343d5cefbb48b31effb6
BUG=26770629
diff --git a/src/com/android/services/telephony/TtyManager.java b/src/com/android/services/telephony/TtyManager.java
index a3aeeb2..3389ce8 100644
--- a/src/com/android/services/telephony/TtyManager.java
+++ b/src/com/android/services/telephony/TtyManager.java
@@ -23,6 +23,7 @@
import android.os.AsyncResult;
import android.os.Handler;
import android.os.Message;
+import android.provider.Settings;
import android.telecom.TelecomManager;
import com.android.internal.telephony.Phone;
@@ -83,6 +84,9 @@
ttyMode = telecomManager.getCurrentTtyMode();
}
updateTtyMode(ttyMode);
+ //Get preferred TTY mode from data base as UI Tty mode is always user preferred Tty mode.
+ ttyMode = Settings.Secure.getInt(context.getContentResolver(),
+ Settings.Secure.PREFERRED_TTY_MODE, TelecomManager.TTY_MODE_OFF);
updateUiTtyMode(ttyMode);
}