[TF][KILL] Google Voice

(cherry picked from commit 217a39abcb86d609827eaa16c24f95fe94156d5c)
This commit is contained in:
thermatk 2020-01-04 07:27:20 +00:00 committed by 世界
parent fd30c76096
commit 64c4e79795
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
5 changed files with 0 additions and 85 deletions

View File

@ -27,7 +27,6 @@ dependencies {
implementation 'com.googlecode.mp4parser:isoparser:1.0.6'
implementation 'com.stripe:stripe-android:2.0.2'
implementation 'com.google.code.gson:gson:2.8.6'
implementation files('libs/libgsaverification-client.aar')
}
//return an api key from a properties file.

View File

@ -196,15 +196,6 @@
android:resizeableActivity="false"
android:windowSoftInputMode="adjustResize|stateHidden">
</activity>
<activity
android:name=".GoogleVoiceClientActivity"
android:exported="true">
<intent-filter>
<action android:name="com.google.android.voicesearch.SEND_MESSAGE_TO_CONTACTS" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
<activity
android:name="org.telegram.ui.VoIPActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
@ -288,7 +279,6 @@
<service android:name=".VideoEncodingService" android:enabled="true"/>
<service android:name=".LocationSharingService" android:enabled="true"/>
<service android:name=".voip.VoIPService" android:enabled="true"/>
<service android:name=".GoogleVoiceClientService"/>
<service android:name=".MusicPlayerService" android:exported="true" android:enabled="true"/>
<service android:name=".MusicBrowserService" android:exported="true">
<intent-filter>

View File

@ -1,19 +0,0 @@
/*
* This is the source code of Telegram for Android v. 5.x.x
* It is licensed under GNU GPL v. 2 or later.
* You should have received a copy of the license in this archive (see LICENSE).
*
* Copyright Nikolai Kudashov, 2013-2018.
*/
package org.telegram.messenger;
import com.google.android.search.verification.client.SearchActionVerificationClientActivity;
import com.google.android.search.verification.client.SearchActionVerificationClientService;
public class GoogleVoiceClientActivity extends SearchActionVerificationClientActivity {
public Class<? extends SearchActionVerificationClientService> getServiceClass() {
return GoogleVoiceClientService.class;
}
}

View File

@ -1,55 +0,0 @@
/*
* This is the source code of Telegram for Android v. 5.x.x
* It is licensed under GNU GPL v. 2 or later.
* You should have received a copy of the license in this archive (see LICENSE).
*
* Copyright Nikolai Kudashov, 2013-2018.
*/
package org.telegram.messenger;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import com.google.android.search.verification.client.SearchActionVerificationClientService;
import org.telegram.tgnet.TLRPC;
public class GoogleVoiceClientService extends SearchActionVerificationClientService {
@Override
public void performAction(Intent intent, boolean isVerified, Bundle options) {
if (!isVerified) {
return;
}
AndroidUtilities.runOnUIThread(() -> {
try {
int currentAccount = UserConfig.selectedAccount;
ApplicationLoader.postInitApplication();
if (AndroidUtilities.needShowPasscode() || SharedConfig.isWaitingForPasscodeEnter) {
return;
}
String text = intent.getStringExtra("android.intent.extra.TEXT");
if (!TextUtils.isEmpty(text)) {
String contactUri = intent.getStringExtra("com.google.android.voicesearch.extra.RECIPIENT_CONTACT_URI");
String id = intent.getStringExtra("com.google.android.voicesearch.extra.RECIPIENT_CONTACT_CHAT_ID");
int uid = Integer.parseInt(id);
TLRPC.User user = MessagesController.getInstance(currentAccount).getUser(uid);
if (user == null) {
user = MessagesStorage.getInstance(currentAccount).getUserSync(uid);
if (user != null) {
MessagesController.getInstance(currentAccount).putUser(user, true);
}
}
if (user != null) {
ContactsController.getInstance(currentAccount).markAsContacted(contactUri);
SendMessagesHelper.getInstance(currentAccount).sendMessage(text, user.id, null, null, true, null, null, null, true, 0);
}
}
} catch (Exception e) {
FileLog.e(e);
}
});
}
}