stub quick conversations service
This commit is contained in:
parent
ec56d7de88
commit
532eed9a0a
|
@ -0,0 +1,12 @@
|
||||||
|
package eu.siacs.conversations.services;
|
||||||
|
|
||||||
|
import eu.siacs.conversations.services.XmppConnectionService;
|
||||||
|
|
||||||
|
public class QuickConversationsService {
|
||||||
|
|
||||||
|
private final XmppConnectionService service;
|
||||||
|
|
||||||
|
QuickConversationsService(XmppConnectionService xmppConnectionService) {
|
||||||
|
this.service = xmppConnectionService;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package eu.siacs.conversations.services;
|
||||||
|
|
||||||
|
import eu.siacs.conversations.services.XmppConnectionService;
|
||||||
|
|
||||||
|
public class QuickConversationsService {
|
||||||
|
|
||||||
|
private final XmppConnectionService service;
|
||||||
|
|
||||||
|
QuickConversationsService(XmppConnectionService xmppConnectionService) {
|
||||||
|
this.service = xmppConnectionService;
|
||||||
|
}
|
||||||
|
}
|
|
@ -24,7 +24,7 @@ import io.michaelrocks.libphonenumber.android.NumberParseException;
|
||||||
import io.michaelrocks.libphonenumber.android.PhoneNumberUtil;
|
import io.michaelrocks.libphonenumber.android.PhoneNumberUtil;
|
||||||
import io.michaelrocks.libphonenumber.android.Phonenumber;
|
import io.michaelrocks.libphonenumber.android.Phonenumber;
|
||||||
|
|
||||||
public class EnterPhoneNumberActivity extends AppCompatActivity {
|
public class EnterPhoneNumberActivity extends XmppActivity {
|
||||||
|
|
||||||
private static final int REQUEST_CHOOSE_COUNTRY = 0x1234;
|
private static final int REQUEST_CHOOSE_COUNTRY = 0x1234;
|
||||||
|
|
||||||
|
@ -62,6 +62,16 @@ public class EnterPhoneNumberActivity extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void refreshUiReal() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void onBackendConnected() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(final Bundle savedInstanceState) {
|
protected void onCreate(final Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
|
@ -7,7 +7,9 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
|
import io.michaelrocks.libphonenumber.android.NumberParseException;
|
||||||
import io.michaelrocks.libphonenumber.android.PhoneNumberUtil;
|
import io.michaelrocks.libphonenumber.android.PhoneNumberUtil;
|
||||||
|
import io.michaelrocks.libphonenumber.android.Phonenumber;
|
||||||
|
|
||||||
public class PhoneNumberUtilWrapper {
|
public class PhoneNumberUtilWrapper {
|
||||||
|
|
||||||
|
@ -38,6 +40,11 @@ public class PhoneNumberUtilWrapper {
|
||||||
return locale.getCountry();
|
return locale.getCountry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String normalize(Context context, String number) throws NumberParseException {
|
||||||
|
final PhoneNumberUtil instance = getInstance(context);
|
||||||
|
return instance.format(instance.parse(number, getUserCountry(context)), PhoneNumberUtil.PhoneNumberFormat.E164);
|
||||||
|
}
|
||||||
|
|
||||||
public static PhoneNumberUtil getInstance(final Context context) {
|
public static PhoneNumberUtil getInstance(final Context context) {
|
||||||
PhoneNumberUtil localInstance = instance;
|
PhoneNumberUtil localInstance = instance;
|
||||||
if (localInstance == null) {
|
if (localInstance == null) {
|
||||||
|
|
Loading…
Reference in New Issue