OSDN Git Service

Replaced Deprecated GestureDetector API Call
authorChristian Mehlmauer <FireFart@gmail.com>
Tue, 25 May 2010 16:34:41 +0000 (18:34 +0200)
committerChristian Mehlmauer <FireFart@gmail.com>
Tue, 25 May 2010 18:17:51 +0000 (20:17 +0200)
Change-Id: I36429680b555f834e74ec86c6aa17b696d17d2b6

apps/Term/src/com/android/term/Term.java

index 6041baf..b93ac33 100644 (file)
@@ -2626,7 +2626,7 @@ class EmulatorView extends View implements GestureDetector.OnGestureListener {
 
     public EmulatorView(Context context) {
         super(context);
-        commonConstructor();
+        commonConstructor(context);
     }
 
     public void register(TermKeyListener listener) {
@@ -2796,17 +2796,17 @@ class EmulatorView extends View implements GestureDetector.OnGestureListener {
                 context.obtainStyledAttributes(android.R.styleable.View);
         initializeScrollbars(a);
         a.recycle();
-        commonConstructor();
+        commonConstructor(context);
     }
 
-    private void commonConstructor() {
+    private void commonConstructor(Context context) {
         mTextRenderer = null;
         mCursorPaint = new Paint();
         mCursorPaint.setARGB(255,128,128,128);
         mBackgroundPaint = new Paint();
         mTopRow = 0;
         mLeftColumn = 0;
-        mGestureDetector = new GestureDetector(this);
+        mGestureDetector = new GestureDetector(context, this, null);
         mGestureDetector.setIsLongpressEnabled(false);
         setVerticalScrollBarEnabled(true);
     }