mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-11 10:26:22 +00:00
Remove dead code
This commit is contained in:
@@ -171,32 +171,22 @@ public class AppView extends Activity {
|
|||||||
public boolean onContextItemSelected(MenuItem item) {
|
public boolean onContextItemSelected(MenuItem item) {
|
||||||
AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
|
AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
|
||||||
AppObject app = (AppObject) appGridAdapter.getItem(info.position);
|
AppObject app = (AppObject) appGridAdapter.getItem(info.position);
|
||||||
switch (item.getItemId())
|
switch (item.getItemId()) {
|
||||||
{
|
case RESUME_ID:
|
||||||
case RESUME_ID:
|
// Resume is the same as start for us
|
||||||
// Resume is the same as start for us
|
doStart(app.app);
|
||||||
doStart(app.app);
|
return true;
|
||||||
return true;
|
|
||||||
|
|
||||||
case QUIT_ID:
|
|
||||||
doQuit(app.app);
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case CANCEL_ID:
|
|
||||||
return true;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return super.onContextItemSelected(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static String generateString(NvApp app) {
|
case QUIT_ID:
|
||||||
StringBuilder str = new StringBuilder();
|
doQuit(app.app);
|
||||||
str.append(app.getAppName());
|
return true;
|
||||||
if (app.getIsRunning()) {
|
|
||||||
str.append(" - Running");
|
case CANCEL_ID:
|
||||||
}
|
return true;
|
||||||
return str.toString();
|
|
||||||
|
default:
|
||||||
|
return super.onContextItemSelected(item);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateAppList() {
|
private void updateAppList() {
|
||||||
@@ -214,7 +204,7 @@ public class AppView extends Activity {
|
|||||||
public void run() {
|
public void run() {
|
||||||
appGridAdapter.clear();
|
appGridAdapter.clear();
|
||||||
for (NvApp app : appList) {
|
for (NvApp app : appList) {
|
||||||
appGridAdapter.addApp(new AppObject(generateString(app), app));
|
appGridAdapter.addApp(new AppObject(app));
|
||||||
}
|
}
|
||||||
|
|
||||||
appGridAdapter.notifyDataSetChanged();
|
appGridAdapter.notifyDataSetChanged();
|
||||||
@@ -283,7 +273,7 @@ public class AppView extends Activity {
|
|||||||
public class AppObject {
|
public class AppObject {
|
||||||
public NvApp app;
|
public NvApp app;
|
||||||
|
|
||||||
public AppObject(String text, NvApp app) {
|
public AppObject(NvApp app) {
|
||||||
this.app = app;
|
this.app = app;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user