Simple Sound cloud client initialized with a client id.

@param context  context used to instantiate internal components, no hard reference will be kept.
@param clientId sound cloud client id.
@return instance of {@link CheerleaderPlayer}
515680
private static CheerleaderPlayer getInstance(Context context, String clientId) {
        if (clientId == null) {
            throw new IllegalArgumentException("Sound cloud client id can't be null.");
        }
        if (sInstance == null || sInstance.mIsClosed) {
            sInstance = new CheerleaderPlayer(context.getApplicationContext(), clientId);
        } else {
            sInstance.mClientKey = clientId;
        }
        // reset destroy request each time an instance is requested.
        sInstance.mDestroyDelayed = false;
        return sInstance;
    }
776338
public static MultiTaskListener instance(Context context) {
        MultiTaskListener instance = context.get(taskListenerKey);
        if (instance == null)
            instance = new MultiTaskListener(context);
        return instance;
    }
903871
public Object createContext(Object param) throws Exception {

        Class<?>[] params = mConstr != null ? mConstr.getParameterTypes() : new Class[0];
        if (params.length > 1 && MergedClass.InvocationEventObserver.class.equals(params[1])) {
            return mConstr.newInstance(new Object[] {
                new MergingContextFactory(param),
                new MergedClass.InvocationEventObserver() {
                    public void invokedEvent(String caller, String callee, long elapsedTime) { }
                    public long currentTime() { return 0L; }
            }});
        }
        else {
            return mConstr.newInstance(new Object[] {
                new MergingContextFactory(param)});
        }
    }
157668
public static RxBleClient create(@NonNull Context context) {
        return DaggerClientComponent
                .builder()
                .applicationContext(context.getApplicationContext())
                .build()
                .rxBleClient();
    }
514169
function(clientId, contextP, url, editing) {
			var peer = this.getPeer(clientId);
			// Peer might be loading. Once it is loaded, this annotation will be automatically updated,
			// so we can safely leave it blank.
			var name = (peer && peer.name) ? peer.name : 'Unknown';
			var color = (peer && peer.color) ? peer.color : '#000000';
			if (url) {
				url = contextP + this.getFileSystemPrefix() + url;
			}
			this.collabFileAnnotations[clientId] = new CollabFileAnnotation(name, color, url, this.projectRelativeLocation(url), editing);
			this._requestFileAnnotationUpdate();
		}
547788
protected VelocityContext createContext()
    {
        VelocityContext context = new VelocityContext();
        context.put(META_KEY, META);
        context.put(UTILS_KEY, UTILS);
        context.put(MESSAGES_KEY, MESSAGES);
        return context;
    }
581711
public static void injectContextProxies(AbstractResourceInfo cri, Object instance) {
        injectContextProxiesAndApplication(cri, instance, null, null);
    }
1045055
public static Bridge create(final BandwidthClient client, final String callId1, final String callId2)
    	    throws Exception 
    {
    	assert (callId1 != null);

    	final HashMap<String, Object> params = new HashMap<String, Object>();

    	params.put("bridgeAudio", "true");

        String[] callIds = null;

        if (callId1 != null && callId2 != null) {
            callIds = new String[] { callId1, callId2 };
        } else if (callId1 != null && callId2 == null) {
            callIds = new String[] { callId1 };
        } else if (callId1 == null && callId2 != null) {
            callIds = new String[] { callId2 };
        }

    	params.put("callIds", callIds == null ? Collections.emptyList()
    		: Arrays.asList(callIds));

    	return create(client, params);
	}
1278730
protected Pair<String, String> getClientIdAndClientSecret(final WebContext context) {
        val extractor = new BasicAuthExtractor();
        val upc = extractor.extract(context);
        if (upc != null) {
            return Pair.of(upc.getUsername(), upc.getPassword());
        }
        val clientId = context.getRequestParameter(OAuth20Constants.CLIENT_ID);
        val clientSecret = context.getRequestParameter(OAuth20Constants.CLIENT_SECRET);
        return Pair.of(clientId, clientSecret);
    }
844791
def client_registration(self, context):
        
        try:
            resp = self.provider.handle_client_registration_request(json.dumps(context.request))
            return Created(resp.to_json(), content="application/json")
        except InvalidClientRegistrationRequest as e:
            return BadRequest(e.to_json(), content="application/json")
138706
@VisibleForTesting
  ClientCallTracer newClientCallTracer(
      TagContext parentCtx, String fullMethodName) {
    return new ClientCallTracer(this, parentCtx, fullMethodName);
  }
173176
public static synchronized boolean updateAdvertisingIdClientInfo(Context context) {
		ApptentiveLog.v(ADVERTISER_ID, "Updating advertiser ID client info...");
		AdvertisingIdClientInfo clientInfo = resolveAdvertisingIdClientInfo(context);
		if (clientInfo != null && clientInfo.equals(cachedClientInfo)) {
			return false; // no changes
		}

		ApptentiveLog.v(ADVERTISER_ID, "Advertiser ID client info changed: %s", clientInfo);
		cachedClientInfo = clientInfo;
		notifyClientInfoChanged(cachedClientInfo);
		return true;
	}
632610
public IChannelProducer getProviderChannelFor(
            String functionalityName,
            String clientName,
            String conversationID) throws ServiceGroundingException
    {
        IChannelProducer channel = this.channelProducersHelper.getChannel(functionalityName, clientName, conversationID);
        if (null != channel && !(channel instanceof InternalChannel))
        {
            return channel;
        }

        IChannelProducer newChannel = createProviderChannelFor(functionalityName, clientName, conversationID);
        this.channelProducersHelper.addChannel(newChannel, functionalityName, clientName, conversationID);
        return newChannel;
    }
78250
public static ApiContext create(String clientId, String clientSecret, Mode mode) {
        if (instance == null) {
            synchronized (ApiContext.class) {
                if (instance == null) {
                    instance = new ApiContext(clientId, clientSecret, mode);
                }
            }
        }

        return instance;
    }
1373696
@TargetApi(Build.VERSION_CODES.GINGERBREAD)
    public static boolean hasLowLatencyAudioFeature(Context context) {
        return hasLowLatencyAudioFeature(context.getPackageManager());
    }
1263030
public static SpanContext fromCloudTraceContext(CloudTraceContext cloudTraceContext) {
    checkNotNull(cloudTraceContext, "cloudTraceContext");

    try {
      // Extract the trace ID from the binary protobuf CloudTraceContext#traceId.
      TraceIdProto traceIdProto = TraceIdProto.parseFrom(cloudTraceContext.getTraceId());
      ByteBuffer traceIdBuf = ByteBuffer.allocate(TraceId.SIZE);
      traceIdBuf.putLong(traceIdProto.getHi());
      traceIdBuf.putLong(traceIdProto.getLo());
      ByteBuffer spanIdBuf = ByteBuffer.allocate(SpanId.SIZE);
      spanIdBuf.putLong(cloudTraceContext.getSpanId());

      return SpanContext.create(
          TraceId.fromBytes(traceIdBuf.array()),
          SpanId.fromBytes(spanIdBuf.array()),
          TraceOptions.builder().setIsSampled(cloudTraceContext.isTraceEnabled()).build(),
          TRACESTATE_DEFAULT);
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw new RuntimeException(e);
    }
  }
612581
public void setClientID(String clientID) {
        if (clientID == null || clientID.isEmpty()) {
            this.clientID = DEFAULT_CLIENT_ID;
            return;
        }
        this.clientID = clientID;
    }