Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33b60bb4 authored by Jason Monk's avatar Jason Monk
Browse files

Fix demo mode issues

Bug: 22387423
Change-Id: I7b0b4ca75bae12a9fb3a90ab804b263e8d982b46
parent 0ec43f89
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -661,9 +661,9 @@ public class NetworkControllerImpl extends BroadcastReceiver
                    for (int i = start /* get out of normal index range */; i < start + num; i++) {
                        subs.add(addSignalController(i, i));
                    }
                }
                    mCallbackHandler.setSubs(subs);
                }
            }
            String nosim = args.getString("nosim");
            if (nosim != null) {
                mHasNoSims = nosim.equals("show");
+6 −1
Original line number Diff line number Diff line
@@ -103,6 +103,11 @@ public class DemoModeFragment extends PreferenceFragment implements OnPreference
    @Override
    public boolean onPreferenceChange(Preference preference, Object newValue) {
        if (preference == mEnabledSwitch) {
            if (newValue != Boolean.TRUE) {
                // Make sure we aren't in demo mode when disabling it.
                mOnSwitch.setChecked(false);
                stopDemoMode();
            }
            setGlobal(DEMO_MODE_ALLOWED, newValue == Boolean.TRUE ? 1 : 0);
        } else if (preference == mOnSwitch) {
            if (newValue == Boolean.TRUE) {
@@ -123,7 +128,7 @@ public class DemoModeFragment extends PreferenceFragment implements OnPreference
        getContext().sendBroadcast(intent);

        intent.putExtra(DemoMode.EXTRA_COMMAND, DemoMode.COMMAND_CLOCK);
        intent.putExtra("hhmm", "0520");
        intent.putExtra("hhmm", "0600");
        getContext().sendBroadcast(intent);

        intent.putExtra(DemoMode.EXTRA_COMMAND, DemoMode.COMMAND_NETWORK);