Home | History | Annotate | Download | only in Launcher3
      1 # This script is used to push the most up-to-date files from
      2 # Launcher into frameworks' version of the WallpaperCropActivity
      3 # (and supporting files)
      4 # The framework versions have some small modifications that are
      5 # necessary so do this with care
      6 import os
      7 import sys
      8 src_dir = "WallpaperPicker/src/"
      9 files = """
     10 src/android/util/Pools.java
     11 com/android/gallery3d/util/IntArray.java
     12 com/android/gallery3d/common/Utils.java
     13 com/android/gallery3d/exif/ByteBufferInputStream.java
     14 com/android/gallery3d/exif/CountedDataInputStream.java
     15 com/android/gallery3d/exif/ExifData.java
     16 com/android/gallery3d/exif/ExifInterface.java
     17 com/android/gallery3d/exif/ExifInvalidFormatException.java
     18 com/android/gallery3d/exif/ExifModifier.java
     19 com/android/gallery3d/exif/ExifOutputStream.java
     20 com/android/gallery3d/exif/ExifParser.java
     21 com/android/gallery3d/exif/ExifReader.java
     22 com/android/gallery3d/exif/ExifTag.java
     23 com/android/gallery3d/exif/IfdData.java
     24 com/android/gallery3d/exif/IfdId.java
     25 com/android/gallery3d/exif/JpegHeader.java
     26 com/android/gallery3d/exif/OrderedDataOutputStream.java
     27 com/android/gallery3d/exif/Rational.java
     28 com/android/gallery3d/glrenderer/BasicTexture.java
     29 com/android/gallery3d/glrenderer/BitmapTexture.java
     30 com/android/gallery3d/glrenderer/GLCanvas.java
     31 com/android/gallery3d/glrenderer/GLES20Canvas.java
     32 com/android/gallery3d/glrenderer/GLES20IdImpl.java
     33 com/android/gallery3d/glrenderer/GLId.java
     34 com/android/gallery3d/glrenderer/GLPaint.java
     35 com/android/gallery3d/glrenderer/RawTexture.java
     36 com/android/gallery3d/glrenderer/Texture.java
     37 com/android/gallery3d/glrenderer/UploadedTexture.java
     38 com/android/photos/BitmapRegionTileSource.java
     39 com/android/photos/views/BlockingGLTextureView.java
     40 com/android/photos/views/TiledImageRenderer.java
     41 com/android/photos/views/TiledImageView.java
     42 com/android/gallery3d/common/BitmapUtils.java
     43 com/android/launcher3/CropView.java
     44 com/android/launcher3/WallpaperCropActivity.java
     45 """
     46 
     47 if len(sys.argv) != 2:
     48     print "Usage: python update_sytem_wallpaper_cropper.py <framework_dir>"
     49     exit()
     50 framework_dir = sys.argv[1] + "/packages/WallpaperCropper"
     51 for file_path in files.split():
     52     file_path = src_dir + file_path
     53     dir = os.path.dirname(file_path)
     54     dir = dir.replace("launcher3", "wallpapercropper")
     55     dir = dir.replace(src_dir, "src/")
     56     cmd = 'cp %s %s/%s' % (file_path, framework_dir, dir)
     57     print cmd
     58     os.system(cmd)
     59