1. modify build version description 2. finalize contribution version 3. fixing hu translation 4. add debug.keystore to run with

This commit is contained in:
Victor Shcherb 2011-04-19 00:05:32 +02:00
parent d91216334e
commit 2c8c72cf7a
5 changed files with 22 additions and 27 deletions

View file

@ -61,7 +61,6 @@
<string name="use_high_res_maps">Nagy felbontású térkép</string>
<string name="use_high_res_maps_descr">Nagy felbontású térkép használata nagy felbontású eszközön</string>
<string name="unknown_location">A jelenlegi helyzet nem ismert</string>
<string name="download_files_question">{0} fájl letöltése?</string>
<string name="download_files">Letöltés</string>
<string name="context_menu_item_search_transport">Közlekedés keresése</string>
<string name="transport_searching_transport">Közlekedés keresése (nincs kijelölt cél)</string>
@ -241,7 +240,6 @@
<string name="follow_route">Útvonal követése</string>
<string name="mark_final_location_first">Először válassza ki a célt</string>
<string name="get_directions">Útirány</string>
<string name="gps_status_app_not_found">GPS állapot alkalmazás nem található</string>
<string name="show_gps_status">GPS állapot mutatása</string>
<string name="opening_hours">Órák nyitása</string>
<string name="opening_changeset">Változások megnyitása...</string>

View file

@ -13,7 +13,6 @@ import java.util.Date;
import java.util.List;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.ProgressDialogImplementation;
import net.osmand.plus.R;
import net.osmand.plus.ResourceManager;
@ -119,8 +118,7 @@ public class ContributionVersionActivity extends ListActivity {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(pathToDownload), "application/vnd.android.package-archive");
startActivityForResult(intent, ACTIVITY_TO_INSTALL);
//startActivity(intent);
//updateLastInstalledBuild(true);
updateInstalledApp(false, currentSelectedBuild.date);
}
}
}
@ -128,24 +126,20 @@ public class ContributionVersionActivity extends ListActivity {
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if(ACTIVITY_TO_INSTALL == requestCode && resultCode == RESULT_OK){
updateLastInstalledBuild(true);
if(ACTIVITY_TO_INSTALL == requestCode && resultCode != RESULT_OK){
updateInstalledApp(false, currentInstalledDate);
}
}
private void updateLastInstalledBuild(boolean showMessage) {
if (currentSelectedBuild != null) {
if (showMessage) {
Toast.makeText(
this,
MessageFormat.format(getString(R.string.build_installed), currentSelectedBuild.tag, dateFormat
.format(currentSelectedBuild.date)), Toast.LENGTH_LONG).show();
}
OsmandSettings.getPrefs(this).edit().putString(CONTRIBUTION_INSTALL_APP_DATE, dateFormat.format(currentSelectedBuild.date))
.commit();
currentInstalledDate = currentSelectedBuild.date;
getListAdapter().notifyDataSetInvalidated();
private void updateInstalledApp(boolean showMessage, Date d) {
if (showMessage) {
Toast.makeText(
this,
MessageFormat.format(getString(R.string.build_installed), currentSelectedBuild.tag, dateFormat
.format(currentSelectedBuild.date)), Toast.LENGTH_LONG).show();
}
OsmandSettings.getPrefs(this).edit().putString(CONTRIBUTION_INSTALL_APP_DATE, dateFormat.format(d))
.commit();
}
protected void executeThreadOperation(int operationId) throws Exception {
@ -188,7 +182,10 @@ public class ContributionVersionActivity extends ListActivity {
while((read = is.read(buffer, 0, 1024)) != -1){
fout.write(buffer, 0, read);
totalRead += read;
progressDlg.setProgress(totalRead / 1024);
if(totalRead > 1024){
progressDlg.incrementProgressBy(totalRead / 1024);
totalRead %= 1024;
}
}
} finally {
fout.close();
@ -260,10 +257,10 @@ public class ContributionVersionActivity extends ListActivity {
description.setText(format.toString());
if(currentInstalledDate != null){
if(currentInstalledDate.after(build.date)){
tagView.setTextColor(Color.BLUE);
} else {
if(currentInstalledDate.before(build.date)){
tagView.setTextColor(Color.GREEN);
} else {
tagView.setTextColor(Color.BLUE);
}
} else {
tagView.setTextColor(Color.WHITE);

View file

@ -33,7 +33,6 @@ import android.view.animation.AccelerateInterpolator;
import android.view.animation.Animation;
import android.view.animation.TranslateAnimation;
import android.widget.TextView;
import android.widget.Toast;
public class MainMenuActivity extends Activity {
@ -128,10 +127,10 @@ public class MainMenuActivity extends Activity {
SharedPreferences prefs = OsmandSettings.getPrefs(this);
// only one commit should be with contribution version flag
// prefs.edit().putBoolean(CONTRIBUTION_VERSION_FLAG, true).commit();
prefs.edit().putBoolean(CONTRIBUTION_VERSION_FLAG, true).commit();
if (prefs.contains(CONTRIBUTION_VERSION_FLAG)) {
final TextView appName = (TextView) findViewById(R.id.AppName);
appName.setText("OsmAnd!+");
appName.setText("OsmAnd!");
SpannableString content = new SpannableString(textVersion);
content.setSpan(new ClickableSpan() {

View file

@ -6,6 +6,7 @@ GIT_ORIGIN_NAME=origin
BUILD_DIR="$DIRECTORY"/builds
VERSION_FILE=./DataExtractionOSM/src/net/osmand/Version.java
DATE=$(date +%d-%m-%y)
SHORT_DATE=$(date +%d-%m)
# clean all files in build directory
rm -r "$BUILD_DIR"
@ -31,7 +32,7 @@ do
git checkout $BRANCH
git merge $GIT_ORIGIN_NAME/$BRANCH
sed -e "s/\(APP_DESCRIPTION.*=.*\"\).*\(\".*\)/\1$DATE $BRANCH\2/g" $VERSION_FILE > ${VERSION_FILE}.bak
sed -e "s/\(APP_DESCRIPTION.*=.*\"\).*\(\".*\)/\1$SHORT_DATE $BRANCH\2/g" $VERSION_FILE > ${VERSION_FILE}.bak
mv ${VERSION_FILE}.bak ${VERSION_FILE}
## build map creator

Binary file not shown.