Skip to content

Commit

Permalink
Merge pull request #147 from cpeterso/cpeterso/no-gingerbread-map
Browse files Browse the repository at this point in the history
 Temporarily disable map button on Gingerbread
  • Loading branch information
cpeterso committed Oct 29, 2013
2 parents dac0005 + b489728 commit 22047c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<string name="stop_scanning">Stop Scanning</string>
<string name="stop_scanning_upload">Stop Scanning &amp; Upload</string>
<string name="view_leaderboard">View Leaderboard</string>
<string name="view_map">Locate Me</string>
<string name="view_map">Test Mozilla Location Service</string>
<string name="service_name">Mozilla Stumbler</string>
<string name="wifi_access_points">Wi-Fi Access Points Scanned: %1$d</string>
<string name="gps_satellites">GPS Satellites Visible: %1$d</string>
Expand Down
10 changes: 8 additions & 2 deletions src/org/mozilla/mozstumbler/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import android.content.IntentFilter;
import android.content.ServiceConnection;
import android.net.Uri;
import android.os.Build;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
Expand Down Expand Up @@ -125,6 +125,12 @@ protected void onCreate(Bundle savedInstanceState) {

nicknameEditor.addTextChangedListener(new NicknameWatcher());

// Temporarily disable map button on Gingerbread and older Honeycomb devices.
if (VERSION.SDK_INT < 12) {
Button mapButton = (Button) findViewById(R.id.view_map);
mapButton.setEnabled(false);
}

Log.d(LOGTAG, "onCreate");
}

Expand Down Expand Up @@ -266,7 +272,7 @@ public boolean onOptionsItemSelected(MenuItem item) {

@TargetApi(9)
private void enableStrictMode() {
if (Build.VERSION.SDK_INT < 9) {
if (VERSION.SDK_INT < 9) {
return;
}

Expand Down

0 comments on commit 22047c9

Please sign in to comment.