mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
parent
3d28db3453
commit
7ad68296dd
@ -111,13 +111,6 @@
|
|||||||
<meta-data android:name="com.google.android.gms.car.application"
|
<meta-data android:name="com.google.android.gms.car.application"
|
||||||
android:resource="@xml/automotive_app_desc" />
|
android:resource="@xml/automotive_app_desc" />
|
||||||
|
|
||||||
<activity android:name="org.thoughtcrime.redphone.RedPhone"
|
|
||||||
android:excludeFromRecents="true"
|
|
||||||
android:screenOrientation="portrait"
|
|
||||||
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|screenSize|fontScale"
|
|
||||||
android:launchMode="singleTask">
|
|
||||||
</activity>
|
|
||||||
|
|
||||||
<activity android:name="org.thoughtcrime.securesms.WebRtcCallActivity"
|
<activity android:name="org.thoughtcrime.securesms.WebRtcCallActivity"
|
||||||
android:excludeFromRecents="true"
|
android:excludeFromRecents="true"
|
||||||
android:screenOrientation="portrait"
|
android:screenOrientation="portrait"
|
||||||
@ -357,7 +350,7 @@
|
|||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity android:name="org.thoughtcrime.redphone.VoiceCallShare"
|
<activity android:name="org.thoughtcrime.securesms.webrtc.VoiceCallShare"
|
||||||
android:excludeFromRecents="true"
|
android:excludeFromRecents="true"
|
||||||
android:theme="@style/NoAnimation.Theme.BlackScreen"
|
android:theme="@style/NoAnimation.Theme.BlackScreen"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleTask"
|
||||||
@ -390,7 +383,6 @@
|
|||||||
|
|
||||||
<activity android:name="com.soundcloud.android.crop.CropImageActivity" />
|
<activity android:name="com.soundcloud.android.crop.CropImageActivity" />
|
||||||
|
|
||||||
<service android:enabled="true" android:name="org.thoughtcrime.redphone.RedPhoneService"/>
|
|
||||||
<service android:enabled="true" android:name="org.thoughtcrime.securesms.service.WebRtcCallService"/>
|
<service android:enabled="true" android:name="org.thoughtcrime.securesms.service.WebRtcCallService"/>
|
||||||
|
|
||||||
<service android:enabled="true" android:name=".service.ApplicationMigrationService"/>
|
<service android:enabled="true" android:name=".service.ApplicationMigrationService"/>
|
||||||
|
48
src/org/thoughtcrime/securesms/webrtc/VoiceCallShare.java
Normal file
48
src/org/thoughtcrime/securesms/webrtc/VoiceCallShare.java
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
package org.thoughtcrime.securesms.webrtc;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.database.Cursor;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.provider.ContactsContract;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import org.thoughtcrime.securesms.WebRtcCallActivity;
|
||||||
|
import org.thoughtcrime.securesms.service.WebRtcCallService;
|
||||||
|
|
||||||
|
public class VoiceCallShare extends Activity {
|
||||||
|
|
||||||
|
private static final String TAG = VoiceCallShare.class.getSimpleName();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle icicle) {
|
||||||
|
super.onCreate(icicle);
|
||||||
|
|
||||||
|
if (getIntent().getData() != null && "content".equals(getIntent().getData().getScheme())) {
|
||||||
|
Cursor cursor = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
cursor = getContentResolver().query(getIntent().getData(), null, null, null, null);
|
||||||
|
|
||||||
|
if (cursor != null && cursor.moveToNext()) {
|
||||||
|
String destination = cursor.getString(cursor.getColumnIndexOrThrow(ContactsContract.RawContacts.Data.DATA1));
|
||||||
|
|
||||||
|
if (!TextUtils.isEmpty(destination)) {
|
||||||
|
Intent serviceIntent = new Intent(this, WebRtcCallService.class);
|
||||||
|
serviceIntent.setAction(WebRtcCallService.ACTION_OUTGOING_CALL);
|
||||||
|
serviceIntent.putExtra(WebRtcCallService.EXTRA_REMOTE_NUMBER, destination);
|
||||||
|
startService(serviceIntent);
|
||||||
|
|
||||||
|
Intent activityIntent = new Intent(this, WebRtcCallActivity.class);
|
||||||
|
activityIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
startActivity(activityIntent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
if (cursor != null) cursor.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user