示例#1
0
 @Override
 public void onPause() {
   super.onPause();
   if (mForm != null) {
     // Display nothing, so widget stops listening; else it will leak
     imageWidget().displayPhoto(getRBuddyActivity().photoStore(), 0, null);
   }
   getRBuddyActivity().receiptFile().flush();
   getRBuddyActivity().removeListener(this);
 }
示例#2
0
  @Override
  public void onResume() {
    super.onResume();

    getRBuddyActivity().addListener(this);
    setReceipt(getRBuddyActivity().getActiveReceipt());

    // If no photo is defined for this receipt, act as if he has pressed
    // the camera button
    if (mReceipt != null && mReceipt.getPhotoId() == null) {
      startImageCaptureIntent();
    }
  }