blob: 2ff61a4e5ead069725d5321a5cc8cf9118c5d01f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
package org.codeaurora.gallery3d.video;
import android.content.Context;
import com.android.gallery3d.app.MovieActivity;
import com.android.gallery3d.R;
import org.codeaurora.gallery3d.ext.ActivityHookerGroup;
import org.codeaurora.gallery3d.ext.IActivityHooker;
import java.util.ArrayList;
import java.util.List;
public class ExtensionHelper {
public static IActivityHooker getHooker(final Context context) {
final ActivityHookerGroup group = new ActivityHookerGroup();
boolean loop = context.getResources().getBoolean(R.bool.loop);
boolean stereo = context.getResources().getBoolean(R.bool.stereo);
boolean streaming = context.getResources().getBoolean(R.bool.streaming);
boolean playlist = context.getResources().getBoolean(R.bool.playlist);
if (loop == true) {
group.addHooker(new LoopVideoHooker()); // add it for common feature.
}
if (stereo == true) {
group.addHooker(new StereoAudioHooker()); // add it for common feature.
}
if (streaming == true) {
group.addHooker(new StreamingHooker());
group.addHooker(new BookmarkHooker());
}
if (playlist == true) {
group.addHooker(new MovieListHooker()); // add it for common feature.
group.addHooker(new StepOptionSettingsHooker());
}
return group;
}
}
|