update_system_wallpaper_cropper.py 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. if len(sys.argv) != 2:
  47. print "Usage: python update_sytem_wallpaper_cropper.py <framework_dir>"
  48. exit()
  49. framework_dir = sys.argv[1] + "/packages/WallpaperCropper"
  50. for file_path in files.split():
  51. file_path = src_dir + file_path
  52. dir = os.path.dirname(file_path)
  53. dir = dir.replace("launcher3", "wallpapercropper")
  54. dir = dir.replace(src_dir, "src/")
  55. cmd = 'cp %s %s/%s' % (file_path, framework_dir, dir)
  56. print cmd
  57. os.system(cmd)