mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-20 14:54:09 +00:00
Strings and slight cleanup
This commit is contained in:
@@ -28,7 +28,8 @@ import org.whispersystems.textsecure.util.PhoneNumberFormatter;
|
||||
import org.whispersystems.textsecure.util.Util;
|
||||
|
||||
/**
|
||||
* The register account activity. Begins the account registration process.
|
||||
* The register account activity. Prompts ths user for their registration information
|
||||
* and begins the account registration process.
|
||||
*
|
||||
* @author Moxie Marlinspike
|
||||
*
|
||||
@@ -53,6 +54,7 @@ public class RegistrationActivity extends SherlockActivity {
|
||||
actionBar.setTitle(getString(R.string.RegistrationActivity_connect_with_textsecure));
|
||||
|
||||
initializeResources();
|
||||
initializeSpinner();
|
||||
initializeNumber();
|
||||
}
|
||||
|
||||
@@ -71,8 +73,15 @@ public class RegistrationActivity extends SherlockActivity {
|
||||
this.number = (TextView)findViewById(R.id.number);
|
||||
this.createButton = (Button)findViewById(R.id.registerButton);
|
||||
|
||||
this.countryCode.addTextChangedListener(new CountryCodeChangedListener());
|
||||
this.number.addTextChangedListener(new NumberChangedListener());
|
||||
this.createButton.setOnClickListener(new CreateButtonListener());
|
||||
}
|
||||
|
||||
private void initializeSpinner() {
|
||||
this.countrySpinnerAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item);
|
||||
this.countrySpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
|
||||
setCountryDisplay(getString(R.string.RegistrationActivity_select_your_country));
|
||||
|
||||
this.countrySpinner.setAdapter(this.countrySpinnerAdapter);
|
||||
@@ -86,13 +95,8 @@ public class RegistrationActivity extends SherlockActivity {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
this.countryCode.addTextChangedListener(new CountryCodeChangedListener());
|
||||
this.number.addTextChangedListener(new NumberChangedListener());
|
||||
this.createButton.setOnClickListener(new CreateButtonListener());
|
||||
}
|
||||
|
||||
|
||||
private void initializeNumber() {
|
||||
String localNumber = ((TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE))
|
||||
.getLine1Number();
|
||||
|
@@ -15,6 +15,7 @@ import android.util.Log;
|
||||
|
||||
import com.google.android.gcm.GCMRegistrar;
|
||||
import org.thoughtcrime.securesms.ApplicationPreferencesActivity;
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.gcm.GcmIntentService;
|
||||
import org.thoughtcrime.securesms.gcm.GcmRegistrationTimeoutException;
|
||||
import org.whispersystems.textsecure.push.PushServiceSocket;
|
||||
@@ -327,11 +328,11 @@ public class RegistrationService extends Service {
|
||||
intent.setAction(REGISTRATION_EVENT);
|
||||
|
||||
if (success) {
|
||||
intent.putExtra(NOTIFICATION_TITLE, "Registration Complete");
|
||||
intent.putExtra(NOTIFICATION_TEXT, "TextSecure registration has successfully completed.");
|
||||
intent.putExtra(NOTIFICATION_TITLE, getString(R.string.RegistrationService_registration_complete));
|
||||
intent.putExtra(NOTIFICATION_TEXT, getString(R.string.RegistrationService_textsecure_registration_has_successfully_completed));
|
||||
} else {
|
||||
intent.putExtra(NOTIFICATION_TITLE, "Registration Error");
|
||||
intent.putExtra(NOTIFICATION_TEXT, "TextSecure registration has encountered a problem.");
|
||||
intent.putExtra(NOTIFICATION_TITLE, getString(R.string.RegistrationService_registration_error));
|
||||
intent.putExtra(NOTIFICATION_TEXT, getString(R.string.RegistrationService_textsecure_registration_has_encountered_a_problem));
|
||||
}
|
||||
|
||||
this.sendOrderedBroadcast(intent, null);
|
||||
|
Reference in New Issue
Block a user