fix possible null crash
This commit is contained in:
parent
8744b75c95
commit
dd01db48d8
2 changed files with 2 additions and 3 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue