Android Open Source - android-autostarts Intent Filter Info






From Project

Back to project page android-autostarts.

License

The source code is released under:

GNU General Public License

If you think the Android project android-autostarts listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.elsdoerfer.android.autostarts.db;
/*  w ww  . jav  a  2s  .  co  m*/
import android.os.Parcel;
import android.os.Parcelable;

/**
 * A single intent filter applied to a Component. The Android
 * PackageManager API does not expose this info, which is why
 * there is no corresponding class in the android.content.pm namespace.
 *
 * Effectively, this represents a single "event" that we show to the
 * user in the GUI, and which we allow him to enable/disable. However,
 * because a single component can use multiple filters, the user will
 * usually be unaware that what really happens is that the filter's
 * *component* will be disabled.
 *
 * That means a single user action may in fact disable multiple
 * "events". By modeling our classes to appropriately reflect this
 * architecture and actually storing the current "enabled state" in
 * the Component class, handling multi-intent components correctly
 * is almost automatic.
 */
public class IntentFilterInfo implements Parcelable {
  public ComponentInfo componentInfo;
  public String action;
  public int priority;

  public IntentFilterInfo(ComponentInfo componentInfo, String action,
      int priority) {
    this.componentInfo = componentInfo;
    this.action = action;
    this.priority = priority;
  }

  @Override
    public int hashCode() {
    return this.componentInfo.hashCode() ^ this.action.hashCode();
  }

  @Override
  public int describeContents() {
    return 0;
  }

  @Override
  public void writeToParcel(Parcel dest, int flags) {
    this.componentInfo.writeToParcel(dest, flags);
    dest.writeString(action);
    dest.writeInt(priority);
  }

  public static final Parcelable.Creator<IntentFilterInfo> CREATOR
  = new Parcelable.Creator<IntentFilterInfo>()
  {
    public IntentFilterInfo createFromParcel(Parcel in) {
      return new IntentFilterInfo(in);
    }

    public IntentFilterInfo[] newArray(int size) {
      return new IntentFilterInfo[size];
    }
  };

  private IntentFilterInfo(Parcel in) {
    ComponentInfo.CREATOR.createFromParcel(in);
    action = in.readString();
    priority = in.readInt();
  }
}




Java Source Code List

com.elsdoerfer.android.autostarts.Actions.java
com.elsdoerfer.android.autostarts.DatabaseHelper.java
com.elsdoerfer.android.autostarts.EventDetailsFragment.java
com.elsdoerfer.android.autostarts.HelpActivity.java
com.elsdoerfer.android.autostarts.ListActivity.java
com.elsdoerfer.android.autostarts.LoadTask.java
com.elsdoerfer.android.autostarts.MyExpandableListAdapter.java
com.elsdoerfer.android.autostarts.ReceiverReader.java
com.elsdoerfer.android.autostarts.ToggleService.java
com.elsdoerfer.android.autostarts.ToggleTool.java
com.elsdoerfer.android.autostarts.Utils.java
com.elsdoerfer.android.autostarts.compat.FixedExpandableListView.java
com.elsdoerfer.android.autostarts.db.ComponentInfo.java
com.elsdoerfer.android.autostarts.db.IntentFilterInfo.java
com.elsdoerfer.android.autostarts.db.PackageInfo.java
com.stericson.RootTools.Constants.java
com.stericson.RootTools.RootTools.java
com.stericson.RootTools.containers.Mount.java
com.stericson.RootTools.containers.Permissions.java
com.stericson.RootTools.containers.RootClass.java
com.stericson.RootTools.containers.Symlink.java
com.stericson.RootTools.exceptions.RootDeniedException.java
com.stericson.RootTools.execution.CommandCapture.java
com.stericson.RootTools.execution.Command.java
com.stericson.RootTools.execution.JavaCommandCapture.java
com.stericson.RootTools.execution.Shell.java
com.stericson.RootTools.internal.Installer.java
com.stericson.RootTools.internal.InternalVariables.java
com.stericson.RootTools.internal.Remounter.java
com.stericson.RootTools.internal.RootToolsInternalMethods.java
com.stericson.RootTools.internal.Runner.java
src.com.elsdoerfer.android.autostarts.opt.MarketUtils.java
src.com.elsdoerfer.android.autostarts.opt.MarketUtils.java
src.com.elsdoerfer.android.autostarts.opt.RootFeatures.java
src.com.elsdoerfer.android.autostarts.opt.RootFeatures.java