Backed out changeset 346678134a33 (bug 965361) for Android test bustage.

CLOSED TREE
This commit is contained in:
Ryan VanderMeulen 2014-02-13 11:54:37 -05:00
parent e7699bb3c6
commit b9ec37c0dc
5 changed files with 2 additions and 33 deletions

View File

@ -14,7 +14,6 @@ import org.mozilla.gecko.home.HomeConfig.PanelType;
import org.mozilla.gecko.util.HardwareUtils;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.Fragment;
@ -52,9 +51,6 @@ public class HomePager extends ViewPager {
// Whether or not we need to restart the loader when we show the HomePager.
private boolean mRestartLoader;
// Cached original ViewPager background.
private final Drawable mOriginalBackground;
// This is mostly used by UI tests to easily fetch
// specific list views at runtime.
static final String LIST_TAG_HISTORY = "history";
@ -126,8 +122,6 @@ public class HomePager extends ViewPager {
// ensure there is always a focusable view. This would ordinarily be done via an XML
// attribute, but it is not working properly.
setFocusableInTouchMode(true);
mOriginalBackground = getBackground();
}
@Override
@ -316,18 +310,9 @@ public class HomePager extends ViewPager {
// Update the adapter with the new panel configs
adapter.update(enabledPanels);
// Hide the tab strip if the new configuration contains no panels.
final int count = enabledPanels.size();
if (count == 0) {
// Set firefox watermark as background.
setBackgroundResource(R.drawable.home_pager_empty_state);
// Hide the tab strip as there are no panels.
mTabStrip.setVisibility(View.INVISIBLE);
} else {
mTabStrip.setVisibility(View.VISIBLE);
// Restore original background.
setBackground(mOriginalBackground);
}
mTabStrip.setVisibility(count > 0 ? View.VISIBLE : View.INVISIBLE);
// Re-install the adapter with the final state
// in the pager.
setAdapter(adapter);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:gecko="http://schemas.android.com/apk/res-auto">
<item android:maxLevel="0" android:drawable="@android:color/white"/>
<item>
<bitmap android:src="@drawable/icon_home_empty_firefox"
android:gravity="center"/>
</item>
</layer-list>