Fix some additional launcher shortcut issues

This commit is contained in:
Cameron Gutman
2016-11-06 00:43:18 -07:00
parent 92f8425ace
commit f0e85c4c53
2 changed files with 24 additions and 6 deletions

View File

@@ -357,6 +357,9 @@ public class PcView extends Activity implements AdapterFragmentCallbacks {
// Invalidate reachability information after pairing to force
// a refresh before reading pair state again
managerBinder.invalidateStateForComputer(computer.uuid);
// Add a launcher shortcut for this PC
shortcutHelper.createAppViewShortcut(computer.uuid.toString(), computer);
}
else {
// Should be no other values
@@ -505,8 +508,6 @@ public class PcView extends Activity implements AdapterFragmentCallbacks {
return;
}
shortcutHelper.createAppViewShortcut(computer.uuid.toString(), computer);
Intent i = new Intent(this, AppView.class);
i.putExtra(AppView.NAME_EXTRA, computer.name);
i.putExtra(AppView.UUID_EXTRA, computer.uuid.toString());
@@ -609,6 +610,11 @@ public class PcView extends Activity implements AdapterFragmentCallbacks {
}
}
// Add a launcher shortcut for this PC
if (details.pairState == PairState.PAIRED) {
shortcutHelper.createAppViewShortcut(details.uuid.toString(), details);
}
if (existingEntry != null) {
// Replace the information in the existing entry
existingEntry.details = details;