Merge branch 'audiorecorder-3.3.0'
This commit is contained in:
commit
7912d06786
7 changed files with 58 additions and 26 deletions
|
|
@ -9,8 +9,8 @@ android {
|
|||
applicationId "com.github.axet.audiorecorder"
|
||||
minSdkVersion 9
|
||||
targetSdkVersion 26
|
||||
versionCode 324
|
||||
versionName "3.2.66"
|
||||
versionCode 325
|
||||
versionName "3.3.0"
|
||||
}
|
||||
signingConfigs {
|
||||
release {
|
||||
|
|
@ -53,6 +53,6 @@ android {
|
|||
|
||||
dependencies {
|
||||
testImplementation 'junit:junit:4.12'
|
||||
implementation 'com.github.axet:android-audio-library:1.0.159' // implementation project(':android-audio-library')
|
||||
implementation 'com.github.axet:android-audio-library:1.0.162' // implementation project(':android-audio-library')
|
||||
assets('com.google.android.exoplayer:exoplayer:2.7.3') { exclude group: 'com.android.support' }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -178,27 +178,27 @@ public class MainActivity extends AppCompatThemeActivity {
|
|||
}
|
||||
});
|
||||
|
||||
recordings.onCreateOptionsMenu(menu);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
int id = item.getItemId();
|
||||
|
||||
if (id == R.id.action_settings) {
|
||||
startActivity(new Intent(this, SettingsActivity.class));
|
||||
if (recordings.onOptionsItemSelected(this, item))
|
||||
return true;
|
||||
}
|
||||
|
||||
if (id == R.id.action_about) {
|
||||
AboutPreferenceCompat.showDialog(this, R.raw.about);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (id == R.id.action_show_folder) {
|
||||
Intent intent = item.getIntent();
|
||||
startActivity(intent);
|
||||
return true;
|
||||
switch (item.getItemId()) {
|
||||
case R.id.action_settings:
|
||||
startActivity(new Intent(this, SettingsActivity.class));
|
||||
return true;
|
||||
case R.id.action_about:
|
||||
AboutPreferenceCompat.showDialog(this, R.raw.about);
|
||||
return true;
|
||||
case R.id.action_show_folder:
|
||||
Intent intent = item.getIntent();
|
||||
startActivity(intent);
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
|
|
|
|||
|
|
@ -506,9 +506,8 @@ public class RecordingActivity extends AppCompatThemeActivity {
|
|||
start = false;
|
||||
stopRecording(getString(R.string.recording_status_pause));
|
||||
}
|
||||
if (a != null && a.equals(ERROR)) {
|
||||
if (a != null && a.equals(ERROR))
|
||||
muted = new ErrorDialog(this, intent.getStringExtra("msg")).setTitle(intent.getStringExtra("title")).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -399,7 +399,7 @@ public class AudioApplication extends com.github.axet.audiolibrary.app.MainAppli
|
|||
else
|
||||
edit.putString(AudioApplication.PREFERENCE_ENCODING, FormatFLAC.EXT);
|
||||
}
|
||||
edit.putInt(PREFERENCE_VERSION, 3);
|
||||
edit.putInt(PREFERENCE_VERSION, 4);
|
||||
edit.commit();
|
||||
break;
|
||||
case 0:
|
||||
|
|
@ -412,6 +412,9 @@ public class AudioApplication extends com.github.axet.audiolibrary.app.MainAppli
|
|||
case 2:
|
||||
version_2_to_3();
|
||||
break;
|
||||
case 3:
|
||||
version_3_to_4();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -468,4 +471,13 @@ public class AudioApplication extends com.github.axet.audiolibrary.app.MainAppli
|
|||
edit.putInt(PREFERENCE_VERSION, 3);
|
||||
edit.commit();
|
||||
}
|
||||
|
||||
@SuppressLint("RestrictedApi")
|
||||
void version_3_to_4() {
|
||||
SharedPreferences shared = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
SharedPreferences.Editor edit = shared.edit();
|
||||
edit.remove(PREFERENCE_SORT);
|
||||
edit.putInt(PREFERENCE_VERSION, 4);
|
||||
edit.commit();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,14 +5,11 @@ import android.net.Uri;
|
|||
import android.support.v7.widget.RecyclerView;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.github.axet.androidlibrary.widgets.ErrorDialog;
|
||||
import com.github.axet.audiorecorder.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Recordings extends com.github.axet.audiolibrary.app.Recordings {
|
||||
public View progressEmpty;
|
||||
public TextView progressText;
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ public class TileService extends android.service.quicksettings.TileService {
|
|||
|
||||
void updateTile() {
|
||||
Tile tile = getQsTile();
|
||||
if (tile == null)
|
||||
return; // some broken devices has tile == null within onStartListening()
|
||||
if (AudioApplication.from(this).recording != null) {
|
||||
tile.setIcon(Icon.createWithResource(this, R.drawable.ic_stop_black_24dp));
|
||||
tile.setLabel(getString(R.string.tile_stop_recording));
|
||||
|
|
|
|||
|
|
@ -5,22 +5,44 @@
|
|||
<item
|
||||
android:id="@+id/action_search"
|
||||
android:icon="@drawable/ic_search_white_24dp"
|
||||
android:orderInCategory="100"
|
||||
android:title="@string/menu_search"
|
||||
app:actionViewClass="com.github.axet.androidlibrary.widgets.SearchView"
|
||||
app:showAsAction="collapseActionView|always" />
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:orderInCategory="100"
|
||||
android:orderInCategory="200"
|
||||
android:title="@string/menu_settings"
|
||||
app:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/action_sort"
|
||||
android:orderInCategory="300"
|
||||
android:title="@string/sort_by">
|
||||
<menu>
|
||||
<group android:checkableBehavior="single">
|
||||
<item
|
||||
android:id="@+id/sort_name_ask"
|
||||
android:title="@string/sort_by_name_a_z" />
|
||||
<item
|
||||
android:id="@+id/sort_name_desc"
|
||||
android:title="@string/sort_by_name_z_a" />
|
||||
<item
|
||||
android:id="@+id/sort_date_ask"
|
||||
android:title="@string/sort_by_date_ask" />
|
||||
<item
|
||||
android:id="@+id/sort_date_desc"
|
||||
android:title="@string/sort_by_date_desc" />
|
||||
</group>
|
||||
</menu>
|
||||
</item>
|
||||
<item
|
||||
android:id="@+id/action_show_folder"
|
||||
android:orderInCategory="100"
|
||||
android:orderInCategory="400"
|
||||
android:title="@string/open_recording_folder"
|
||||
app:showAsAction="never" />
|
||||
<item
|
||||
android:id="@+id/action_about"
|
||||
android:orderInCategory="100"
|
||||
android:orderInCategory="500"
|
||||
android:title="@string/menu_about"
|
||||
app:showAsAction="never" />
|
||||
</menu>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue