mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
merge fx-team to mc
This commit is contained in:
commit
172aff981e
@ -424,7 +424,7 @@ var gPluginHandler = {
|
||||
// Callback for user clicking on the link in a click-to-play plugin
|
||||
// (where the plugin has an update)
|
||||
openPluginUpdatePage: function (aEvent) {
|
||||
openURL(Services.urlFormatter.formatURLPref("plugins.update.url"));
|
||||
openUILinkIn(Services.urlFormatter.formatURLPref("plugins.update.url"), "tab");
|
||||
},
|
||||
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
|
@ -2132,8 +2132,7 @@
|
||||
<method name="onLinkClick">
|
||||
<body><![CDATA[
|
||||
// Open a new selected tab and close the current panel.
|
||||
gBrowser.loadOneTab(this._promolink.getAttribute("href"),
|
||||
{ inBackground: false });
|
||||
openUILinkIn(this._promolink.getAttribute("href"), "tab");
|
||||
this._panel.hidePopup();
|
||||
]]></body>
|
||||
</method>
|
||||
|
@ -119,7 +119,8 @@ public class HealthReportBroadcastService extends BackgroundService {
|
||||
}
|
||||
|
||||
final String action = intent.getAction();
|
||||
Logger.debug(LOG_TAG, "Health report upload feature is compile-time enabled; handling intent with action " + action + ".");
|
||||
Logger.debug(LOG_TAG, "Health report upload feature is compile-time enabled; attempting to " +
|
||||
"handle intent with action " + action + ".");
|
||||
|
||||
if (HealthReportConstants.ACTION_HEALTHREPORT_UPLOAD_PREF.equals(action)) {
|
||||
handleUploadPrefIntent(intent);
|
||||
@ -196,7 +197,7 @@ public class HealthReportBroadcastService extends BackgroundService {
|
||||
*/
|
||||
protected boolean attemptHandleIntentForPrune(final Intent intent) {
|
||||
final String action = intent.getAction();
|
||||
Logger.debug(LOG_TAG, "Prune: Handling intent with action, " + action + ".");
|
||||
Logger.debug(LOG_TAG, "Prune: Attempting to handle intent with action, " + action + ".");
|
||||
|
||||
if (HealthReportConstants.ACTION_HEALTHREPORT_PRUNE.equals(action)) {
|
||||
handlePruneIntent(intent);
|
||||
|
@ -82,6 +82,8 @@ public class PrunePolicy {
|
||||
return false;
|
||||
}
|
||||
|
||||
Logger.debug(LOG_TAG, "Attempting prune-by-size.");
|
||||
|
||||
// Prune environments first because their cascading deletions may delete some events. These
|
||||
// environments are pruned in order of least-recently used first. Note that orphaned
|
||||
// environments are ignored here and should be removed elsewhere.
|
||||
@ -153,6 +155,7 @@ public class PrunePolicy {
|
||||
}
|
||||
|
||||
editor.setNextCleanupTime(time + getMinimumTimeBetweenCleanupChecks());
|
||||
Logger.debug(LOG_TAG, "Cleaning up storage.");
|
||||
storage.cleanup();
|
||||
return true;
|
||||
}
|
||||
|
@ -225,6 +225,7 @@ public class BrowserSearch extends HomeFragment
|
||||
@Override
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
super.onViewCreated(view, savedInstanceState);
|
||||
mList.setTag(HomePager.LIST_TAG_BROWSER_SEARCH);
|
||||
|
||||
mList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
@Override
|
||||
|
@ -52,6 +52,7 @@ public class HomePager extends ViewPager {
|
||||
static final String LIST_TAG_TOP_SITES = "top_sites";
|
||||
static final String LIST_TAG_MOST_RECENT = "most_recent";
|
||||
static final String LIST_TAG_LAST_TABS = "last_tabs";
|
||||
static final String LIST_TAG_BROWSER_SEARCH = "browser_search";
|
||||
|
||||
private EnumMap<Page, Fragment> mPages = new EnumMap<Page, Fragment>(Page.class);
|
||||
|
||||
|
@ -48,9 +48,6 @@ public class MostRecentPage extends HomeFragment {
|
||||
// The view shown by the fragment.
|
||||
private ListView mList;
|
||||
|
||||
// The title for this HomeFragment page.
|
||||
private TextView mTitle;
|
||||
|
||||
// Reference to the View to display when there are no results.
|
||||
private View mEmptyView;
|
||||
|
||||
@ -93,11 +90,6 @@ public class MostRecentPage extends HomeFragment {
|
||||
|
||||
@Override
|
||||
public void onViewCreated(View view, Bundle savedInstanceState) {
|
||||
mTitle = (TextView) view.findViewById(R.id.title);
|
||||
if (mTitle != null) {
|
||||
mTitle.setText(R.string.home_most_recent_title);
|
||||
}
|
||||
|
||||
mList = (ListView) view.findViewById(R.id.list);
|
||||
mList.setTag(HomePager.LIST_TAG_MOST_RECENT);
|
||||
|
||||
@ -120,7 +112,6 @@ public class MostRecentPage extends HomeFragment {
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
mList = null;
|
||||
mTitle = null;
|
||||
mEmptyView = null;
|
||||
}
|
||||
|
||||
@ -159,18 +150,10 @@ public class MostRecentPage extends HomeFragment {
|
||||
|
||||
private void updateUiFromCursor(Cursor c) {
|
||||
if (c != null && c.getCount() > 0) {
|
||||
if (mTitle != null) {
|
||||
mTitle.setVisibility(View.VISIBLE);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Cursor is empty, so hide the title and set the
|
||||
// empty view if it hasn't been set already.
|
||||
if (mTitle != null) {
|
||||
mTitle.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
// Cursor is empty, so set the empty view if it hasn't been set already.
|
||||
if (mEmptyView == null) {
|
||||
// Set empty page view. We delay this so that the empty view won't flash.
|
||||
final ViewStub emptyViewStub = (ViewStub) getView().findViewById(R.id.home_empty_view_stub);
|
||||
|
@ -215,7 +215,8 @@ abstract class AboutHomeTest extends BaseTest {
|
||||
switch (tab) {
|
||||
case MOST_RECENT: {
|
||||
mSolo.clickOnView(tabwidget.getChildAt(0));
|
||||
mAsserter.ok(waitForText(StringHelper.MOST_RECENT_LABEL), "Checking that we are in the most recent tab of about:home", "We are in the most recent tab");
|
||||
// We can determine if we are on the MOST_RECENT tab only if pages were first visited during the test
|
||||
mAsserter.ok(waitForText(StringHelper.TODAY_LABEL), "Checking that we are in the most recent tab of about:home", "We are in the most recent tab");
|
||||
break;
|
||||
}
|
||||
case TABS_FROM_LAST_TIME: {
|
||||
@ -251,7 +252,8 @@ abstract class AboutHomeTest extends BaseTest {
|
||||
waitForAboutHomeTab(aboutHomeTabs.indexOf(StringHelper.HISTORY_LABEL));
|
||||
TabWidget tabwidget = (TabWidget)mSolo.getView(TabWidget.class, 0);
|
||||
mSolo.clickOnView(tabwidget.getChildAt(0));
|
||||
mAsserter.ok(waitForText(StringHelper.MOST_RECENT_LABEL), "Checking that we are in the most recent tab of about:home", "We are in the most recent tab");
|
||||
// We can determine if we are on the MOST_RECENT tab only if pages were first visited during the test
|
||||
mAsserter.ok(waitForText(StringHelper.TODAY_LABEL), "Checking that we are in the most recent tab of about:home", "We are in the most recent tab");
|
||||
break;
|
||||
}
|
||||
case TABS_FROM_LAST_TIME: {
|
||||
|
@ -93,7 +93,7 @@ class StringHelper {
|
||||
public static final String TOP_SITES_LABEL = "TOP SITES";
|
||||
public static final String BOOKMARKS_LABEL = "BOOKMARKS";
|
||||
public static final String READING_LIST_LABEL = "READING LIST";
|
||||
public static final String MOST_RECENT_LABEL = "Most recent";
|
||||
public static final String TODAY_LABEL = "Today";
|
||||
public static final String TABS_FROM_LAST_TIME_LABEL = "Open all tabs from last time";
|
||||
|
||||
// Desktop default bookmarks folders
|
||||
|
@ -3,12 +3,9 @@
|
||||
android:permission="@ANDROID_PACKAGE_NAME@.permissions.HEALTH_PROVIDER">
|
||||
</provider>
|
||||
|
||||
<!-- As well as system actions, we also listen for "Health
|
||||
Report upload preference changed" notifications sent by
|
||||
Fennec: @ANDROID_PACKAGE_NAME@.HEALTHREPORT_UPLOAD_PREF.
|
||||
|
||||
BroadcastReceiver is a thin receiver whose purpose is to
|
||||
start the background service in response to external events.
|
||||
<!-- BroadcastReceiver is a thin receiver whose purpose is to
|
||||
start the background service in response to external events,
|
||||
some sent by the system and some particular to Health Report.
|
||||
-->
|
||||
<receiver android:name="org.mozilla.gecko.background.healthreport.HealthReportBroadcastReceiver" >
|
||||
<intent-filter>
|
||||
@ -20,9 +17,11 @@
|
||||
<action android:name="android.intent.action.EXTERNAL_APPLICATIONS_AVAILABLE" />
|
||||
</intent-filter>
|
||||
<intent-filter >
|
||||
<action android:name="@ANDROID_PACKAGE_NAME@.HEALTHREPORT_UPLOAD_PREF" />
|
||||
<!-- Toggle Health Report upload service alarm (based on preferences value) -->
|
||||
<action android:name="@ANDROID_PACKAGE_NAME@.HEALTHREPORT_UPLOAD_PREF" />
|
||||
</intent-filter>
|
||||
<intent-filter >
|
||||
<action android:name="@ANDROID_PACKAGE_NAME@.HEALTHREPORT_PRUNE" />
|
||||
<!-- Enable Health Report prune service alarm -->
|
||||
<action android:name="@ANDROID_PACKAGE_NAME@.HEALTHREPORT_PRUNE" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
@ -1,8 +1,7 @@
|
||||
<!-- We have two services. BroadcastService responds to
|
||||
external events and starts the regular Service, which
|
||||
does the actual background work, in a uniform manner. We
|
||||
don't export either of these services, since they are
|
||||
only started by receivers internal to the Fennec package.
|
||||
<!-- BroadcastService responds to external events and starts
|
||||
the other background services. We don't export any of
|
||||
these services, since they are only started by components
|
||||
internal to the Fennec package.
|
||||
-->
|
||||
<service
|
||||
android:exported="false"
|
||||
|
Loading…
Reference in New Issue
Block a user