|
|
@@ -25,21 +25,21 @@ import java.io.File
|
|
|
import java.io.FileOutputStream
|
|
|
|
|
|
fun injectOTP(otp: String) {
|
|
|
- if (ROOT_ACCESS) {
|
|
|
- val intent = Intent()
|
|
|
- intent.setAction("com.example.modifier.sms")
|
|
|
- intent.putExtra("sender", "3538")
|
|
|
- intent.putExtra("message", "Your Messenger verification code is G-$otp")
|
|
|
- val context = getContext()
|
|
|
- context.sendBroadcast(intent)
|
|
|
- } else {
|
|
|
+// if (ROOT_ACCESS) {
|
|
|
+// val intent = Intent()
|
|
|
+// intent.setAction("com.example.modifier.sms")
|
|
|
+// intent.putExtra("sender", "3538")
|
|
|
+// intent.putExtra("message", "Your Messenger verification code is G-$otp")
|
|
|
+// val context = getContext()
|
|
|
+// context.sendBroadcast(intent)
|
|
|
+// } else {
|
|
|
val context = getContext()
|
|
|
val smsManager = context.getSystemService("sms") as SmsManager
|
|
|
smsManager.injectSmsPdu(
|
|
|
createFakeSms("3538", "Your Messenger verification code is G-$otp"),
|
|
|
SmsMessage.FORMAT_3GPP, null
|
|
|
)
|
|
|
- }
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
fun smsIntent(to: String, body: String?, img: File?): Intent {
|