Tabnine Logo
Intent$FilterComparison
Code IndexAdd Tabnine to your IDE (free)

How to use
Intent$FilterComparison
in
android.content

Best Java code snippets using android.content.Intent$FilterComparison (Showing top 20 results out of 315)

origin: robolectric/robolectric

protected boolean bindService(
  final Intent intent, final ServiceConnection serviceConnection, int i) {
 boundServiceConnections.add(serviceConnection);
 unboundServiceConnections.remove(serviceConnection);
 if (unbindableActions.contains(intent.getAction())) {
  return false;
 }
 startedServices.add(new Intent.FilterComparison(intent));
 ShadowLooper shadowLooper = Shadow.extract(Looper.getMainLooper());
 shadowLooper.post(
   () -> {
    final ServiceConnectionDataWrapper serviceConnectionDataWrapper;
    final Intent.FilterComparison filterComparison = new Intent.FilterComparison(intent);
    if (serviceConnectionDataForIntent.containsKey(filterComparison)) {
     serviceConnectionDataWrapper = serviceConnectionDataForIntent.get(filterComparison);
    } else {
     serviceConnectionDataWrapper = defaultServiceConnectionData;
    }
    serviceConnectionDataForServiceConnection.put(
      serviceConnection, serviceConnectionDataWrapper);
    serviceConnection.onServiceConnected(
      serviceConnectionDataWrapper.componentNameForBindService,
      serviceConnectionDataWrapper.binderForBindService);
   },
   0);
 return true;
}
origin: robolectric/robolectric

/**
 * Returns the most recent {@code Intent} started by {@link #startService(android.content.Intent)}
 * without consuming it.
 *
 * @return the most recently started {@code Intent}
 */
Intent peekNextStartedService() {
 if (startedServices.isEmpty()) {
  return null;
 } else {
  return startedServices.get(0).getIntent();
 }
}
origin: org.robolectric/shadows-framework

protected boolean bindService(
  final Intent intent, final ServiceConnection serviceConnection, int i) {
 boundServiceConnections.add(serviceConnection);
 unboundServiceConnections.remove(serviceConnection);
 if (unbindableActions.contains(intent.getAction())) {
  return false;
 }
 startedServices.add(new Intent.FilterComparison(intent));
 ShadowLooper shadowLooper = Shadow.extract(Looper.getMainLooper());
 shadowLooper.post(
   () -> {
    final ServiceConnectionDataWrapper serviceConnectionDataWrapper;
    final Intent.FilterComparison filterComparison = new Intent.FilterComparison(intent);
    if (serviceConnectionDataForIntent.containsKey(filterComparison)) {
     serviceConnectionDataWrapper = serviceConnectionDataForIntent.get(filterComparison);
    } else {
     serviceConnectionDataWrapper = defaultServiceConnectionData;
    }
    serviceConnectionDataForServiceConnection.put(
      serviceConnection, serviceConnectionDataWrapper);
    serviceConnection.onServiceConnected(
      serviceConnectionDataWrapper.componentNameForBindService,
      serviceConnectionDataWrapper.binderForBindService);
   },
   0);
 return true;
}
origin: org.robolectric/framework

@Implementation
public boolean bindService(final Intent intent, final ServiceConnection serviceConnection, int i) {
 boundServiceConnections.add(serviceConnection);
 unboundServiceConnections.remove(serviceConnection);
 if (unbindableActions.contains(intent.getAction())) {
  return false;
 }
 startedServices.add(new Intent.FilterComparison(intent));
 shadowOf(Looper.getMainLooper()).post(new Runnable() {
  @Override
  public void run() {
   final ServiceConnectionDataWrapper serviceConnectionDataWrapper;
   final Intent.FilterComparison filterComparison = new Intent.FilterComparison(intent);
   if (serviceConnectionDataForIntent.containsKey(filterComparison)) {
    serviceConnectionDataWrapper = serviceConnectionDataForIntent.get(filterComparison);
   } else {
    serviceConnectionDataWrapper = defaultServiceConnectionData;
   }
   serviceConnectionDataForServiceConnection.put(serviceConnection, serviceConnectionDataWrapper);
   serviceConnection.onServiceConnected(serviceConnectionDataWrapper.componentNameForBindService, serviceConnectionDataWrapper.binderForBindService);
  }
 }, 0);
 return true;
}
origin: org.robolectric/shadows-core

@Implementation
public boolean bindService(final Intent intent, final ServiceConnection serviceConnection, int i) {
 boundServiceConnections.add(serviceConnection);
 unboundServiceConnections.remove(serviceConnection);
 if (unbindableActions.contains(intent.getAction())) {
  return false;
 }
 startedServices.add(new Intent.FilterComparison(intent));
 shadowOf(Looper.getMainLooper()).post(new Runnable() {
  @Override
  public void run() {
   final ServiceConnectionDataWrapper serviceConnectionDataWrapper;
   final Intent.FilterComparison filterComparison = new Intent.FilterComparison(intent);
   if (serviceConnectionDataForIntent.containsKey(filterComparison)) {
    serviceConnectionDataWrapper = serviceConnectionDataForIntent.get(filterComparison);
   } else {
    serviceConnectionDataWrapper = defaultServiceConnectionData;
   }
   serviceConnectionDataForServiceConnection.put(serviceConnection, serviceConnectionDataWrapper);
   serviceConnection.onServiceConnected(serviceConnectionDataWrapper.componentNameForBindService, serviceConnectionDataWrapper.binderForBindService);
  }
 }, 0);
 return true;
}
origin: org.robolectric/shadows-core-v23

@Implementation
public boolean bindService(final Intent intent, final ServiceConnection serviceConnection, int i) {
 boundServiceConnections.add(serviceConnection);
 unboundServiceConnections.remove(serviceConnection);
 if (unbindableActions.contains(intent.getAction())) {
  return false;
 }
 startedServices.add(new Intent.FilterComparison(intent));
 shadowOf(Looper.getMainLooper()).post(new Runnable() {
  @Override
  public void run() {
   final ServiceConnectionDataWrapper serviceConnectionDataWrapper;
   final Intent.FilterComparison filterComparison = new Intent.FilterComparison(intent);
   if (serviceConnectionDataForIntent.containsKey(filterComparison)) {
    serviceConnectionDataWrapper = serviceConnectionDataForIntent.get(filterComparison);
   } else {
    serviceConnectionDataWrapper = defaultServiceConnectionData;
   }
   serviceConnectionDataForServiceConnection.put(serviceConnection, serviceConnectionDataWrapper);
   serviceConnection.onServiceConnected(serviceConnectionDataWrapper.componentNameForBindService, serviceConnectionDataWrapper.binderForBindService);
  }
 }, 0);
 return true;
}
origin: org.robolectric/framework

/**
 * Returns the most recent {@code Intent} started by {@link #startService(android.content.Intent)} without
 * consuming it.
 *
 * @return the most recently started {@code Intent}
 */
@Override
public Intent peekNextStartedService() {
 if (startedServices.isEmpty()) {
  return null;
 } else {
  return startedServices.get(0).getIntent();
 }
}
origin: org.robolectric/framework

 @Override
 public void run() {
  final ServiceConnectionDataWrapper serviceConnectionDataWrapper;
  final Intent.FilterComparison filterComparison = new Intent.FilterComparison(intent);
  if (serviceConnectionDataForIntent.containsKey(filterComparison)) {
   serviceConnectionDataWrapper = serviceConnectionDataForIntent.get(filterComparison);
  } else {
   serviceConnectionDataWrapper = defaultServiceConnectionData;
  }
  serviceConnectionDataForServiceConnection.put(serviceConnection, serviceConnectionDataWrapper);
  serviceConnection.onServiceConnected(serviceConnectionDataWrapper.componentNameForBindService, serviceConnectionDataWrapper.binderForBindService);
 }
}, 0);
origin: org.robolectric/framework

public void setComponentNameAndServiceForBindServiceForIntent(Intent intent, ComponentName name, IBinder service) {
 serviceConnectionDataForIntent.put(new Intent.FilterComparison(intent),
   new ServiceConnectionDataWrapper(name, service));
}
origin: org.robolectric/shadows-framework

boolean stopService(Intent name) {
 stoppedServices.add(new Intent.FilterComparison(name));
 return startedServices.contains(new Intent.FilterComparison(name));
}
origin: org.robolectric/shadows-core

/**
 * Returns the most recent {@code Intent} started by {@link #startService(android.content.Intent)} without
 * consuming it.
 *
 * @return the most recently started {@code Intent}
 */
@Override
public Intent peekNextStartedService() {
 if (startedServices.isEmpty()) {
  return null;
 } else {
  return startedServices.get(0).getIntent();
 }
}
origin: org.robolectric/shadows-core-v23

/**
 * Returns the most recent {@code Intent} started by {@link #startService(android.content.Intent)} without
 * consuming it.
 *
 * @return the most recently started {@code Intent}
 */
@Override
public Intent peekNextStartedService() {
 if (startedServices.isEmpty()) {
  return null;
 } else {
  return startedServices.get(0).getIntent();
 }
}
origin: org.robolectric/shadows-framework

/**
 * Returns the most recent {@code Intent} started by {@link #startService(android.content.Intent)}
 * without consuming it.
 *
 * @return the most recently started {@code Intent}
 */
Intent peekNextStartedService() {
 if (startedServices.isEmpty()) {
  return null;
 } else {
  return startedServices.get(0).getIntent();
 }
}
origin: org.robolectric/shadows-core-v23

 @Override
 public void run() {
  final ServiceConnectionDataWrapper serviceConnectionDataWrapper;
  final Intent.FilterComparison filterComparison = new Intent.FilterComparison(intent);
  if (serviceConnectionDataForIntent.containsKey(filterComparison)) {
   serviceConnectionDataWrapper = serviceConnectionDataForIntent.get(filterComparison);
  } else {
   serviceConnectionDataWrapper = defaultServiceConnectionData;
  }
  serviceConnectionDataForServiceConnection.put(serviceConnection, serviceConnectionDataWrapper);
  serviceConnection.onServiceConnected(serviceConnectionDataWrapper.componentNameForBindService, serviceConnectionDataWrapper.binderForBindService);
 }
}, 0);
origin: org.robolectric/shadows-core-v23

/**
 * Consumes the most recent {@code Intent} started by {@link #startService(android.content.Intent)} and returns it.
 *
 * @return the most recently started {@code Intent}
 */
@Override
public Intent getNextStartedService() {
 if (startedServices.isEmpty()) {
  return null;
 } else {
  return startedServices.remove(0).getIntent();
 }
}
origin: org.robolectric/shadows-core

public void setComponentNameAndServiceForBindServiceForIntent(Intent intent, ComponentName name, IBinder service) {
 serviceConnectionDataForIntent.put(new Intent.FilterComparison(intent),
   new ServiceConnectionDataWrapper(name, service));
}
origin: org.robolectric/framework

/**
 * Consumes the most recent {@code Intent} started by {@link #startService(android.content.Intent)} and returns it.
 *
 * @return the most recently started {@code Intent}
 */
@Override
public Intent getNextStartedService() {
 if (startedServices.isEmpty()) {
  return null;
 } else {
  return startedServices.remove(0).getIntent();
 }
}
origin: org.robolectric/shadows-framework

/**
 * Consumes the most recent {@code Intent} started by {@link
 * #startService(android.content.Intent)} and returns it.
 *
 * @return the most recently started {@code Intent}
 */
Intent getNextStartedService() {
 if (startedServices.isEmpty()) {
  return null;
 } else {
  return startedServices.remove(0).getIntent();
 }
}
origin: org.robolectric/shadows-core

 @Override
 public void run() {
  final ServiceConnectionDataWrapper serviceConnectionDataWrapper;
  final Intent.FilterComparison filterComparison = new Intent.FilterComparison(intent);
  if (serviceConnectionDataForIntent.containsKey(filterComparison)) {
   serviceConnectionDataWrapper = serviceConnectionDataForIntent.get(filterComparison);
  } else {
   serviceConnectionDataWrapper = defaultServiceConnectionData;
  }
  serviceConnectionDataForServiceConnection.put(serviceConnection, serviceConnectionDataWrapper);
  serviceConnection.onServiceConnected(serviceConnectionDataWrapper.componentNameForBindService, serviceConnectionDataWrapper.binderForBindService);
 }
}, 0);
origin: org.robolectric/shadows-core

/**
 * Consumes the most recent {@code Intent} started by {@link #startService(android.content.Intent)} and returns it.
 *
 * @return the most recently started {@code Intent}
 */
@Override
public Intent getNextStartedService() {
 if (startedServices.isEmpty()) {
  return null;
 } else {
  return startedServices.remove(0).getIntent();
 }
}
android.contentIntent$FilterComparison

Most used methods

  • <init>
  • getIntent

Popular in Java

  • Running tasks concurrently on multiple threads
  • onCreateOptionsMenu (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • notifyDataSetChanged (ArrayAdapter)
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Permission (java.security)
    Legacy security code; do not use.
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Runner (org.openjdk.jmh.runner)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now