Call in {@link FragmentActivity#onStart()} to properly add the {@link ProgressChangeListener}
for the camera and prevent any leaks or further updates.
350437
@OnLifecycleEvent(Lifecycle.Event.ON_START)
  public void onStart() {
    if (navigation != null) {
      navigation.addProgressChangeListener(progressChangeListener);
    }
  }
162912
@SuppressWarnings({"WeakerAccess", "unused"}) // For library users
    public void enableProgressBar() {
        showProgressBar = true;

        if (searchBoxViewModel != null) {
            progressController = new SearchProgressController(new SearchProgressController.ProgressListener() {
                @Override
                public void onStart() {
                    updateProgressBar(searchBoxViewModel, true);
                }

                @Override
                public void onStop() {
                    updateProgressBar(searchBoxViewModel, false);
                }
            }, progressBarDelay);
        }
    }
627081
private OnSeekBarChangeListener createSeekBarListener() {
        return new OnSeekBarChangeListener() {

            @Override
            public void onProgressChanged(final SeekBar seekBar, final int progress,
                                          final boolean fromUser) {
                adaptElevation(progress, parallelLightCheckBox.isChecked());
            }

            @Override
            public void onStartTrackingTouch(final SeekBar seekBar) {

            }

            @Override
            public void onStopTrackingTouch(final SeekBar seekBar) {

            }

        };
    }
919436
private OnPreferenceChangeListener createThemeChangeListener() {
        return new OnPreferenceChangeListener() {

            @Override
            public boolean onPreferenceChange(final Preference preference, final Object newValue) {
                Intent intent = getActivity().getIntent();
                getActivity().finish();
                startActivity(intent);
                return true;
            }

        };
    }
1263722
@Override
    protected void onStart() {
        super.onStart();
        mApiClient = new GoogleApiClient.Builder(this)
                .addApi(Wearable.API)
                .addConnectionCallbacks(this)
                .addOnConnectionFailedListener(this)
                .build();

        mApiClient.connect();
    }
544689
public void addChangeListener(javax.swing.event.ChangeListener LISTENER) {
        LISTENER_LIST.add(javax.swing.event.ChangeListener.class, LISTENER);
    }
735261
protected void onSelectionChanged(int selStart, int selEnd) {
        if(mInputView == null)
            return;

        if(mInputView instanceof InternalEditText)
            ((InternalEditText)mInputView).superOnSelectionChanged(selStart, selEnd);
        else if(mInputView instanceof InternalAutoCompleteTextView)
            ((InternalAutoCompleteTextView)mInputView).superOnSelectionChanged(selStart, selEnd);
        else
            ((InternalMultiAutoCompleteTextView)mInputView).superOnSelectionChanged(selStart, selEnd);

        if(mOnSelectionChangedListener != null)
            mOnSelectionChangedListener.onSelectionChanged(this, selStart, selEnd);
    }
818837
public synchronized void startPreview() {
    Camera theCamera = camera;
    if (theCamera != null && !previewing) {
      theCamera.startPreview();
      previewing = true;
      autoFocusManager = new AutoFocusManager(camera);
    }
  }
1228981
def init_widget(self):
        
        super(AndroidProgressBar, self).init_widget()
        d = self.declaration
        self.set_indeterminate(self.indeterminate)

        if not self.indeterminate:
            if d.max:
                self.set_max(d.max)
            if d.min:
                self.set_min(d.min)

            self.set_progress(d.progress)

            if d.secondary_progress:
                self.set_secondary_progress(d.secondary_progress)
578284
@NonNull
    private View.OnFocusChangeListener createFocusChangeListener() {
        return new View.OnFocusChangeListener() {

            @Override
            public void onFocusChange(final View v, final boolean hasFocus) {
                if (!hasFocus && validateOnFocusLost) {
                    validate();
                }
            }

        };
    }
732492
@Deprecated
    private void onStepProgress(Object source)
    {
        onStartStepProgress(null, source);

        // if there is only one step close it and move to the next one
        if (this.currentStep.getParent().getChildren().size() == 1) {
            this.currentStep = this.currentStep.getParent().nextStep(null, source);
        }
    }
522833
protected void showProgressIndicator() {
        removeView(progressIndicator);

        progressIndicator.setAlpha(0);
        addView(progressIndicator);
        progressIndicator.animate().alpha(1).setDuration(500).start();
    }
704173
private void startNewTransition() {
        if (!hasBounds()) {
            return; // Can't start transition if the drawable has no bounds.
        }
        mCurrentTrans = mTransGen.generateNextTransition(mDrawableRect, mViewportRect);
        mElapsedTime = 0;
        mLastFrameTime = System.currentTimeMillis();
        fireTransitionStart(mCurrentTrans);
    }
589131
protected void updateProgressBar(CmsUploadProgessInfo info) {

        switch (info.getState()) {
            case notStarted:
                break;
            case running:
                m_progressInfo.setProgress(info);
                stopLoadingAnimation();
                break;
            case finished:
                m_progressInfo.finish();
                m_mainPanel.displayDialogInfo(Messages.get().key(Messages.GUI_UPLOAD_INFO_FINISHING_0), false);
                startLoadingAnimation(Messages.get().key(Messages.GUI_UPLOAD_INFO_CREATING_RESOURCES_0), 1500);
                break;
            default:
                break;
        }
    }
705416
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);

        ImageGalleryActivity.setImageThumbnailLoader(this);
        ImageGalleryFragment.setImageThumbnailLoader(this);
        FullScreenImageGalleryActivity.setFullScreenImageLoader(this);

        // optionally set background color using Palette for full screen images
        paletteColorType = PaletteColorType.VIBRANT;
    }
757646
protected boolean changeCameraConfiguration() {
		Log.i(TAG,"CameraCaptureSession.changeCameraConfiguration()");
		if (Looper.getMainLooper().getThread() != Thread.currentThread()) {
			throw new RuntimeException("Not on main looper! Modify code to remove assumptions");
		}
		if (null == open.mCameraDevice || null == open.mCameraSize) {
			Log.i(TAG,"  aborting changeCameraConfiguration. Camera not open yet.");
			return false;
		}

		try {
			open.mLock.lock();
			// configuration change still in progress
			if( null == mPreviewSession ) {
				Log.i(TAG," Abort camera configuration change. Not ready yet");
				return false;
			}
			createCaptureSession();
		} catch (CameraAccessException e) {
			e.printStackTrace();
		} finally {
			open.mLock.unlock();
		}
		return true;
	}
319111
@Override
    public void onStartup(Set<Class<?>> arg0, ServletContext servletContext) throws ServletException {
        FilterRegistration.Dynamic dynamic =
                        servletContext.addFilter("com.ibm.ws.security.jaspi.servlet.filter", JaspiServletFilter.class);
        dynamic.addMappingForUrlPatterns(EnumSet.allOf(DispatcherType.class), false, "/*");
        dynamic.setAsyncSupported(true);
    }