Cleanup unused methods
This commit is contained in:
parent
d68fe66878
commit
d7aebaa8e4
|
@ -464,24 +464,6 @@ public class MediaDatabase extends SQLiteOpenHelper {
|
|||
}
|
||||
}
|
||||
|
||||
private void resetDb(SQLiteDatabase db) {
|
||||
db.execSQL("DROP TABLE IF EXISTS " + Tables.HOSTS);
|
||||
db.execSQL("DROP TABLE IF EXISTS " + Tables.MOVIES);
|
||||
db.execSQL("DROP TABLE IF EXISTS " + Tables.MOVIE_CAST);
|
||||
db.execSQL("DROP TABLE IF EXISTS " + Tables.TVSHOWS);
|
||||
db.execSQL("DROP TABLE IF EXISTS " + Tables.TVSHOWS_CAST);
|
||||
db.execSQL("DROP TABLE IF EXISTS " + Tables.SEASONS);
|
||||
db.execSQL("DROP TABLE IF EXISTS " + Tables.EPISODES);
|
||||
db.execSQL("DROP TABLE IF EXISTS " + Tables.ARTISTS);
|
||||
db.execSQL("DROP TABLE IF EXISTS " + Tables.ALBUMS);
|
||||
db.execSQL("DROP TABLE IF EXISTS " + Tables.SONGS);
|
||||
db.execSQL("DROP TABLE IF EXISTS " + Tables.AUDIO_GENRES);
|
||||
db.execSQL("DROP TABLE IF EXISTS " + Tables.ALBUM_ARTISTS);
|
||||
db.execSQL("DROP TABLE IF EXISTS " + Tables.ALBUM_GENRES);
|
||||
db.execSQL("DROP TABLE IF EXISTS " + Tables.MUSIC_VIDEOS);
|
||||
onCreate(db);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tokens to move from prefix to suffix when sorting titles
|
||||
*
|
||||
|
|
|
@ -483,26 +483,6 @@ public class MediaProvider extends ContentProvider {
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a simple {@link SelectionBuilder} to match the requested
|
||||
* {@link Uri}. This is usually enough to support
|
||||
* {@link #update}, and {@link #delete} operations.
|
||||
*/
|
||||
private SelectionBuilder buildUpdateDeleteSelection(Uri uri) {
|
||||
final SelectionBuilder builder = new SelectionBuilder();
|
||||
final int match = sUriMatcher.match(uri);
|
||||
switch (match) {
|
||||
case HOSTS_ID: {
|
||||
final String hostId = MediaContract.Hosts.getHostId(uri);
|
||||
return builder.table(MediaDatabase.Tables.HOSTS)
|
||||
.where(BaseColumns._ID + "=?", hostId);
|
||||
}
|
||||
default: {
|
||||
throw new UnsupportedOperationException("Unsupported uri: " + uri);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an advanced {@link SelectionBuilder} to match the requested
|
||||
* {@link Uri}. This is usually only used by {@link #query}, since it
|
||||
|
|
|
@ -294,25 +294,6 @@ public class RemoteActivity extends BaseActivity
|
|||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* Issue commands to update the Audio and Video libraries, sequentially
|
||||
*/
|
||||
private void updateLibraries() {
|
||||
final Handler callbackHandler = new Handler();
|
||||
VideoLibrary.Scan actionScanVideo = new VideoLibrary.Scan();
|
||||
actionScanVideo.execute(hostManager.getConnection(), new ApiCallback<String>() {
|
||||
@Override
|
||||
public void onSuccess(String result) {
|
||||
// Great, now update the Audio library
|
||||
AudioLibrary.Scan actionScanAudio = new AudioLibrary.Scan();
|
||||
actionScanAudio.execute(hostManager.getConnection(), null, callbackHandler);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int errorCode, String description) { }
|
||||
}, callbackHandler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callbacks from Send text dialog
|
||||
*/
|
||||
|
|
|
@ -86,7 +86,7 @@ public class NetUtils {
|
|||
InetAddress inet = InetAddress.getByName(hostAddress);
|
||||
|
||||
// Send some traffic, with a timeout
|
||||
boolean reachable = inet.isReachable(1000);
|
||||
inet.isReachable(1000);
|
||||
|
||||
ipHostAddress = inet.getHostAddress();
|
||||
} catch (UnknownHostException e) {
|
||||
|
|
Loading…
Reference in New Issue