Code example for Map

Methods: get, remove

0
        String localPath = file.getStoragePath();
        if (localPath == null || localPath.length() <= 0) {
            localPath = FileStorageUtils.getDefaultSavePathFor(account.name, file);
        } 
         
        OwnCloudFileObserver observer = mObserversMap.get(localPath);
        if (observer != null) {
            observer.stopWatching();
            mObserversMap.remove(observer);
            Log_OC.d(TAG, "Stopped watching " + localPath);
        } 
         
    } 
 
 
    /** 
     *  Private receiver listening to events broadcast by the FileDownloader service. 
     *  
     *  Starts and stops the observance on registered files when they are being download, 
     *  in order to avoid to start unnecessary synchronizations.  
     */