public BrightnessTile(Context context, final QuickSettingsController qsc) {
    super(context, qsc);

    mOnClick =
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            qsc.mBar.collapseAllPanels(true);
            Intent intent = new Intent(Intent.ACTION_SHOW_BRIGHTNESS_DIALOG);
            mContext.sendBroadcast(intent);
          }
        };
    mOnLongClick =
        new View.OnLongClickListener() {
          @Override
          public boolean onLongClick(View v) {
            startSettingsActivity(Settings.ACTION_DISPLAY_SETTINGS);
            return true;
          }
        };

    qsc.registerObservedContent(Settings.System.getUriFor(Settings.System.SCREEN_BRIGHTNESS), this);
    qsc.registerObservedContent(
        Settings.System.getUriFor(Settings.System.SCREEN_BRIGHTNESS_MODE), this);
  }
  public NetworkAdbTile(Context context, QuickSettingsController qsc) {
    super(context, qsc);

    mOnClick =
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            Settings.Secure.putIntForUser(
                mContext.getContentResolver(),
                Settings.Secure.ADB_PORT,
                isEnabled() ? -1 : 5555,
                UserHandle.USER_CURRENT);
          }
        };
    mOnLongClick =
        new View.OnLongClickListener() {
          @Override
          public boolean onLongClick(View v) {
            startSettingsActivity(Settings.ACTION_APPLICATION_DEVELOPMENT_SETTINGS);
            return true;
          }
        };

    qsc.registerObservedContent(Settings.Secure.getUriFor(Settings.Secure.ADB_PORT), this);
    updateResources();
  }
  public QuietHoursTile(Context context, QuickSettingsController qsc) {
    super(context, qsc);

    mOnClick =
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            Settings.System.putIntForUser(
                mContext.getContentResolver(),
                Settings.System.QUIET_HOURS_ENABLED,
                mEnabled ? 0 : 1,
                UserHandle.USER_CURRENT);
            autoSmsIntentBroadcast(mContext);
          }
        };
    mOnLongClick =
        new View.OnLongClickListener() {
          @Override
          public boolean onLongClick(View v) {
            Intent intent = new Intent(Intent.ACTION_MAIN);
            intent.setClassName(
                "com.android.settings", "com.android.settings.Settings$QuietHoursSettingsActivity");
            startSettingsActivity(intent);
            return true;
          }
        };
    qsc.registerObservedContent(
        Settings.System.getUriFor(Settings.System.QUIET_HOURS_ENABLED), this);
  }
  public BugReportTile(Context context, QuickSettingsController qsc, Handler handler) {
    super(context, qsc);

    mHandler = handler;

    mOnClick =
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            mQsc.mBar.collapseAllPanels(true);
            showBugreportDialog();
          }
        };
    qsc.registerObservedContent(
        Settings.Global.getUriFor(Settings.Global.BUGREPORT_IN_POWER_MENU), this);
  }