Skip to content

Commit c851e17

Browse files
author
davidgraeff
committed
Notify on shortcut click, if option is set
1 parent 221e029 commit c851e17

File tree

3 files changed

+37
-69
lines changed

3 files changed

+37
-69
lines changed

.idea/workspace.xml

+35-66
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/main/java/oly/netpowerctrl/main/ScenesFragment.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public boolean onMenuItemClick(MenuItem menuItem) {
200200
case R.id.menu_add_homescreen: {
201201
@SuppressWarnings("ConstantConditions")
202202
Context context = getActivity().getApplicationContext();
203-
Intent extra = Shortcuts.createShortcutExecutionIntent(getActivity(), og, false);
203+
Intent extra = Shortcuts.createShortcutExecutionIntent(getActivity(), og, false, false);
204204
Intent shortcutIntent = Shortcuts.createShortcut(getActivity(), extra, og.sceneName);
205205
shortcutIntent.setAction("com.android.launcher.action.INSTALL_SHORTCUT");
206206
assert context != null;

app/src/main/java/oly/netpowerctrl/shortcut/ShortcutExecutionActivity.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import oly.netpowerctrl.widget.WidgetUpdateService;
2323

2424
public class ShortcutExecutionActivity extends Activity implements DeviceUpdateStateOrTimeout {
25-
private ShortcutExecutionActivity that = this;
2625
private boolean listener_started = false;
2726
private Collection<DeviceCommand> deviceCommands;
2827
private boolean updateWidget = false;
@@ -48,7 +47,7 @@ protected void onCreate(final Bundle savedInstanceState) {
4847
// Extract command group from intent extra
4948
Bundle extra = it.getExtras();
5049
assert extra != null;
51-
Scene g = null;
50+
Scene g;
5251
try {
5352
g = Scene.fromJSON(JSONHelper.getReader(extra.getString("commands")));
5453
} catch (IOException ignored) {

0 commit comments

Comments
 (0)