Improve shortcut handling when the list is full

This commit is contained in:
Cameron Gutman
2016-11-10 19:45:17 -08:00
parent d5863e1bef
commit fc629db653
5 changed files with 38 additions and 13 deletions

View File

@@ -248,13 +248,17 @@ public class AppView extends Activity implements AdapterFragmentCallbacks {
uuidString = getIntent().getStringExtra(UUID_EXTRA);
shortcutHelper.reportShortcutUsed(uuidString);
String computerName = getIntent().getStringExtra(NAME_EXTRA);
String labelText = getResources().getString(R.string.title_applist)+" "+getIntent().getStringExtra(NAME_EXTRA);
String labelText = getResources().getString(R.string.title_applist)+" "+computerName;
TextView label = (TextView) findViewById(R.id.appListText);
setTitle(labelText);
label.setText(labelText);
// Add a launcher shortcut for this PC (forced, since this is user interaction)
shortcutHelper.createAppViewShortcut(uuidString, computerName, uuidString, true);
shortcutHelper.reportShortcutUsed(uuidString);
// Bind to the computer manager service
bindService(new Intent(this, ComputerManagerService.class), serviceConnection,
Service.BIND_AUTO_CREATE);