Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
merge fx-team to mc
Browse files Browse the repository at this point in the history
  • Loading branch information
BavarianTomcat committed Sep 26, 2013
2 parents 476bbf2 + 1daf102 commit d5626ba
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 39 deletions.
2 changes: 1 addition & 1 deletion browser/base/content/browser-plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions browser/base/content/urlbarBindings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ protected boolean attemptHandleIntentForUpload(final Intent intent) {
}

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);
Expand Down Expand Up @@ -196,7 +197,7 @@ protected void handleUploadPrefIntent(Intent intent) {
*/
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ protected boolean attemptPruneBySize(final long time) {
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.
Expand Down Expand Up @@ -153,6 +155,7 @@ protected boolean attemptStorageCleanup(final long time) {
}

editor.setNextCleanupTime(time + getMinimumTimeBetweenCleanupChecks());
Logger.debug(LOG_TAG, "Cleaning up storage.");
storage.cleanup();
return true;
}
Expand Down
1 change: 1 addition & 0 deletions mobile/android/base/home/BrowserSearch.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ public void onDestroyView() {
@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
Expand Down
1 change: 1 addition & 0 deletions mobile/android/base/home/HomePager.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public enum Page {
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);

Expand Down
19 changes: 1 addition & 18 deletions mobile/android/base/home/MostRecentPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -93,11 +90,6 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa

@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);

Expand All @@ -120,7 +112,6 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)
public void onDestroyView() {
super.onDestroyView();
mList = null;
mTitle = null;
mEmptyView = null;
}

Expand Down Expand Up @@ -159,18 +150,10 @@ public Cursor loadCursor() {

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);
Expand Down
6 changes: 4 additions & 2 deletions mobile/android/base/tests/AboutHomeTest.java.in
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion mobile/android/base/tests/StringHelper.java.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit d5626ba

Please sign in to comment.