Code example for FileObserver

Methods: stopWatching

0
    } 
     
    @Override 
    protected void finalize() throws Throwable { 
        super.finalize(); 
        mWallpaperObserver.stopWatching();
    } 
     
    public void clearWallpaper() { 
        File f = WALLPAPER_FILE;
        if (f.exists()) {
            f.delete();
        } 
    } 
 
    public void setDimensionHints(int width, int height) throws RemoteException {
        checkPermission(android.Manifest.permission.SET_WALLPAPER_HINTS);
 
        if (width <= 0 || height <= 0) {
            throw new IllegalArgumentException("width and height must be > 0");