Move "appid" into AppDetails.EXTRA_APPID
This commit is contained in:
parent
2cdb634865
commit
7fd3ea236e
@ -74,6 +74,9 @@ public class AppDetails extends ListActivity {
|
|||||||
|
|
||||||
private static final int REQUEST_INSTALL = 0;
|
private static final int REQUEST_INSTALL = 0;
|
||||||
private static final int REQUEST_UNINSTALL = 1;
|
private static final int REQUEST_UNINSTALL = 1;
|
||||||
|
|
||||||
|
public static final String EXTRA_APPID = "appid";
|
||||||
|
|
||||||
private ApkListAdapter adapter;
|
private ApkListAdapter adapter;
|
||||||
|
|
||||||
private static class ViewHolder {
|
private static class ViewHolder {
|
||||||
@ -287,10 +290,10 @@ public class AppDetails extends ListActivity {
|
|||||||
}
|
}
|
||||||
Log.d("FDroid", "AppDetails launched from link, for '" + appid
|
Log.d("FDroid", "AppDetails launched from link, for '" + appid
|
||||||
+ "'");
|
+ "'");
|
||||||
} else if (!i.hasExtra("appid")) {
|
} else if (!i.hasExtra(EXTRA_APPID)) {
|
||||||
Log.d("FDroid", "No application ID in AppDetails!?");
|
Log.d("FDroid", "No application ID in AppDetails!?");
|
||||||
} else {
|
} else {
|
||||||
appid = i.getStringExtra("appid");
|
appid = i.getStringExtra(EXTRA_APPID);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i.hasExtra("from")) {
|
if (i.hasExtra("from")) {
|
||||||
|
@ -106,7 +106,7 @@ public class FDroid extends FragmentActivity {
|
|||||||
}
|
}
|
||||||
if (appid != null && appid.length() > 0) {
|
if (appid != null && appid.length() > 0) {
|
||||||
Intent call = new Intent(this, AppDetails.class);
|
Intent call = new Intent(this, AppDetails.class);
|
||||||
call.putExtra("appid", appid);
|
call.putExtra(AppDetails.EXTRA_APPID, appid);
|
||||||
startActivityForResult(call, REQUEST_APPDETAILS);
|
startActivityForResult(call, REQUEST_APPDETAILS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ public class SearchResults extends ListActivity {
|
|||||||
app = new App((Cursor) adapter.getItem(position));
|
app = new App((Cursor) adapter.getItem(position));
|
||||||
|
|
||||||
Intent intent = new Intent(this, AppDetails.class);
|
Intent intent = new Intent(this, AppDetails.class);
|
||||||
intent.putExtra("appid", app.id);
|
intent.putExtra(AppDetails.EXTRA_APPID, app.id);
|
||||||
startActivityForResult(intent, REQUEST_APPDETAILS);
|
startActivityForResult(intent, REQUEST_APPDETAILS);
|
||||||
super.onListItemClick(l, v, position, id);
|
super.onListItemClick(l, v, position, id);
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ abstract public class AppListFragment extends ListFragment implements
|
|||||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||||
final App app = new App((Cursor)getListView().getItemAtPosition(position));
|
final App app = new App((Cursor)getListView().getItemAtPosition(position));
|
||||||
Intent intent = new Intent(getActivity(), AppDetails.class);
|
Intent intent = new Intent(getActivity(), AppDetails.class);
|
||||||
intent.putExtra("appid", app.id);
|
intent.putExtra(AppDetails.EXTRA_APPID, app.id);
|
||||||
intent.putExtra("from", getFromTitle());
|
intent.putExtra("from", getFromTitle());
|
||||||
startActivityForResult(intent, FDroid.REQUEST_APPDETAILS);
|
startActivityForResult(intent, FDroid.REQUEST_APPDETAILS);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user