mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 850487 - More code cleanup (@Overrides and unused imports). r=kats
--HG-- extra : rebase_source : 376574e0c41b91c16a6be335584a4a61768bb4a9
This commit is contained in:
parent
e2d1b481a4
commit
2d98f0cf71
@ -9,7 +9,6 @@ import org.mozilla.gecko.db.BrowserContract;
|
||||
import org.mozilla.gecko.db.BrowserContract.Thumbnails;
|
||||
import org.mozilla.gecko.db.BrowserDB;
|
||||
import org.mozilla.gecko.db.BrowserDB.URLColumns;
|
||||
import org.mozilla.gecko.db.BrowserDB.PinnedSite;
|
||||
import org.mozilla.gecko.db.BrowserDB.TopSitesCursorWrapper;
|
||||
import org.mozilla.gecko.sync.setup.SyncAccounts;
|
||||
import org.mozilla.gecko.util.ActivityResultHandler;
|
||||
@ -62,7 +61,6 @@ import java.util.HashMap;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
@ -787,6 +785,7 @@ public class AboutHomeContent extends ScrollView
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColumnWidth() {
|
||||
return getColumnWidth(getWidth());
|
||||
}
|
||||
|
@ -18,7 +18,6 @@ import android.content.Intent;
|
||||
import android.text.SpannableString;
|
||||
import android.text.style.StyleSpan;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
|
@ -10,7 +10,6 @@ import android.view.MenuItem;
|
||||
|
||||
import org.mozilla.gecko.BrowserApp;
|
||||
import org.mozilla.gecko.GeckoAppShell;
|
||||
import org.mozilla.gecko.GeckoEvent;
|
||||
import org.mozilla.gecko.GeckoProfile;
|
||||
import org.mozilla.gecko.R;
|
||||
|
||||
|
@ -53,23 +53,27 @@ public class AwesomeBarTabs extends TabHost
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object instantiateItem(ViewGroup group, int index) {
|
||||
AwesomeBarTab tab = mTabs[index];
|
||||
group.addView(tab.getView());
|
||||
return tab;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroyItem(ViewGroup group, int index, Object obj) {
|
||||
AwesomeBarTab tab = (AwesomeBarTab)obj;
|
||||
group.removeView(tab.getView());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
if (mSearching)
|
||||
return 1;
|
||||
return mTabs.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isViewFromObject(View view, Object object) {
|
||||
return getAwesomeBarTabForView(view) == object;
|
||||
}
|
||||
@ -153,8 +157,11 @@ public class AwesomeBarTabs extends TabHost
|
||||
mViewPager.setAdapter(mPagerAdapter);
|
||||
mViewPager.setCurrentItem(0);
|
||||
mViewPager.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int state) { }
|
||||
@Override
|
||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { }
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
tabWidget.setCurrentTab(position);
|
||||
styleSelectedTab();
|
||||
|
@ -234,6 +234,7 @@ public class BrowserToolbar implements ViewSwitcher.ViewFactory,
|
||||
// accessibility.
|
||||
mTabsCount.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_YES);
|
||||
mTabsCount.setAccessibilityDelegate(new View.AccessibilityDelegate() {
|
||||
@Override
|
||||
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) {}
|
||||
});
|
||||
}
|
||||
@ -527,6 +528,7 @@ public class BrowserToolbar implements ViewSwitcher.ViewFactory,
|
||||
show ? 0 : mLayout.getHeight());
|
||||
if (delay > 0) {
|
||||
mDelayedVisibilityTask = new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
startVisibilityAnimation();
|
||||
mDelayedVisibilityTask = null;
|
||||
|
@ -5,11 +5,8 @@
|
||||
|
||||
package org.mozilla.gecko;
|
||||
|
||||
import org.mozilla.gecko.gfx.LayerView;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
package org.mozilla.gecko;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout.LayoutParams;
|
||||
|
@ -13,12 +13,10 @@ import org.apache.http.HttpEntity;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.entity.BufferedHttpEntity;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.net.http.AndroidHttpClient;
|
||||
import android.os.Handler;
|
||||
import android.support.v4.util.LruCache;
|
||||
|
@ -9,7 +9,6 @@ package org.mozilla.gecko;
|
||||
import android.app.Activity;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
interface GeckoActivityStatus {
|
||||
public boolean isGeckoActivityOpened();
|
||||
|
@ -16,7 +16,6 @@ import org.mozilla.gecko.util.GeckoBackgroundThread;
|
||||
import org.mozilla.gecko.util.GeckoEventListener;
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.ClipData;
|
||||
@ -53,7 +52,6 @@ import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.MessageQueue;
|
||||
import android.os.StatFs;
|
||||
import android.os.SystemClock;
|
||||
import android.os.Vibrator;
|
||||
import android.provider.Settings;
|
||||
|
@ -12,7 +12,6 @@ import android.graphics.drawable.BitmapDrawable;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
|
@ -19,8 +19,6 @@ import android.widget.AdapterView;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.LinearLayout.LayoutParams;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -92,6 +92,7 @@ public class LightweightTheme implements GeckoEventListener {
|
||||
final Bitmap bitmap = BitmapFactory.decodeStream(stream);
|
||||
stream.close();
|
||||
mHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
setLightweightTheme(bitmap);
|
||||
}
|
||||
@ -101,6 +102,7 @@ public class LightweightTheme implements GeckoEventListener {
|
||||
}
|
||||
} else if (event.equals("LightweightTheme:Disable")) {
|
||||
mHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
resetLightweightTheme();
|
||||
}
|
||||
|
@ -11,11 +11,8 @@ import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.SystemClock;
|
||||
import android.util.Log;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import org.mozilla.gecko.GeckoApp;
|
||||
import org.mozilla.gecko.GeckoAppShell;
|
||||
import org.mozilla.gecko.GeckoEvent;
|
||||
import org.mozilla.gecko.GeckoThread;
|
||||
|
@ -10,9 +10,6 @@ import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.AbsListView;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
public class MenuItemDefault extends TextView
|
||||
|
@ -6,22 +6,14 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@;
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.app.ActivityManager.RunningAppProcessInfo;
|
||||
import android.app.NotificationManager;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Process;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.mozilla.gecko.GeckoAppShell;
|
||||
|
||||
public class NotificationHandler extends BroadcastReceiver {
|
||||
private static final String LOGTAG = "GeckoNotificationHandler";
|
||||
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
package org.mozilla.gecko;
|
||||
|
||||
import org.mozilla.gecko.widget.TwoWayView;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
|
@ -7,18 +7,11 @@ package org.mozilla.gecko;
|
||||
|
||||
import org.mozilla.gecko.widget.IconTabWidget;
|
||||
|
||||
import org.mozilla.gecko.widget.TwoWayView;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
|
@ -9,7 +9,6 @@ import org.mozilla.gecko.PropertyAnimator.Property;
|
||||
import org.mozilla.gecko.widget.TwoWayView;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
@ -25,7 +24,6 @@ import android.widget.BaseAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -11,7 +11,6 @@ import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.content.Context;
|
||||
@ -24,20 +23,16 @@ import android.view.animation.AnimationUtils;
|
||||
import android.view.animation.Animation;
|
||||
import android.widget.ImageView;
|
||||
import android.view.Display;
|
||||
import android.graphics.Point;
|
||||
|
||||
import java.net.URL;
|
||||
import java.io.File;
|
||||
|
||||
import org.mozilla.gecko.GeckoApp;
|
||||
import org.mozilla.gecko.GeckoAppShell;
|
||||
import org.mozilla.gecko.GeckoEvent;
|
||||
import org.mozilla.gecko.GeckoThread;
|
||||
import org.mozilla.gecko.WebAppAllocator;
|
||||
import org.mozilla.gecko.Tab;
|
||||
import org.mozilla.gecko.Tabs;
|
||||
import org.mozilla.gecko.R;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class WebApp extends GeckoApp {
|
||||
private static final String LOGTAG = "WebApp";
|
||||
|
@ -16,7 +16,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
@ -35,7 +34,6 @@ import org.mozilla.gecko.db.BrowserContract.SyncColumns;
|
||||
import org.mozilla.gecko.db.BrowserContract.Thumbnails;
|
||||
import org.mozilla.gecko.db.BrowserContract.URLColumns;
|
||||
import org.mozilla.gecko.db.BrowserContract;
|
||||
import org.mozilla.gecko.db.BrowserDB;
|
||||
import org.mozilla.gecko.db.DBUtils;
|
||||
import org.mozilla.gecko.gfx.BitmapUtils;
|
||||
import org.mozilla.gecko.ProfileMigrator;
|
||||
@ -61,7 +59,6 @@ import android.database.sqlite.SQLiteOpenHelper;
|
||||
import android.database.sqlite.SQLiteQueryBuilder;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
|
@ -5,38 +5,21 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@.db;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.IllegalArgumentException;
|
||||
import java.util.HashMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import org.mozilla.gecko.GeckoApp;
|
||||
import org.mozilla.gecko.GeckoAppShell;
|
||||
import org.mozilla.gecko.GeckoProfile;
|
||||
import org.mozilla.gecko.GeckoEvent;
|
||||
import org.mozilla.gecko.util.GeckoEventListener;
|
||||
import org.mozilla.gecko.db.BrowserContract.CommonColumns;
|
||||
import org.mozilla.gecko.db.DBUtils;
|
||||
import org.mozilla.gecko.db.BrowserContract.FormHistory;
|
||||
import org.mozilla.gecko.db.BrowserContract.DeletedFormHistory;
|
||||
import org.mozilla.gecko.db.BrowserContract.SyncColumns;
|
||||
import org.mozilla.gecko.db.BrowserContract;
|
||||
import org.mozilla.gecko.sqlite.SQLiteBridge;
|
||||
import org.mozilla.gecko.sqlite.SQLiteBridgeException;
|
||||
import org.mozilla.gecko.sync.Utils;
|
||||
|
||||
import android.content.ContentProvider;
|
||||
import android.content.ContentUris;
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.content.UriMatcher;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
public class FormHistoryProvider extends GeckoProvider {
|
||||
static final String TABLE_FORM_HISTORY = "moz_formhistory";
|
||||
|
@ -6,40 +6,21 @@
|
||||
package @ANDROID_PACKAGE_NAME@.db;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.IllegalArgumentException;
|
||||
import java.util.HashMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.Random;
|
||||
|
||||
import org.mozilla.gecko.GeckoEvent;
|
||||
import org.mozilla.gecko.GeckoProfile;
|
||||
import org.mozilla.gecko.GeckoThread;
|
||||
import org.mozilla.gecko.db.BrowserContract.CommonColumns;
|
||||
import org.mozilla.gecko.db.DBUtils;
|
||||
import org.mozilla.gecko.db.BrowserContract.Passwords;
|
||||
import org.mozilla.gecko.db.BrowserContract.DeletedPasswords;
|
||||
import org.mozilla.gecko.db.BrowserContract.SyncColumns;
|
||||
import org.mozilla.gecko.db.BrowserContract;
|
||||
import org.mozilla.gecko.mozglue.GeckoLoader;
|
||||
import org.mozilla.gecko.sqlite.SQLiteBridge;
|
||||
import org.mozilla.gecko.sqlite.SQLiteBridgeException;
|
||||
import org.mozilla.gecko.sync.Utils;
|
||||
import org.mozilla.gecko.util.GeckoEventListener;
|
||||
|
||||
import android.content.ContentProvider;
|
||||
import android.content.ContentUris;
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.content.UriMatcher;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import android.database.sqlite.SQLiteQueryBuilder;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
|
@ -5,38 +5,24 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@.db;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.IllegalArgumentException;
|
||||
import java.util.HashMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import org.mozilla.gecko.GeckoApp;
|
||||
import org.mozilla.gecko.GeckoAppShell;
|
||||
import org.mozilla.gecko.GeckoEvent;
|
||||
import org.mozilla.gecko.GeckoProfile;
|
||||
import org.mozilla.gecko.NSSBridge;
|
||||
import org.mozilla.gecko.db.DBUtils;
|
||||
import org.mozilla.gecko.db.BrowserContract.Passwords;
|
||||
import org.mozilla.gecko.db.BrowserContract.DeletedPasswords;
|
||||
import org.mozilla.gecko.db.BrowserContract.SyncColumns;
|
||||
import org.mozilla.gecko.db.BrowserContract;
|
||||
import org.mozilla.gecko.sqlite.MatrixBlobCursor;
|
||||
import org.mozilla.gecko.sqlite.SQLiteBridge;
|
||||
import org.mozilla.gecko.sqlite.SQLiteBridgeException;
|
||||
import org.mozilla.gecko.sync.Utils;
|
||||
import org.mozilla.gecko.util.GeckoEventListener;
|
||||
|
||||
import android.content.ContentProvider;
|
||||
import android.content.ContentUris;
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.UriMatcher;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
|
@ -6,19 +6,15 @@
|
||||
package @ANDROID_PACKAGE_NAME@.db;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.mozilla.gecko.GeckoAppShell;
|
||||
import org.mozilla.gecko.GeckoProfile;
|
||||
import org.mozilla.gecko.db.BrowserContract.CommonColumns;
|
||||
import org.mozilla.gecko.db.BrowserContract.Clients;
|
||||
import org.mozilla.gecko.db.BrowserContract.Tabs;
|
||||
import org.mozilla.gecko.db.BrowserContract;
|
||||
import org.mozilla.gecko.db.DBUtils;
|
||||
import org.mozilla.gecko.sync.Utils;
|
||||
import org.mozilla.gecko.util.GeckoBackgroundThread;
|
||||
|
||||
import android.content.ContentProvider;
|
||||
@ -27,7 +23,6 @@ import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.content.UriMatcher;
|
||||
import android.database.Cursor;
|
||||
import android.database.DatabaseUtils;
|
||||
import android.database.SQLException;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
|
@ -119,6 +119,7 @@ public class GLController {
|
||||
// doing its thing.
|
||||
|
||||
mView.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// If we haven't yet created the compositor, and the GfxInfoThread
|
||||
// isn't done it's data gathering activities, then postpone creating
|
||||
|
@ -17,7 +17,6 @@ import org.mozilla.gecko.util.FloatUtils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.PointF;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.os.SystemClock;
|
||||
import android.util.DisplayMetrics;
|
||||
@ -137,6 +136,7 @@ public class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
|
||||
// This needs to run on the UI thread so that the surface validity can't change on
|
||||
// us while we're in the middle of creating the compositor.
|
||||
mView.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mView.getGLController().createCompositor();
|
||||
}
|
||||
|
@ -8,8 +8,6 @@ package org.mozilla.gecko.gfx;
|
||||
import android.opengl.GLES20;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.concurrent.SynchronousQueue;
|
||||
|
||||
import javax.microedition.khronos.egl.EGL10;
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.egl.EGLContext;
|
||||
|
@ -750,6 +750,7 @@ class JavaPanZoomController
|
||||
}
|
||||
|
||||
private class AutoscrollRunnable extends AnimationRunnable {
|
||||
@Override
|
||||
protected void animateFrame() {
|
||||
if (mState != PanZoomState.AUTOSCROLL) {
|
||||
finishAnimation();
|
||||
|
@ -465,21 +465,25 @@ public class LayerView extends FrameLayout {
|
||||
}
|
||||
|
||||
private class SurfaceTextureListener implements TextureView.SurfaceTextureListener {
|
||||
@Override
|
||||
public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
|
||||
// We don't do this for surfaceCreated above because it is always followed by a surfaceChanged,
|
||||
// but that is not the case here.
|
||||
onSizeChanged(width, height);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
|
||||
onDestroyed();
|
||||
return true; // allow Android to call release() on the SurfaceTexture, we are done drawing to it
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height) {
|
||||
onSizeChanged(width, height);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSurfaceTextureUpdated(SurfaceTexture surface) {
|
||||
|
||||
}
|
||||
|
@ -43,6 +43,7 @@ public class NativeZip implements NativeReference {
|
||||
release();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void release() {
|
||||
if (mObj != 0) {
|
||||
_release(mObj);
|
||||
@ -51,6 +52,7 @@ public class NativeZip implements NativeReference {
|
||||
mInput = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReleased() {
|
||||
return (mObj == 0);
|
||||
}
|
||||
|
@ -1,10 +1,7 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
|
||||
import android.content.ContentProvider;
|
||||
import android.content.ContentProviderClient;
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.content.ContentProviderResult;
|
||||
@ -18,18 +15,13 @@ import android.database.Cursor;
|
||||
import android.database.ContentObserver;
|
||||
import android.os.Build;
|
||||
import android.net.Uri;
|
||||
import android.test.AndroidTestCase;
|
||||
import android.test.IsolatedContext;
|
||||
import android.test.ProviderTestCase2;
|
||||
import android.test.RenamingDelegatingContext;
|
||||
import android.test.mock.MockContentResolver;
|
||||
import android.test.mock.MockContext;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
|
||||
/*
|
||||
|
@ -1,8 +1,6 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
|
||||
import android.app.Instrumentation;
|
||||
import android.os.SystemClock;
|
||||
import android.util.FloatMath;
|
||||
|
@ -1,8 +1,6 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
|
@ -2,8 +2,6 @@
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.app.Activity;
|
||||
import android.util.Log;
|
||||
|
||||
/* Tests related to the about: page:
|
||||
* - check that about: loads from the awesome bar
|
||||
|
@ -2,16 +2,9 @@
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.app.Activity;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.TextView;
|
||||
import android.widget.TabHost;
|
||||
import android.content.ContentResolver;
|
||||
import android.app.Instrumentation;
|
||||
import android.util.DisplayMetrics;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class testAddonManager extends PixelTest {
|
||||
|
@ -1,26 +1,19 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.view.View;
|
||||
import android.widget.ListView;
|
||||
import android.widget.ExpandableListView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TabHost;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TabWidget;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.content.ContentResolver;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.ArrayList;
|
||||
import java.io.File;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
|
||||
/* Tests opening the all pages tab, that items look correct, clicking on an item
|
||||
|
@ -1,8 +1,6 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
|
||||
public class testAwesomebar extends BaseTest {
|
||||
@Override
|
||||
protected int getTestType() {
|
||||
|
@ -3,14 +3,10 @@ package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import com.jayway.android.robotium.solo.Solo;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.view.View;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TabWidget;
|
||||
import android.support.v4.view.ViewPager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
|
||||
/* Tests opening the all pages tab, that items look correct, clicking on an item
|
||||
|
@ -2,7 +2,6 @@
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.app.Instrumentation;
|
||||
|
||||
/**
|
||||
* Basic test for axis locking behaviour.
|
||||
|
@ -2,15 +2,9 @@
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.app.Activity;
|
||||
import android.database.Cursor;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.ListAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.TabHost;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.lang.reflect.Method;
|
||||
import android.content.ContentResolver;
|
||||
|
@ -2,12 +2,9 @@
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.app.Activity;
|
||||
import android.database.Cursor;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.ListView;
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
public class testBookmarklets extends PixelTest {
|
||||
|
@ -2,20 +2,14 @@
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.app.Activity;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.View;
|
||||
import android.widget.ListView;
|
||||
import android.widget.ExpandableListView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TabHost;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.ArrayList;
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* Tests the Bookmarks Tab
|
||||
|
@ -1,21 +1,16 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.content.ContentUris;
|
||||
import android.content.ContentProviderResult;
|
||||
import android.content.ContentProviderOperation;
|
||||
import android.content.OperationApplicationException;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
|
@ -1,15 +1,11 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.ContentValues;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.os.SystemClock;
|
||||
import android.util.Log;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.UUID;
|
||||
import java.util.Random;
|
||||
|
@ -1,8 +1,6 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
|
||||
public class testCheck extends PixelTest {
|
||||
private void pause(int length) {
|
||||
try {
|
||||
|
@ -1,8 +1,6 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
|
||||
public class testCheck2 extends PixelTest {
|
||||
@Override
|
||||
protected int getTestType() {
|
||||
|
@ -2,14 +2,7 @@
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.app.Activity;
|
||||
import android.widget.ListView;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.View;
|
||||
import android.widget.ExpandableListView;
|
||||
import android.widget.TabHost;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class testClearPrivateData extends PixelTest {
|
||||
|
||||
|
@ -5,11 +5,8 @@ import @ANDROID_PACKAGE_NAME@.*;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.SharedPreferences;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.lang.ClassLoader;
|
||||
|
@ -1,10 +1,6 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.app.Activity;
|
||||
import android.content.ContentResolver;
|
||||
|
||||
/* This test will test if doorhangers are displayed and dismissed
|
||||
The test will test:
|
||||
* geolocation doorhangers - sharing and not sharing the location dismisses the doorhanger
|
||||
|
@ -2,7 +2,6 @@
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.app.Instrumentation;
|
||||
|
||||
/**
|
||||
* Basic fling correctness test.
|
||||
|
@ -1,16 +1,12 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.app.Activity;
|
||||
import android.content.ContentValues;
|
||||
import android.content.ContentResolver;
|
||||
import android.database.Cursor;
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import java.io.File;
|
||||
import java.lang.ClassLoader;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* A basic form history contentprovider test.
|
||||
|
@ -5,10 +5,8 @@ import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.widget.ListView;
|
||||
import android.app.Activity;
|
||||
import java.util.ArrayList;
|
||||
import android.widget.TabHost;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.util.Log;
|
||||
|
||||
public class testHistory extends PixelTest {
|
||||
private View mFirstChild;
|
||||
|
@ -3,25 +3,18 @@ package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.View;
|
||||
import android.widget.ListView;
|
||||
import android.widget.ExpandableListView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TabHost;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.content.ContentResolver;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.ArrayList;
|
||||
import java.io.File;
|
||||
import java.util.Calendar;
|
||||
import java.util.GregorianCalendar;
|
||||
|
||||
|
@ -1,18 +1,9 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.Bitmap;
|
||||
import java.lang.ClassLoader;
|
||||
import java.util.ArrayList;
|
||||
import java.io.Writer;
|
||||
import java.io.InputStream;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.lang.reflect.Method;
|
||||
import java.io.StringWriter;
|
||||
|
||||
/**
|
||||
* A basic jar reader test. Tests reading a png from fennec's apk, as well
|
||||
|
@ -1,8 +1,6 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
|
||||
/**
|
||||
* A basic page load test.
|
||||
* - loads a page
|
||||
|
@ -1,27 +1,20 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.app.Activity;
|
||||
import android.content.ContentValues;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.res.AssetManager;
|
||||
import android.database.Cursor;
|
||||
import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.provider.Browser;
|
||||
import android.util.Log;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.lang.ClassLoader;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.util.ArrayList;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.app.Instrumentation;
|
||||
|
||||
/**
|
||||
* Basic test to check bounce-back from overscroll.
|
||||
|
@ -1,8 +1,6 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
|
||||
/**
|
||||
* A panning performance test.
|
||||
* Drags the page a bunch of times and measures the frames per second
|
||||
|
@ -2,7 +2,6 @@
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.app.Instrumentation;
|
||||
|
||||
/**
|
||||
* A basic panning correctness test.
|
||||
|
@ -2,7 +2,6 @@
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.app.Activity;
|
||||
import android.content.ContentValues;
|
||||
import android.content.ContentResolver;
|
||||
import android.database.Cursor;
|
||||
@ -12,7 +11,6 @@ import java.io.File;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class testPasswordEncrypt extends BaseTest {
|
||||
|
@ -1,8 +1,6 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.app.Activity;
|
||||
import android.content.ContentValues;
|
||||
import android.content.ContentResolver;
|
||||
import android.database.Cursor;
|
||||
|
@ -7,8 +7,6 @@ import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
import android.util.Log;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
|
@ -10,7 +10,6 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import android.widget.TextView;
|
||||
import android.app.Activity;
|
||||
import android.util.DisplayMetrics;
|
||||
|
||||
|
@ -2,8 +2,6 @@
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.app.Activity;
|
||||
import android.util.Log;
|
||||
import java.util.Arrays;
|
||||
|
||||
/** This patch tests the System Pages first by loading system pages from
|
||||
|
@ -1,9 +1,6 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.util.Log;
|
||||
|
||||
public class testTabHistory extends PixelTest {
|
||||
|
||||
@Override
|
||||
|
@ -1,8 +1,6 @@
|
||||
#filter substitution
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.app.Activity;
|
||||
import android.content.ContentResolver;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Color;
|
||||
|
@ -2,7 +2,6 @@
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.app.Activity;
|
||||
import android.util.DisplayMetrics;
|
||||
|
||||
/* Test the context menu on web content: Long click on a link,
|
||||
|
@ -2,7 +2,6 @@
|
||||
package @ANDROID_PACKAGE_NAME@.tests;
|
||||
|
||||
import @ANDROID_PACKAGE_NAME@.*;
|
||||
import android.app.Instrumentation;
|
||||
|
||||
public class test_bug720538 extends PixelTest {
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user