AtscTvInput: Use the new android.media.tv.* classes
Also replaced the selections from some database operations with the new buildXXX() helper methods since they are now not allowed. Change-Id: I5cf4e9d219c6437ab751b1a9148e1e7792cdfec2
This commit is contained in:
@@ -18,10 +18,12 @@ package com.example.android.atsctvinput;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.ComponentName;
|
||||
import android.content.ContentValues;
|
||||
import android.media.tv.TvContract;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.provider.TvContract;
|
||||
import android.util.Log;
|
||||
import android.util.Pair;
|
||||
|
||||
@@ -67,11 +69,9 @@ public class AtscTvInputScanActivity extends Activity {
|
||||
}
|
||||
|
||||
private void clearChannels() {
|
||||
String selection = TvContract.Channels.COLUMN_SERVICE_NAME + " = ?";
|
||||
String[] selectionArgs = new String[] {
|
||||
AtscTvInputService.class.getName()
|
||||
};
|
||||
getContentResolver().delete(TvContract.Channels.CONTENT_URI, selection, selectionArgs);
|
||||
Uri uri = TvContract.buildChannelsUriForInput(
|
||||
new ComponentName(this, AtscTvInputService.class));
|
||||
getContentResolver().delete(uri, null, null);
|
||||
}
|
||||
|
||||
private void doAutoScan() {
|
||||
|
||||
Reference in New Issue
Block a user