forked from organicmaps/organicmaps
[codereview] Fixed mentioned issues.
This commit is contained in:
parent
d0796d67d6
commit
e9b479ad91
3 changed files with 8 additions and 7 deletions
|
@ -6,8 +6,8 @@ import android.content.SharedPreferences;
|
|||
|
||||
public class ActivationSettings
|
||||
{
|
||||
private final static String PREFIX = "MWM-AS";
|
||||
private final static String PREFS_NAME = PREFIX + "act-set";
|
||||
private final static String PREFIX = "MWM-AS:";
|
||||
private final static String PREFS_NAME = PREFIX + "name-";
|
||||
private final static String PARAM_SEARCH_ACTIVATED = PREFIX + "search";
|
||||
|
||||
public static boolean isSearchActivated(Context context)
|
||||
|
|
|
@ -25,8 +25,6 @@ import java.net.URL;
|
|||
public class PromocodeActivationDialog extends Dialog
|
||||
implements OnClickListener, PromoActivationRequest.RequestListener
|
||||
{
|
||||
|
||||
|
||||
private EditText mPromoText;
|
||||
private TextView mErrorText;
|
||||
private Button mCancelBtn;
|
||||
|
@ -152,7 +150,8 @@ public class PromocodeActivationDialog extends Dialog
|
|||
|
||||
final String promoCode = mPromoText.getText().toString().trim();
|
||||
|
||||
new Thread() {
|
||||
new Thread()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.mapswithme.util.Utils;
|
|||
import java.io.BufferedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
|
@ -51,11 +52,11 @@ public abstract class PromoActivationRequest
|
|||
|
||||
protected void doRequest(URL url)
|
||||
{
|
||||
URLConnection urlConnection = null;
|
||||
HttpURLConnection urlConnection = null;
|
||||
InputStream in = null;
|
||||
try
|
||||
{
|
||||
urlConnection= url.openConnection();
|
||||
urlConnection= (HttpURLConnection) url.openConnection();
|
||||
in = new BufferedInputStream(urlConnection.getInputStream());
|
||||
|
||||
boolean success = parseResponse(in);
|
||||
|
@ -73,6 +74,7 @@ public abstract class PromoActivationRequest
|
|||
finally
|
||||
{
|
||||
Utils.closeStream(in);
|
||||
urlConnection.disconnect();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue