Home | History | Annotate | Download | only in session

Lines Matching defs:Placeholder

46     public static class Placeholder {
51 Placeholder(String title, Uri uri, long timestamp) {
63 * Adds an empty placeholder.
66 * @param size the size of the placeholder in pixels.
67 * @param timestamp the timestamp of the placeholder (used for ordering
69 * @return A session instance representing the new placeholder.
71 public Placeholder insertEmptyPlaceholder(String title, Size size, long timestamp) {
73 return new Placeholder(title, uri, timestamp);
77 * Inserts a new placeholder into the filmstrip.
80 * @param placeholder the initial thumbnail to show for this placeholder
81 * @param timestamp the timestamp of the placeholder (used for ordering
83 * @return A session instance representing the new placeholder.
85 public Placeholder insertPlaceholder(String title, Bitmap placeholder, long timestamp) {
86 if (title == null || placeholder == null) {
90 if (placeholder.getWidth() <= 0 || placeholder.getHeight() <= 0) {
94 Uri uri = Storage.addPlaceholder(placeholder);
98 return new Placeholder(title, uri, timestamp);
101 public Placeholder insertPlaceholder(String title, byte[] placeholder, long timestamp) {
102 if (title == null || placeholder == null) {
107 Bitmap bitmap = BitmapFactory.decodeByteArray(placeholder, 0, placeholder.length, options);
112 * Converts an existing item into a placeholder for re-processing.
118 public Placeholder convertToPlaceholder(Uri uri) {
123 * This converts the placeholder in to a real media item
125 * @param placeholder the session that is being finished.
135 public Uri finishPlaceholder(Placeholder placeholder, Location location, int orientation,
137 Uri resultUri = Storage.updateImage(placeholder.outputUri, mContext.getContentResolver(),
138 placeholder.outputTitle, placeholder.time, location, orientation, exif, jpeg, width,
145 * This changes the temporary placeholder jpeg without writing it to the media store
148 * @param placeholder the placeholder bitmap
150 public void replacePlaceholder(Placeholder session, Bitmap placeholder) {
151 Storage.replacePlaceholder(session.outputUri, placeholder);
156 * Retrieve the placeholder for a given session.
158 * @param placeholder the session for which to retrieve bitmap placeholder
160 public Optional<Bitmap> getPlaceholder(Placeholder placeholder) {
161 return Storage.getPlaceholderForSession(placeholder.outputUri);
166 * Remove the placeholder for a given session.
168 * @param placeholder the session for which to remove the bitmap placeholder.
170 public void removePlaceholder(Placeholder placeholder) {
171 Storage.removePlaceholder(placeholder.outputUri);
180 private Placeholder createSessionFromUri(Uri uri) {
203 return new Placeholder(name, uri, date);