Call this in {@link org.microg.nlp.api.LocationBackendService#onOpen()}.
774092
@Override
    public synchronized void onOpen() {
        super.onOpen();

        if (phoneStateListener == null) {
            Handler mainHandler = new Handler(context.getMainLooper());
            mainHandler.post(new Runnable() {
                @Override
                public void run() {
                    phoneStateListener = new PhoneStateListener() {

                        @Override
                        public void onCellInfoChanged(List<CellInfo> cellInfo) {
                            if (cellInfo != null && !cellInfo.isEmpty()) {
                                onCellsChanged(cellInfo);
                            } else if (supportsCellInfoChanged) {
                                supportsCellInfoChanged = false;
                                onSignalStrengthsChanged(null);
                            }
                        }

                        @Override
                        public void onSignalStrengthsChanged(SignalStrength signalStrength) {
                            if (!supportsCellInfoChanged) {
                                fallbackScan();
                            }
                        }
                    };
                    registerPhoneStateListener();
                }
            });
        } else {
            registerPhoneStateListener();
        }
    }
474202
protected void setDefaultInfoWindowLocation(){
        int s = mOriginalPoints.size();
        if (s > 0)
            mInfoWindowLocation = mOriginalPoints.get(s/2);
        else
            mInfoWindowLocation = new GeoPoint(0.0, 0.0);
    }
665625
public void addStreamOpenLocation(Location streamOpenLocation, Stream stream) {
        if (FindOpenStream.DEBUG) {
            System.out.println("Stream open location at " + streamOpenLocation);
        }
        streamOpenLocationMap.put(streamOpenLocation, stream);
        if (stream.isUninteresting()) {
            uninterestingStreamEscapeSet.add(stream);
        }
    }
878035
@Override
    public Node visitPositionalArgument(SqlBaseParser.PositionalArgumentContext context)
    {
        return new CallArgument(getLocation(context), (Expression) visit(context.expression()));
    }
1332758
function ( ) {
			
			if ( '' === _DistanceInput.value ) {
				return ;
			}

			Map.closePopup(); 

			// ... A new pin is created...
			var getPin;
			if ( typeof module !== 'undefined' && module.exports ) {
				getPin = require ('./L.Marker.Pin' );
			}
			else {
				getPin = L.marker.pin;
			}

			var Pins;
			if ( typeof module !== 'undefined' && module.exports ) {
				Pins = require ('./L.Marker.Pin.Pins' );
			}
			else {
				Pins = L.marker.pin.pins ( );
			}

			var draggableIcon = ! Pins.readOnly;

			var Pin = getPin (
				latlng,
				{
					icon : _Categories.getAt ( _CategorySelect.selectedIndex ).CategoryIcon,
					draggable : draggableIcon,
					className : 'Pin',
					title : _Categories.getAt ( _CategorySelect.selectedIndex ).CategoryName,
					phone : _PhoneInput.value,
					url : _UrlInput.value,
					distance : parseFloat ( _DistanceInput.value ),
					//text : _TextInput.value,
					text : _TextArea.value,
					address : _addressInput.value,
					pinCategory : _Categories.getAt ( _CategorySelect.selectedIndex ),
					map : Map,
				}
			);

			if ( options.exist ) {
				// The dialog was open for edition. The old pin is 
				// removed from the map and from the pin's collection
				var pinPosition = Pins.remove ( options.pinObject );
				Map.removeLayer( options.pinObject );
				Pins.push ( Pin, pinPosition );
			}
			else {
				// ... and added to the pin's collection ...
				Pins.push ( Pin );
			}

			// ... a popup and events are added to the pin ...
			Pin.bindPopup ( Pin.getHtml ( ) ).addTo ( Map );
			
			var ContextMenu;
			if ( typeof module !== 'undefined' && module.exports ) {
				ContextMenu = require ('./L.Marker.Pin.ContextMenu' );
			}
			else {
				ContextMenu = L.marker.pin.contextmenu;
			}
			Pin.on ( 'contextmenu', ContextMenu ); 
			Pin.on ( 'dblclick', ContextMenu);
			Pin.on ( 'dragend', Pins.CallbackFunction ); 
			
			/*
			if ( options.exist ) {
				// The dialog was open for edition. The old pin is 
				// removed from the map and from the pin's collection
				var NewPos = Pins.remove ( options.pinObject );
				Map.removeLayer( options.pinObject );
				Pins.order ( OldPos - 1, NewPos, false );
			}
			*/
		}
301281
public void setNoLocal(boolean noLocal)
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "setNoLocal", new Boolean(noLocal));

    this.noLocal = noLocal;

    if (tc.isEntryEnabled())
      SibTr.exit(tc, "setNoLocal");
  }
1114014
public void enableFollowLocation() {
		mIsFollowing = true;

		// set initial location when enabled
		if (isMyLocationEnabled()) {
			Location location = mMyLocationProvider.getLastKnownLocation();
			if (location != null) {
				setLocation(location);
			}
		}

		// Update the screen to see changes take effect
		if (mMapView != null) {
			mMapView.postInvalidate();
		}
	}
1199612
function(oThis, sProp, oValue, bNotifyLayout) {
		var bSuppressRerendering = !!oThis.getDomRef();
		oThis.setProperty(sProp, oValue, bSuppressRerendering);
		if (bSuppressRerendering && bNotifyLayout) {
			notifyLayoutOnChange(oThis, "CTRL_POS");
		}
		return bSuppressRerendering;
	}
596630
public static void setLocation(HttpServletRequest request, HttpServletResponse response, String location) {
		if(request.getAttribute(IS_INCLUDED_REQUEST_ATTRIBUTE_NAME) == null) {
			// Not included, setHeader directly
			response.setHeader("Location", location);
		} else {
			// Is included, set attribute so top level tag can perform actual setHeader call
			request.setAttribute(LOCATION_REQUEST_ATTRIBUTE_NAME, location);
		}
	}
296826
public void parseLocation(String location, String value) {
        setLocationValue(value);
        setLocation(PresentationManager.getPm().getLocation(location));
    }
840584
public ApiResponse<ApiPostEndpointsSuccess> postApiEndpointsWithHttpInfo() throws ApiException {
        com.squareup.okhttp.Call call = postApiEndpointsValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken<ApiPostEndpointsSuccess>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }
398264
public void report(Location location) {
        if (callback != null) {
            try {
                callback.report(location);
            } catch (android.os.DeadObjectException e) {
                waiting = location;
                callback = null;
            } catch (RemoteException e) {
                waiting = location;
            }
        } else {
            waiting = location;
        }
    }
273145
protected synchronized void setLocationService(WsLocationAdmin locSvc) {
        this.locationService = locSvc;
        if (tc.isDebugEnabled())
            Tr.debug(tc, "setLocationService, locSvc " + locSvc);
    }
614681
private void setLocationFromUri(String location) throws IOException
    {
        try
        {
            if (!location.startsWith("cassandra://"))
                throw new Exception("Bad scheme." + location);
            
            String[] urlParts = location.split("\\?");
            if (urlParts.length > 1)
            {
                Map<String, String> urlQuery = getQueryMap(urlParts[1]);
                AbstractType comparator = BytesType.instance;
                if (urlQuery.containsKey("comparator"))
                    comparator = TypeParser.parse(urlQuery.get("comparator"));
                if (urlQuery.containsKey("slice_start"))
                    slice_start = comparator.fromString(urlQuery.get("slice_start"));
                if (urlQuery.containsKey("slice_end"))
                    slice_end = comparator.fromString(urlQuery.get("slice_end"));
                if (urlQuery.containsKey("reversed"))
                    slice_reverse = Boolean.parseBoolean(urlQuery.get("reversed"));
                if (urlQuery.containsKey("limit"))
                    limit = Integer.parseInt(urlQuery.get("limit"));
                if (urlQuery.containsKey("allow_deletes"))
                    allow_deletes = Boolean.parseBoolean(urlQuery.get("allow_deletes"));
                if (urlQuery.containsKey("widerows"))
                    widerows = Boolean.parseBoolean(urlQuery.get("widerows"));
                if (urlQuery.containsKey("use_secondary"))
                    usePartitionFilter = Boolean.parseBoolean(urlQuery.get("use_secondary"));
                if (urlQuery.containsKey("split_size"))
                    splitSize = Integer.parseInt(urlQuery.get("split_size"));
                if (urlQuery.containsKey("partitioner"))
                    partitionerClass = urlQuery.get("partitioner");
                if (urlQuery.containsKey("init_address"))
                    initHostAddress = urlQuery.get("init_address");
                if (urlQuery.containsKey("rpc_port"))
                    rpcPort = urlQuery.get("rpc_port");
            }
            String[] parts = urlParts[0].split("/+");
            String[] credentialsAndKeyspace = parts[1].split("@");
            if (credentialsAndKeyspace.length > 1)
            {
                String[] credentials = credentialsAndKeyspace[0].split(":");
                username = credentials[0];
                password = credentials[1];
                keyspace = credentialsAndKeyspace[1];
            }
            else
            {
                keyspace = parts[1];
            }
            column_family = parts[2];
        }
        catch (Exception e)
        {
            throw new IOException("Expected 'cassandra://[username:password@]<keyspace>/<columnfamily>" +
                    "[?slice_start=<start>&slice_end=<end>[&reversed=true][&limit=1]" +
                    "[&allow_deletes=true][&widerows=true][&use_secondary=true]" +
                    "[&comparator=<comparator>][&split_size=<size>][&partitioner=<partitioner>]" +
                    "[&init_address=<host>][&rpc_port=<port>]]': " + e.getMessage());
        }
    }
1090543
protected void setLocationInfo(Map<String, String> infos) {

        if (infos.isEmpty()) {
            m_locationInfoPanel.getStyle().setDisplay(Display.NONE);
        } else {
            StringBuffer infoHtml = new StringBuffer();
            for (Entry<String, String> info : infos.entrySet()) {
                infoHtml.append("<p><span>").append(info.getKey()).append(":</span>").append(info.getValue()).append(
                    "</p>");
            }
            m_locationInfoPanel.setInnerHTML(infoHtml.toString());
            m_locationInfoPanel.getStyle().clearDisplay();
        }
    }
854472
@SuppressWarnings("unchecked")
    public void onOpen(Session session, EndpointConfig configuration) {
        for (MessageHandlerFactory f : messageHandlerFactories) {
            MessageHandler handler = f.create(session);
            final Class<?> handlerClass = getHandlerType(handler);

            if (handler instanceof MessageHandler.Whole) { //WHOLE MESSAGE HANDLER
                session.addMessageHandler(handlerClass, (MessageHandler.Whole) handler);
            } else if (handler instanceof MessageHandler.Partial) { // PARTIAL MESSAGE HANDLER
                session.addMessageHandler(handlerClass, (MessageHandler.Partial) handler);
            }
        }

        if (getOnOpenHandle() != null) {
            callMethod(getOnOpenHandle(), getOnOpenParameters(), session, true);
        }
    }
887294
function () {
            if (typeof _this14.options.onOpenEnd === 'function') {
              _this14.options.onOpenEnd.call(_this14, _this14.el, _this14._openingTrigger);
            }
          }