Bug 1351739 - Part -1 - Housekeeping. r=sebastian,walkingice

MozReview-Commit-ID: Ev6jl4N3K0g

--HG--
extra : rebase_source : b62fda2b9c1c1a7e233c2245cedc5b61b2fcc930
This commit is contained in:
Jan Henning 2017-04-07 20:51:41 +02:00
Родитель 9a70d783bc
Коммит c768aca43c
4 изменённых файлов: 16 добавлений и 19 удалений

Просмотреть файл

@ -112,7 +112,6 @@ import org.mozilla.gecko.util.StringUtils;
import org.mozilla.gecko.util.ThreadUtils;
import org.mozilla.gecko.widget.ActionModePresenter;
import org.mozilla.gecko.widget.AnchoredPopup;
import org.mozilla.gecko.widget.GeckoActionProvider;
import android.app.Activity;

Просмотреть файл

@ -45,6 +45,9 @@ import org.mozilla.gecko.util.GeckoBundle;
import org.mozilla.gecko.util.HardwareUtils;
import org.mozilla.gecko.util.PrefUtils;
import org.mozilla.gecko.util.ThreadUtils;
import org.mozilla.gecko.util.ViewUtil;
import org.mozilla.gecko.widget.ActionModePresenter;
import org.mozilla.gecko.widget.AnchoredPopup;
import android.animation.Animator;
import android.animation.ObjectAnimator;
@ -108,9 +111,6 @@ import android.widget.Toast;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.mozilla.gecko.util.ViewUtil;
import org.mozilla.gecko.widget.AnchoredPopup;
import org.mozilla.gecko.widget.ActionModePresenter;
import java.io.ByteArrayOutputStream;
import java.io.File;
@ -161,7 +161,7 @@ public abstract class GeckoApp
public static final String LAST_SELECTED_TAB = "lastSelectedTab";
public static final String PREFS_ALLOW_STATE_BUNDLE = "allowStateBundle";
public static final String PREFS_FLASH_USAGE = "playFlashCount";
public static final String PREFS_FLASH_USAGE = "playFlashCount";
public static final String PREFS_VERSION_CODE = "versionCode";
public static final String PREFS_WAS_STOPPED = "wasStopped";
public static final String PREFS_CRASHED_COUNT = "crashedCount";

Просмотреть файл

@ -52,6 +52,8 @@ import org.mozilla.gecko.widget.GeckoPopupMenu;
import java.util.List;
import static org.mozilla.gecko.Tabs.TabEvents;
public class CustomTabsActivity extends GeckoApp implements Tabs.OnTabsChangedListener {
private static final String LOGTAG = "CustomTabsActivity";
private static final String SAVED_START_INTENT = "saved_intent_which_started_this_activity";
@ -192,25 +194,25 @@ public class CustomTabsActivity extends GeckoApp implements Tabs.OnTabsChangedLi
}
@Override
public void onTabChanged(Tab tab, Tabs.TabEvents msg, String data) {
public void onTabChanged(Tab tab, TabEvents msg, String data) {
if (!Tabs.getInstance().isSelectedTab(tab)) {
return;
}
if (msg == Tabs.TabEvents.START
|| msg == Tabs.TabEvents.STOP
|| msg == Tabs.TabEvents.ADDED
|| msg == Tabs.TabEvents.LOAD_ERROR
|| msg == Tabs.TabEvents.LOADED
|| msg == Tabs.TabEvents.LOCATION_CHANGE) {
if (msg == TabEvents.START
|| msg == TabEvents.STOP
|| msg == TabEvents.ADDED
|| msg == TabEvents.LOAD_ERROR
|| msg == TabEvents.LOADED
|| msg == TabEvents.LOCATION_CHANGE) {
updateProgress((tab.getState() == Tab.STATE_LOADING),
tab.getLoadProgress());
}
if (msg == Tabs.TabEvents.LOCATION_CHANGE
|| msg == Tabs.TabEvents.SECURITY_CHANGE
|| msg == Tabs.TabEvents.TITLE) {
if (msg == TabEvents.LOCATION_CHANGE
|| msg == TabEvents.SECURITY_CHANGE
|| msg == TabEvents.TITLE) {
actionBarPresenter.update(tab);
}

Просмотреть файл

@ -12,7 +12,6 @@ import android.app.ActivityManager;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.support.v7.app.ActionBar;
@ -30,7 +29,6 @@ import org.mozilla.gecko.AppConstants;
import org.mozilla.gecko.EventDispatcher;
import org.mozilla.gecko.GeckoApp;
import org.mozilla.gecko.GeckoAppShell;
import org.mozilla.gecko.GeckoProfile;
import org.mozilla.gecko.Telemetry;
import org.mozilla.gecko.TelemetryContract;
import org.mozilla.gecko.icons.decoders.FaviconDecoder;
@ -46,8 +44,6 @@ import org.mozilla.gecko.util.GeckoBundle;
import org.mozilla.gecko.widget.AnchoredPopup;
public class WebAppActivity extends GeckoApp {
public static final String INTENT_KEY = "IS_A_WEBAPP";
public static final String MANIFEST_PATH = "MANIFEST_PATH";
private static final String LOGTAG = "WebAppActivity";