Skip to content

Commit

Permalink
Bump 1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
pluscubed committed Feb 16, 2017
1 parent e3ce19a commit 6873ef1
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 36 deletions.
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ android {
applicationId "com.pluscubed.velociraptor"
minSdkVersion 16
targetSdkVersion 25
versionCode 27
versionName "1.4.1"
versionCode 29
versionName "1.4.2"
vectorDrawables.useSupportLibrary = true
manifestPlaceholders = [appName: "@string/app_name"]
}
Expand Down Expand Up @@ -76,8 +76,8 @@ android {
}
full {
applicationIdSuffix ".full"
versionName = android.defaultConfig.versionName + "-full"
manifestPlaceholders = [appName: "Velociraptor Full"]
versionName = android.defaultConfig.versionName + "-aa"
manifestPlaceholders = [appName: "Velociraptor AA"]
}
}

Expand Down
2 changes: 2 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
}

#RxJava
-keep class rx.** { *; }

-dontwarn sun.misc.**

-keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,9 @@
android:resource="@xml/accessibility_service" />
</service>

<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_speedometer" />

</application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import android.view.View;
import android.webkit.WebView;

import com.afollestad.materialdialogs.DialogAction;
import com.afollestad.materialdialogs.MaterialDialog;
import com.pluscubed.velociraptor.R;

Expand All @@ -35,15 +34,16 @@ public Dialog onCreateDialog(Bundle savedInstanceState) {
.title(R.string.changelog)
.customView(customView, false)
.positiveText(android.R.string.ok)
.neutralText(R.string.rate_in_play)
.onNeutral(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
Intent intent = new Intent()
.setAction(Intent.ACTION_VIEW)
.setData(Uri.parse("https://play.google.com/store/apps/details?id=com.pluscubed.velociraptor"));
startActivity(intent);
}
.neutralText(R.string.rate)
.onNeutral((dialog1, which) -> {
Intent intent = new Intent()
.setAction(Intent.ACTION_VIEW)
.setData(Uri.parse("https://play.google.com/store/apps/details?id=com.pluscubed.velociraptor"));
startActivity(intent);
})
.negativeText(R.string.support)
.onNegative((dialog1, which) -> {
((SettingsActivity) getActivity()).showSupportDialog();
})
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ public void onClick(View v) {
testBeepButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Utils.playBeep();
Utils.playBeeps();
}
});

Expand Down Expand Up @@ -483,7 +483,7 @@ public void onBillingInitialized() {
PrefUtils.setVersionCode(this, BuildConfig.VERSION_CODE);
}

private void showSupportDialog() {
public void showSupportDialog() {
String content = getString(BuildConfig.FLAVOR.equals("play") ? R.string.support_dev_dialog : R.string.support_dev_dialog_notplay);
if (PrefUtils.hasSupported(this) || !billingProcessor.listOwnedSubscriptions().isEmpty()) {
content += "\n\n\uD83C\uDF89 " + getString(R.string.support_dev_dialog_badge) + " \uD83C\uDF89";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ private void updateSpeedometer(Location location) {
if (mSpeedingStart == -1) {
mSpeedingStart = System.currentTimeMillis();
} else if (System.currentTimeMillis() > mSpeedingStart + 2000L && PrefUtils.isBeepAlertEnabled(this)) {
Utils.playBeep();
Utils.playBeeps();
mSpeedingStart = Long.MAX_VALUE - 2000L;
}
} else {
Expand Down
21 changes: 11 additions & 10 deletions app/src/main/java/com/pluscubed/velociraptor/utils/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,20 @@ public static int compare(int lhs, int rhs) {
return lhs < rhs ? -1 : (lhs == rhs ? 0 : 1);
}

public static void playBeep() {
public static void playBeeps() {
playTone();
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
playTone();
}
}, 300);
}

private static void playTone() {
try {
ToneGenerator toneGen1 = new ToneGenerator(AudioManager.STREAM_ALARM, 100);
toneGen1.startTone(ToneGenerator.TONE_CDMA_ALERT_CALL_GUARD, 100);

new Handler().postDelayed(
new Runnable() {
public void run() {
ToneGenerator toneGen1 = new ToneGenerator(AudioManager.STREAM_ALARM, 100);
toneGen1.startTone(ToneGenerator.TONE_CDMA_ALERT_CALL_GUARD, 100);
}
},
300);
} catch (RuntimeException ignored) {
}
}
Expand Down
6 changes: 0 additions & 6 deletions app/src/main/res/raw/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@
</head>
<body>

<h4>Announcement</h4>
HERE Maps data will be re-added soon, with pricing based on usage. OpenStreetMap data will continue
to be free.
<br/>
<br/>

<h4>v1.4.2 - 2/15/17</h4>
<ul>
<li>Improve caching efficiency</li>
Expand Down
7 changes: 4 additions & 3 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<string name="tolerance_desc">%1$s %2$s %3$s</string>
<string name="support_development">Support development</string>
<string name="in_app_unavailable">In-app billing not available</string>
<string name="support_dev_dialog">Used for server and API costs; suggested amount is 1 USD per month. A badge will be shown here as my sincere gratitude.</string>
<string name="support_dev_dialog">Used for OpenStreetMap server costs; suggested amount is 1 USD per month.</string>
<string name="support_dev_dialog_badge">Thank you for your support!</string>
<string name="per_month">%s per month</string>
<string name="one_time">%s one-time</string>
Expand All @@ -95,7 +95,7 @@
<string name="android_auto_integration_switch">Android Auto integration</string>
<string name="android_auto_instruction_dialog">Velociraptor acts as a messaging app for Android Auto.\nTo use, the Android Auto app must be the foreground app.\nTo stop the notifications sounds, touch the close or reply button once.</string>
<string name="transparency">Opacity</string>
<string name="auto_not_available">Not available in the Google Play version of Velociraptor</string>
<string name="auto_not_available">To use Android Auto integration, download Velociraptor AA from APKMirror</string>
<string name="support_dev_dialog_notplay"><![CDATA[
Used for server and API costs; suggested amount is 1 USD per month.
<br/><br/>
Expand All @@ -104,5 +104,6 @@
<string name="size">Size</string>
<string name="size_limit_overview">Speed Limit: %s</string>
<string name="size_speedometer_overview">Speedometer: %s</string>
<string name="rate_in_play">Rate in Play Store</string>
<string name="rate">Rate</string>
<string name="support">Support</string>
</resources>

0 comments on commit 6873ef1

Please sign in to comment.