Bug 845612 - Add @Override annotations for implemented interfaces. r=kats
This commit is contained in:
@@ -197,6 +197,7 @@ abstract public class GeckoApp
|
||||
|
||||
void focusChrome() { }
|
||||
|
||||
@Override
|
||||
public void onTabChanged(Tab tab, Tabs.TabEvents msg, Object data) {
|
||||
// When a tab is closed, it is always unselected first.
|
||||
// When a tab is unselected, another tab is always selected first.
|
||||
@@ -738,6 +739,7 @@ abstract public class GeckoApp
|
||||
return hasMenu;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleMessage(String event, JSONObject message) {
|
||||
try {
|
||||
if (event.equals("Toast:Show")) {
|
||||
@@ -795,9 +797,11 @@ abstract public class GeckoApp
|
||||
final String url = message.getString("url");
|
||||
final String title = message.getString("title");
|
||||
mMainHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(GeckoApp.mAppContext, R.string.bookmark_added, Toast.LENGTH_SHORT).show();
|
||||
GeckoAppShell.getHandler().post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
BrowserDB.addBookmark(GeckoApp.mAppContext.getContentResolver(), title, url);
|
||||
}
|
||||
@@ -859,6 +863,7 @@ abstract public class GeckoApp
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getResponse() {
|
||||
String res = mCurrentResponse;
|
||||
mCurrentResponse = "";
|
||||
@@ -908,10 +913,12 @@ abstract public class GeckoApp
|
||||
new String[] { "setting", "value" },
|
||||
new int[] { R.id.setting, R.id.value }
|
||||
), -1, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int id) { }
|
||||
});
|
||||
|
||||
builder.setPositiveButton(R.string.site_settings_clear, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
ListView listView = ((AlertDialog) dialog).getListView();
|
||||
SparseBooleanArray checkedItemPositions = listView.getCheckedItemPositions();
|
||||
@@ -929,12 +936,14 @@ abstract public class GeckoApp
|
||||
}
|
||||
|
||||
builder.setNegativeButton(R.string.site_settings_cancel, new DialogInterface.OnClickListener(){
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int id) {
|
||||
dialog.cancel();
|
||||
}
|
||||
});
|
||||
|
||||
mMainHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Dialog dialog = builder.create();
|
||||
dialog.show();
|
||||
@@ -952,6 +961,7 @@ abstract public class GeckoApp
|
||||
|
||||
public void showToast(final int resId, final int duration) {
|
||||
mMainHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast.makeText(mAppContext, resId, duration).show();
|
||||
}
|
||||
@@ -960,6 +970,7 @@ abstract public class GeckoApp
|
||||
|
||||
void handleShowToast(final String message, final String duration) {
|
||||
mMainHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Toast toast;
|
||||
if (duration.equals("long"))
|
||||
@@ -1001,6 +1012,7 @@ abstract public class GeckoApp
|
||||
|
||||
void addPluginView(final View view, final Rect rect, final boolean isFullScreen) {
|
||||
mMainHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Tabs tabs = Tabs.getInstance();
|
||||
Tab tab = tabs.getSelectedTab();
|
||||
@@ -1040,6 +1052,7 @@ abstract public class GeckoApp
|
||||
// We need do do this on the next iteration in order to avoid
|
||||
// a deadlock, see comment below in FullScreenHolder
|
||||
mMainHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mLayerView.show();
|
||||
}
|
||||
@@ -1056,6 +1069,7 @@ abstract public class GeckoApp
|
||||
|
||||
void removePluginView(final View view, final boolean isFullScreen) {
|
||||
mMainHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Tabs tabs = Tabs.getInstance();
|
||||
Tab tab = tabs.getSelectedTab();
|
||||
@@ -1279,6 +1293,7 @@ abstract public class GeckoApp
|
||||
|
||||
public void setFullScreen(final boolean fullscreen) {
|
||||
mMainHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// Hide/show the system notification bar
|
||||
Window window = getWindow();
|
||||
@@ -1404,6 +1419,7 @@ abstract public class GeckoApp
|
||||
}
|
||||
|
||||
GeckoBackgroundThread.getHandler().post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
SharedPreferences prefs =
|
||||
GeckoApp.mAppContext.getSharedPreferences(PREFS_NAME, 0);
|
||||
@@ -1601,6 +1617,7 @@ abstract public class GeckoApp
|
||||
} else if (ACTION_DEBUG.equals(action) &&
|
||||
GeckoThread.checkAndSetLaunchState(GeckoThread.LaunchState.Launching, GeckoThread.LaunchState.WaitForDebugger)) {
|
||||
mMainHandler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
GeckoThread.setLaunchState(GeckoThread.LaunchState.Launching);
|
||||
sGeckoThread.start();
|
||||
@@ -1667,6 +1684,7 @@ abstract public class GeckoApp
|
||||
mJavaUiStartupTimer.stop();
|
||||
|
||||
GeckoAppShell.getHandler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// Sync settings need Gecko to be loaded, so
|
||||
// no hurry in starting this.
|
||||
@@ -1910,6 +1928,7 @@ abstract public class GeckoApp
|
||||
GeckoAccessibility.updateAccessibilitySettings();
|
||||
|
||||
GeckoBackgroundThread.getHandler().post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
SharedPreferences prefs =
|
||||
GeckoApp.mAppContext.getSharedPreferences(GeckoApp.PREFS_NAME, 0);
|
||||
@@ -1955,6 +1974,7 @@ abstract public class GeckoApp
|
||||
// here as the whole point is to save to disk while the activity is not
|
||||
// interacting with the user.
|
||||
GeckoBackgroundThread.getHandler().post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
SharedPreferences prefs =
|
||||
GeckoApp.mAppContext.getSharedPreferences(GeckoApp.PREFS_NAME, 0);
|
||||
@@ -1976,6 +1996,7 @@ abstract public class GeckoApp
|
||||
public void onRestart()
|
||||
{
|
||||
GeckoBackgroundThread.getHandler().post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
SharedPreferences prefs =
|
||||
GeckoApp.mAppContext.getSharedPreferences(GeckoApp.PREFS_NAME, 0);
|
||||
@@ -2169,6 +2190,7 @@ abstract public class GeckoApp
|
||||
final GeckoApp app = GeckoApp.mAppContext;
|
||||
|
||||
GeckoAppShell.getHandler().post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ProfileMigrator profileMigrator = new ProfileMigrator(app);
|
||||
|
||||
@@ -2186,8 +2208,10 @@ abstract public class GeckoApp
|
||||
final SetupScreen[] setupScreenHolder = new SetupScreen[1];
|
||||
|
||||
final Runnable startCallback = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
GeckoApp.mAppContext.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
setupScreenHolder[0] = new SetupScreen(app);
|
||||
setupScreenHolder[0].show();
|
||||
@@ -2197,8 +2221,10 @@ abstract public class GeckoApp
|
||||
};
|
||||
|
||||
final Runnable stopCallback = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
GeckoApp.mAppContext.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
SetupScreen screen = setupScreenHolder[0];
|
||||
// screen will never be null if this code runs, but
|
||||
@@ -2354,27 +2380,33 @@ abstract public class GeckoApp
|
||||
public AbsoluteLayout getPluginContainer() { return mPluginContainer; }
|
||||
|
||||
// Accelerometer.
|
||||
@Override
|
||||
public void onAccuracyChanged(Sensor sensor, int accuracy) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSensorChanged(SensorEvent event) {
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createSensorEvent(event));
|
||||
}
|
||||
|
||||
// Geolocation.
|
||||
@Override
|
||||
public void onLocationChanged(Location location) {
|
||||
// No logging here: user-identifying information.
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createLocationEvent(location));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProviderDisabled(String provider)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProviderEnabled(String provider)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStatusChanged(String provider, int status, Bundle extras)
|
||||
{
|
||||
}
|
||||
@@ -2490,6 +2522,7 @@ abstract public class GeckoApp
|
||||
super.addView(view, index);
|
||||
|
||||
mMainHandler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mLayerView.hide();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user