Enable/disable notification.

@param enable
165443
public void setEnabled(boolean enable) {
        if (enable && !mEnabled) {
            if (DBG) Log.d(TAG, "Notification handler=" + ID + " is now enabled.");
            mEnabled = true;
        } else if (!enable && mEnabled) {
            if (DBG) Log.d(TAG, "Notification handler=" + ID + " is now disabled.");
            mEnabled = false;
            cancelAll();
        }
    }
640006
function (successCallback, errorCallback, args) {
		winble.logger.logApiEntry("enableNotification");
		var deviceHandle = args[0] ? args[0] : "";
		var charHandle = args[1] ? args[1] : "";
		winble.deviceManager.enableCharacteristicNotification(successCallback, errorCallback, deviceHandle, charHandle);
		winble.logger.logApiExit("enableNotification");
	}
1053358
public static void setHMSReceiveNotifyMsg(final boolean enable) {
    com.huawei.android.hms.agent.HMSAgent.Push.enableReceiveNotifyMsg(enable,
        new com.huawei.android.hms.agent.push.handler.EnableReceiveNotifyMsgHandler() {
          @Override
          public void onResult(int rst) {
            LOGGER.d("[HMS] enableReceiveNotifyMsg(flag=" + enable + ") returnCode=" + rst);
          }
        });
  }
297735
public static void enable() {
        final MetaClassRegistry metaClassRegistry = GroovySystem.getMetaClassRegistry();
        synchronized (metaClassRegistry) {
            if (metaClassRegistry.getMetaClassCreationHandler() != instance) {
                ClassInfo.clearModifiedExpandos();
                metaClassRegistry.setMetaClassCreationHandle(instance);
            }
        }
    }
1078564
@Override
    public void setMonitorEnabled(boolean enabled) {
        if(enabled) {
            // create and start background monitor
            if (monitor == null) {
                monitor = new AdcGpioProviderBase.ADCMonitor();
                monitor.start();
            }
        }
        else{
            try {
                // if a monitor is running, then shut it down now
                if (monitor != null) {
                    // shutdown monitoring thread
                    monitor.shutdown();
                    monitor = null;
                }
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
    }
81995
public void setArduinoEnabled(boolean enable) {
        Buffer buffer = new Buffer();
        buffer.writeByte(enable ? 1 : 0);
        sendMessage(BeanMessageID.CC_POWER_ARDUINO, buffer);
    }
435603
public void setEnabled(boolean enabled) {
		super.setEnabled(enabled);
		spinner.setEnabled(enabled);
		textField.setEnabled(enabled);
		/*
		 * Fixes the background bug
		 * 4991597 and sets the background explicitely to a
		 * TextField.inactiveBackground.
		 */
		if (!enabled) {
			textField.setBackground(UIManager.getColor("TextField.inactiveBackground"));
		}
	}
1300124
public void enableOuterPadding(final boolean enable) {
        if (mOuterPaddingEnabled != enable) {
            mOuterPaddingEnabled = enable;
            if (mContainer != null) {
                mContainer.onLayoutChanged(this);
            }
        }
    }
983404
public void setOkButtonEnabled(final boolean enabled) {

        Scheduler.get().scheduleDeferred(new ScheduledCommand() {

            /**
             * @see com.google.gwt.core.client.Scheduler.ScheduledCommand#execute()
             */
            public void execute() {

                // The event handling of GWT gets confused if we don't execute this as a scheduled command
                getOkButton().setDown(false);
                getOkButton().setEnabled(enabled);
            }
        });

    }
707184
protected void enabledUpdated() {
		boolean enabled = isEnabled();
		if (hasChanged(oldEnabled, enabled)) {
			oldEnabled = enabled;
			firePropertyChange(ENABLED_PROPERTY, !enabled, enabled);
		}
	}
734357
def enable() -> None:
        """"""
        if not isinstance(sys.stdout, DebugPrint):
            sys.stdout = DebugPrint(sys.stdout)
695939
void activateButtons(final boolean enable) {
        this.unloadButton.setDisable(!enable);
        this.playPauseButton.setDisable(!enable);
        this.backwardButton.setDisable(!enable);
        this.forwardButton.setDisable(!enable);
        this.stopButton.setDisable(!enable);
    }
825853
public void enableUniformSize(final boolean enable) {
        if (mUniformSize != enable) {
            mUniformSize = enable;
            if (mContainer != null) {
                mContainer.onLayoutChanged(this);
            }
        }
    }
392970
public void setBoardEnabled(boolean enable) {
        if (enable && mBoard == null) {
            mBoard = makeBoard();
        }
        if (mBoard != null) {
            mBoard.setBoardEnabled(enable);
        }
    }
1028196
function enableLuxometerNotifications(device)
{
	// Turn Luxometer ON.
	device.writeCharacteristic(
		LUXOMETER_SERVICE,
		LUXOMETER_CONFIG,
		new Uint8Array([1]),
		turnOnLuxometerSuccess,
		turnOnLuxometerError)

	// Enable notifications from the Luxometer.
	device.enableNotification(
		LUXOMETER_SERVICE,
		LUXOMETER_DATA,
		readLuxometerSuccess,
		readLuxometerError)

	function turnOnLuxometerSuccess()
	{
		showMessage('Luxometer is ON')

	}
	function turnOnLuxometerError(error)
	{
		showMessage('Write Luxometer error: ' + error)
	}

	// Called repeatedly until disableNotification is called.
	function readLuxometerSuccess(data)
	{
		var lux = calculateLux(data)
		showMessage('Luxometer value: ' + lux)
	}

	function readLuxometerError(error)
	{
		showMessage('Read Luxometer error: ' + error)
	}
}
759660
function enableLuxometerNotifications(deviceHandle, configCharacteristic, dataCharacteristic)
{
	// Turn Luxometer ON.
	evothings.ble.writeCharacteristic(
		deviceHandle,
		configCharacteristic.handle,
		new Uint8Array([1]),
		turnOnLuxometerSuccess,
		turnOnLuxometerError)

	// Enable notifications from the Luxometer.
	evothings.ble.enableNotification(
		deviceHandle,
		dataCharacteristic.handle,
		readLuxometerSuccess,
		readLuxometerError)

	function turnOnLuxometerSuccess()
	{
		showMessage('Luxometer is ON')

	}
	function turnOnLuxometerError(error)
	{
		showMessage('Write Luxometer error: ' + error)
	}

	// Called repeatedly until disableNotification is called.
	function readLuxometerSuccess(data)
	{
		var lux = calculateLux(data)
		showMessage('Luxometer value: ' + lux)
	}

	function readLuxometerError(error)
	{
		showMessage('Read Luxometer error: ' + error)
	}
}
333182
private void enableSetButton(boolean enabled) {

        if (enabled) {
            if (m_addPermissionSetButton == null) {
                m_addPermissionSetButton = new Button(FontAwesome.PLUS);
                m_addPermissionSetButton.addStyleName(OpenCmsTheme.BUTTON_ICON);
                m_addPermissionSetButton.addClickListener(new ClickListener() {

                    private static final long serialVersionUID = 1L;

                    public void buttonClick(ClickEvent event) {

                        onSelect();
                    }
                });
                m_main.addComponent(m_addPermissionSetButton);
            }
        } else if (m_addPermissionSetButton != null) {
            m_main.removeComponent(m_addPermissionSetButton);
            m_addPermissionSetButton = null;
        }
    }