Skip to content

Commit

Permalink
Merge branch 'release/4.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
yukuku committed Jul 8, 2015
2 parents fcfec97 + 87afd62 commit d6c1a80
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Alkitab/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ android {
applicationId 'yuku.alkitab.debug'
minSdkVersion 14
targetSdkVersion 22
versionCode 14000230
versionName '4.2.0'
versionCode 14000231
versionName '4.2.1'
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ protected void onCreate(final Bundle savedInstanceState) {
protected void onCreateWithNonToolbarUpButton(Bundle savedInstanceState) {
this.withNonToolbarUpButton = true;

onCreate(savedInstanceState);
super.onCreate(savedInstanceState);

final ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
}

lastKnownLocaleSerialNumber = ChangeLanguageHelper.getLocaleSerialCounter();
}

@Override public boolean onOptionsItemSelected(MenuItem item) {
Expand Down
21 changes: 19 additions & 2 deletions AlkitabFeedback/src/main/java/yuku/kirimfidbek/CrashReporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,30 @@ synchronized void save() {

Preferences.hold();
try {
Preferences.setInt("crash_report/size", entries.size());
final int sz = entries.size();
Preferences.setInt("crash_report/size", sz);

for (int i = 0; i < entries.size(); i++) {
for (int i = 0; i < sz; i++) {
final Entry entry = entries.get(i);
Preferences.setString("crash_report/" + i + "/body", entry.body);
Preferences.setInt("crash_report/" + i + "/versionCode", entry.versionCode);
Preferences.setInt("crash_report/" + i + "/timestamp", entry.timestamp);
Preferences.setInt("crash_report/" + i + "/versionSdk", entry.versionSdk);
Preferences.setString("crash_report/" + i + "/capjempol", entry.capjempol);
}

// remove old entries (save space and xml processing time)
for (int i = sz; ; i++) {
if (Preferences.contains("crash_report/" + i + "/body")) {
Preferences.remove("crash_report/" + i + "/body");
Preferences.remove("crash_report/" + i + "/versionCode");
Preferences.remove("crash_report/" + i + "/timestamp");
Preferences.remove("crash_report/" + i + "/versionSdk");
Preferences.remove("crash_report/" + i + "/capjempol");
} else {
break;
}
}
} finally {
Preferences.unhold();
}
Expand Down Expand Up @@ -138,6 +152,9 @@ public void run() {
ArrayList<NameValuePair> params = new ArrayList<>();

for (Entry entry : entries) {
if (entry.body.length() > 100000) {
entry.body = entry.body.substring(0, 100000);
}
params.add(new BasicNameValuePair("uniqueId[]", getUniqueId()));
params.add(new BasicNameValuePair("package_name[]", App.context.getPackageName()));
params.add(new BasicNameValuePair("fidbek_isi[]", entry.body));
Expand Down

0 comments on commit d6c1a80

Please sign in to comment.