<commit_before>package com.artifex.mupdfdemo;

import java.util.LinkedList;
import java.util.NoSuchElementException;

import android.app.Activity;
import android.app.ActivityManager;
import android.app.AlertDialog;
import android.content.DialogInterface;

import android.content.Context;
import android.graphics.Point;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
import android.view.View;
import android.widget.Adapter;
import android.widget.AdapterView;
import android.widget.Scroller;

public class ReaderView
		extends AdapterView<Adapter>
		implements GestureDetector.OnGestureListener, ScaleGestureDetector.OnScaleGestureListener, Runnable {
	private static final int MOVING_DIAGONALLY = 0;
	private static final int MOVING_LEFT       = 1;
	private static final int MOVING_RIGHT      = 2;
	private static final int MOVING_UP         = 3;
	private static final int MOVING_DOWN       = 4;

	private static final int FLING_MARGIN      = 100;
	private static final int GAP               = 20;

	private static final float MIN_SCALE        = 1.0f;
	private static final float MAX_SCALE        = 5.0f;
	private static final float REFLOW_SCALE_FACTOR = 0.5f;

	private static final boolean HORIZONTAL_SCROLLING = true;

	private Adapter           mAdapter;
	private int               mCurrent;    // Adapter's index for the current view
	private boolean           mResetLayout;
	private final SparseArray<View>
				  mChildViews = new SparseArray<View>(3);
					       // Shadows the children of the adapter view
					       // but with more sensible indexing
	private final LinkedList<View>
				  mViewCache = new LinkedList<View>();
	private boolean           mUserInteracting;  // Whether the user is interacting
	private boolean           mScaling;    // Whether the user is currently pinch zooming
	private float             mScale     = 1.0f;
	private int               mXScroll;    // Scroll amounts recorded from events.
	private int               mYScroll;    // and then accounted for in onLayout
	private boolean           mReflow = false;
	private boolean           mReflowChanged = false;
	private final GestureDetector
				  mGestureDetector;<commit_msg>Android: Bug 697054: Increase zoom limit<commit_after>package com.artifex.mupdfdemo;

import java.util.LinkedList;
import java.util.NoSuchElementException;

import android.app.Activity;
import android.app.ActivityManager;
import android.app.AlertDialog;
import android.content.DialogInterface;

import android.content.Context;
import android.graphics.Point;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.ScaleGestureDetector;
import android.view.View;
import android.widget.Adapter;
import android.widget.AdapterView;
import android.widget.Scroller;

public class ReaderView
		extends AdapterView<Adapter>
		implements GestureDetector.OnGestureListener, ScaleGestureDetector.OnScaleGestureListener, Runnable {
	private static final int MOVING_DIAGONALLY = 0;
	private static final int MOVING_LEFT       = 1;
	private static final int MOVING_RIGHT      = 2;
	private static final int MOVING_UP         = 3;
	private static final int MOVING_DOWN       = 4;

	private static final int FLING_MARGIN      = 100;
	private static final int GAP               = 20;

	private static final float MIN_SCALE        = 1.0f;
	private static final float MAX_SCALE        = 64.0f;
	private static final float REFLOW_SCALE_FACTOR = 0.5f;

	private static final boolean HORIZONTAL_SCROLLING = true;

	private Adapter           mAdapter;
	private int               mCurrent;    // Adapter's index for the current view
	private boolean           mResetLayout;
	private final SparseArray<View>
				  mChildViews = new SparseArray<View>(3);
					       // Shadows the children of the adapter view
					       // but with more sensible indexing
	private final LinkedList<View>
				  mViewCache = new LinkedList<View>();
	private boolean           mUserInteracting;  // Whether the user is interacting
	private boolean           mScaling;    // Whether the user is currently pinch zooming
	private float             mScale     = 1.0f;
	private int               mXScroll;    // Scroll amounts recorded from events.
	private int               mYScroll;    // and then accounted for in onLayout
	private boolean           mReflow = false;
	private boolean           mReflowChanged = false;
	private final GestureDetector
				  mGestureDetector;
{'fraction_non_alphanumeric': 0.05970149253731343, 'fraction_numerical': 0.009594882729211088, 'mean_word_length': 3.2261261261261263, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1088094', 'n_tokens_mistral': 1408, 'n_tokens_neox': 1278, 'n_words': 410}