summaryrefslogtreecommitdiff
path: root/src/us/minak/SettingsUtil.java
blob: c3c0603a923041e944b4a4935b2caaf682112222 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package us.minak;

import android.content.ContextWrapper;
import android.gesture.GestureLibrary;
import android.gesture.GestureLibraries;
import java.io.File;

public class SettingsUtil {
	private static File            sGestureFile = null;
	private static GestureLibrary  sGestureLibrary = null;

	public static File           getGestureFile(ContextWrapper context) {
		if (sGestureFile == null)
			sGestureFile = new File(context.getExternalFilesDir(null), "gestures.ttf");
		return sGestureFile;
	}
	public static GestureLibrary getGestureLibrary(ContextWrapper context) {
		if (sGestureLibrary == null)
			sGestureLibrary = GestureLibraries.fromFile(getGestureFile(context));
		return sGestureLibrary;
	}
}