Skip to content

Commit f82cd10

Browse files
Laird DorninLaird Dornin
authored andcommitted
Fix bug in authority strings.
1 parent ebab8c4 commit f82cd10

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

FinchVideo/src/com/oreilly/demo/android/pa/finchvideo/provider/FinchVideo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ public class FinchVideo {
2323
public static final int MEDIA_ID_COLUMN = 8;
2424

2525
public static final String AUTHORITY =
26-
"com.oreilly.demo.pa.finchvideo.FinchVideo";
26+
"com.oreilly.demo.android.pa.finchvideo.FinchVideo";
2727

2828
public static final String SIMPLE_AUTHORITY =
29-
"com.oreilly.demo.pa.finchvideo.SimpleFinchVideo";
29+
"com.oreilly.demo.android.pa.finchvideo.SimpleFinchVideo";
3030
/**
3131
* Simple Videos columns
3232
*/

FinchVideo/src/com/oreilly/demo/android/pa/finchvideo/provider/FinchVideoContentProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class FinchVideoContentProvider extends RESTfulContentProvider {
3232
public static final String VIDEOS_TABLE_NAME = "video";
3333

3434
private static final String FILE_CACHE_DIR =
35-
"/data/data/com.oreilly.demo.pa.finchvideo/file_cache";
35+
"/data/data/com.oreilly.demo.android.pa.finchvideo/file_cache";
3636

3737
private static final int VIDEOS = 1;
3838
private static final int VIDEO_ID = 2;

FinchVideo/src/com/oreilly/demo/android/pa/finchvideo/provider/SimpleFinchVideoContentProvider.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121
* provider that stores basic video meta-data.
2222
*/
2323
public class SimpleFinchVideoContentProvider extends ContentProvider {
24-
public static final String AUTHORITY =
25-
"com.oreilly.demo.pa.finchvideo.SimpleFinchVideo";
26-
2724
public static final String SIMPLE_VIDEO = "simple_video";
2825

2926
private static final int VIDEOS = 1;
@@ -35,10 +32,10 @@ public class SimpleFinchVideoContentProvider extends ContentProvider {
3532

3633
static {
3734
sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
38-
sUriMatcher.addURI(AUTHORITY, FinchVideo.SimpleVideos.VIDEO_NAME,
35+
sUriMatcher.addURI(FinchVideo.SIMPLE_AUTHORITY, FinchVideo.SimpleVideos.VIDEO_NAME,
3936
VIDEOS);
4037
// use of the hash character indicates matching of an id
41-
sUriMatcher.addURI(AUTHORITY,
38+
sUriMatcher.addURI(FinchVideo.SIMPLE_AUTHORITY,
4239
FinchVideo.SimpleVideos.VIDEO_NAME + "/#", VIDEO_ID);
4340

4441
// example projection map, not actually used in this application
@@ -196,9 +193,8 @@ public Uri insert(Uri uri, ContentValues initialValues) {
196193
long rowId = db.insert(VIDEO_TABLE_NAME,
197194
FinchVideo.SimpleVideos.VIDEO_NAME, values);
198195
if (rowId > 0) {
199-
Uri videoURi =
200-
ContentUris.withAppendedId(
201-
FinchVideo.SimpleVideos.CONTENT_URI, rowId);
196+
Uri videoURi = ContentUris.withAppendedId(
197+
FinchVideo.SimpleVideos.CONTENT_URI, rowId);
202198
getContext().getContentResolver().notifyChange(videoURi, null);
203199
return videoURi;
204200
}

FinchVideo/src/com/oreilly/demo/android/pa/finchvideo/provider/YouTubeHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import java.io.InputStreamReader;
2323

2424
/**
25-
* Parses YouTube Entity data and and inserts it into the finch video content
25+
* Parses YouTube entity data and and inserts it into the finch video content
2626
* provider.
2727
*/
2828
public class YouTubeHandler implements ResponseHandler {
@@ -99,7 +99,7 @@ private void deleteOld() {
9999
null, null, null, null);
100100
int c = old.getCount();
101101
if (old.getCount() > 0) {
102-
StringBuffer sb = new StringBuffer();
102+
StringBuilder sb = new StringBuilder();
103103
boolean next;
104104
if (old.moveToNext()) {
105105
do {

0 commit comments

Comments
 (0)