Merge branch 'audiorecorder-3.2.56'
This commit is contained in:
commit
9fa3e2de42
2 changed files with 34 additions and 3 deletions
|
|
@ -8,8 +8,8 @@ android {
|
|||
applicationId "com.github.axet.audiorecorder"
|
||||
minSdkVersion 9
|
||||
targetSdkVersion 26
|
||||
versionCode 313
|
||||
versionName "3.2.55"
|
||||
versionCode 314
|
||||
versionName "3.2.56"
|
||||
}
|
||||
signingConfigs {
|
||||
release {
|
||||
|
|
|
|||
|
|
@ -400,7 +400,7 @@ public class AudioApplication extends com.github.axet.audiolibrary.app.MainAppli
|
|||
else
|
||||
edit.putString(AudioApplication.PREFERENCE_ENCODING, FormatFLAC.EXT);
|
||||
}
|
||||
edit.putInt(PREFERENCE_VERSION, 2);
|
||||
edit.putInt(PREFERENCE_VERSION, 3);
|
||||
edit.commit();
|
||||
break;
|
||||
case 0:
|
||||
|
|
@ -410,6 +410,9 @@ public class AudioApplication extends com.github.axet.audiolibrary.app.MainAppli
|
|||
case 1:
|
||||
version_1_to_2();
|
||||
break;
|
||||
case 2:
|
||||
version_2_to_3();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -448,4 +451,32 @@ public class AudioApplication extends com.github.axet.audiolibrary.app.MainAppli
|
|||
edit.putInt(PREFERENCE_VERSION, 2);
|
||||
edit.commit();
|
||||
}
|
||||
|
||||
@SuppressLint("RestrictedApi")
|
||||
void version_2_to_3() {
|
||||
Locale locale = Locale.getDefault();
|
||||
if (locale.toString().startsWith("tr")) {
|
||||
String title = "Application renamed";
|
||||
String text = "'Audio Recorder' -> '" + getString(R.string.app_name) + "'";
|
||||
PendingIntent main = PendingIntent.getService(this, 0,
|
||||
new Intent(this, MainActivity.class),
|
||||
PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
RemoteNotificationCompat.Builder builder = new RemoteNotificationCompat.Builder(this, R.layout.notifictaion);
|
||||
builder.setViewVisibility(R.id.notification_record, View.GONE);
|
||||
builder.setViewVisibility(R.id.notification_pause, View.GONE);
|
||||
builder.setTheme(AudioApplication.getTheme(this, R.style.RecThemeLight, R.style.RecThemeDark))
|
||||
.setImageViewTint(R.id.icon_circle, builder.getThemeColor(R.attr.colorButtonNormal))
|
||||
.setTitle(title)
|
||||
.setText(text)
|
||||
.setMainIntent(main)
|
||||
.setChannel(channelStatus)
|
||||
.setSmallIcon(R.drawable.ic_mic);
|
||||
NotificationManagerCompat nm = NotificationManagerCompat.from(this);
|
||||
nm.notify((int) System.currentTimeMillis(), builder.build());
|
||||
}
|
||||
SharedPreferences shared = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
SharedPreferences.Editor edit = shared.edit();
|
||||
edit.putInt(PREFERENCE_VERSION, 3);
|
||||
edit.commit();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue