Code example for Instrumentation

Methods: removeMonitor

0
	public void finalize() throws Throwable { 
		activitySyncTimer.cancel();
		try { 
			// Remove the monitor added during startup 
			if (activityMonitor != null) {
				inst.removeMonitor(activityMonitor);
				activityMonitor = null;
			} 
		} catch (Exception ignored) {}
		super.finalize(); 
	} 
 
	/** 
	 * All activites that have been opened are finished. 
	 */ 
 
	public void finishOpenedActivities(){ 
		// Stops the activityStack listener 
		activitySyncTimer.cancel();
		ArrayList<Activity> activitiesOpened = getAllOpenedActivities();
		// Finish all opened activities