Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Backout 51119e80e283 (bug 822422), 1a7f21d5a95a (bug 822421) for java…

… NPEs on a CLOSED TREE
  • Loading branch information...
commit 6c0d9318e106138791fd45e95ec39c3afa8c6a57 1 parent 5875cd2
@edmorley edmorley authored
Showing with 59 additions and 214 deletions.
  1. +1 −1  CLOBBER
  2. +0 −12 mobile/android/base/AboutHomeContent.java
  3. +1 −1  mobile/android/base/AboutHomeSection.java
  4. +1 −33 mobile/android/base/GeckoView.java.frag
  5. +0 −10 mobile/android/base/LightweightTheme.java
  6. +3 −10 mobile/android/base/Makefile.in
  7. +0 −19 mobile/android/base/resources/color/abouthome_section_more_text.xml.in
  8. +0 −19 mobile/android/base/resources/color/abouthome_section_subtitle.xml.in
  9. +0 −19 mobile/android/base/resources/color/abouthome_section_title.xml.in
  10. 0  mobile/android/base/resources/drawable-hdpi/{abouthome_logo_dark.png → abouthome_logo.png}
  11. BIN  mobile/android/base/resources/drawable-hdpi/abouthome_logo_light.png
  12. 0  mobile/android/base/resources/drawable-xhdpi/{abouthome_logo_dark.png → abouthome_logo.png}
  13. BIN  mobile/android/base/resources/drawable-xhdpi/abouthome_logo_light.png
  14. 0  mobile/android/base/resources/drawable/{abouthome_logo_dark.png → abouthome_logo.png}
  15. +0 −19 mobile/android/base/resources/drawable/abouthome_logo.xml.in
  16. BIN  mobile/android/base/resources/drawable/abouthome_logo_light.png
  17. +17 −18 mobile/android/base/resources/layout-xlarge-land-v11/abouthome_content.xml.in
  18. +3 −6 mobile/android/base/resources/layout/abouthome_addon_row.xml
  19. +20 −20 mobile/android/base/resources/layout/abouthome_content.xml.in
  20. +3 −6 mobile/android/base/resources/layout/abouthome_last_tabs_row.xml
  21. +3 −5 mobile/android/base/resources/layout/abouthome_remote_tab_row.xml
  22. +7 −11 mobile/android/base/resources/layout/abouthome_section.xml
  23. +0 −5 mobile/android/base/resources/values/attrs.xml
View
2  CLOBBER
@@ -15,4 +15,4 @@
#
# Note: The description below will be part of the error message shown to users.
#
-Bug 822422 - Firefox workmark should be white on dark themes.
+Bug 816576 - libsoundtouch is now part of libxul and not a separate dynamic library.
View
12 mobile/android/base/AboutHomeContent.java
@@ -689,23 +689,11 @@ public void onLightweightThemeChanged() {
drawable.setAlpha(255, 0);
setBackgroundDrawable(drawable);
-
- boolean isLight = mActivity.getLightweightTheme().isLightTheme();
- mAddons.setTheme(isLight);
- mLastTabs.setTheme(isLight);
- mRemoteTabs.setTheme(isLight);
- ((GeckoImageView) findViewById(R.id.abouthome_logo)).setTheme(isLight);
- ((GeckoTextView) findViewById(R.id.top_sites_title)).setTheme(isLight);
}
@Override
public void onLightweightThemeReset() {
setBackgroundResource(R.drawable.abouthome_bg_repeat);
- mAddons.resetTheme();
- mLastTabs.resetTheme();
- mRemoteTabs.resetTheme();
- ((GeckoImageView) findViewById(R.id.abouthome_logo)).resetTheme();
- ((GeckoTextView) findViewById(R.id.top_sites_title)).resetTheme();
}
@Override
View
2  mobile/android/base/AboutHomeSection.java
@@ -13,7 +13,7 @@
import android.widget.LinearLayout;
import android.widget.TextView;
-public class AboutHomeSection extends GeckoLinearLayout {
+public class AboutHomeSection extends LinearLayout {
private static final String LOGTAG = "GeckoAboutHomeSection";
private TextView mTitle;
View
34 mobile/android/base/GeckoView.java.frag
@@ -10,12 +10,8 @@ import android.widget.@VIEWTYPE@;
public class Gecko@VIEWTYPE@ extends @VIEWTYPE@ {
private static final int[] STATE_PRIVATE_MODE = { R.attr.state_private };
- private static final int[] STATE_LIGHT = { R.attr.state_light };
- private static final int[] STATE_DARK = { R.attr.state_dark };
private boolean mIsPrivate = false;
- private boolean mIsLight = false;
- private boolean mIsDark = false;
public Gecko@VIEWTYPE@(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -27,10 +23,6 @@ public class Gecko@VIEWTYPE@ extends @VIEWTYPE@ {
if (mIsPrivate)
mergeDrawableStates(drawableState, STATE_PRIVATE_MODE);
- else if (mIsLight)
- mergeDrawableStates(drawableState, STATE_LIGHT);
- else if (mIsDark)
- mergeDrawableStates(drawableState, STATE_DARK);
return drawableState;
}
@@ -44,29 +36,5 @@ public class Gecko@VIEWTYPE@ extends @VIEWTYPE@ {
mIsPrivate = isPrivate;
refreshDrawableState();
}
- }
-
- public void setTheme(boolean isLight) {
- // Set the theme only if it is different from existing theme.
- if ((isLight && mIsLight != isLight) ||
- (!isLight && mIsDark == isLight)) {
- if (isLight) {
- mIsLight = true;
- mIsDark = false;
- } else {
- mIsLight = false;
- mIsDark = true;
- }
-
- refreshDrawableState();
- }
- }
-
- public void resetTheme() {
- if (mIsLight || mIsDark) {
- mIsLight = false;
- mIsDark = false;
- refreshDrawableState();
- }
- }
+ }
}
View
10 mobile/android/base/LightweightTheme.java
@@ -42,7 +42,6 @@
private Application mApplication;
private Bitmap mBitmap;
private int mColor;
- private boolean mIsLight;
public static interface OnChangeListener {
// This is the View's default post.
@@ -99,11 +98,6 @@ public void setLightweightTheme(String headerURL) {
maxWidth, height);
mColor = BitmapUtils.getDominantColor(cropped, false);
- double luminance = (0.2125 * ((mColor & 0x00FF0000) >> 16)) +
- (0.7154 * ((mColor & 0x0000FF00) >> 8)) +
- (0.0721 * (mColor &0x000000FF));
- mIsLight = (luminance > 110) ? true : false;
-
notifyListeners();
} catch(java.net.MalformedURLException e) {
mBitmap = null;
@@ -162,10 +156,6 @@ public void handleMessage(String event, JSONObject message) {
}
}
- public boolean isLightTheme() {
- return mIsLight;
- }
-
/**
* Crop the image based on the position of the view on the window.
* Either the View or one of its ancestors might have scrolled or translated.
View
13 mobile/android/base/Makefile.in
@@ -227,12 +227,8 @@ FENNEC_PP_JAVA_FILES = \
$(NULL)
FENNEC_PP_XML_FILES = \
- res/color/abouthome_section_more_text.xml \
- res/color/abouthome_section_subtitle.xml \
- res/color/abouthome_section_title.xml \
res/color/awesome_bar_title.xml \
res/color/awesome_bar_title_hint.xml \
- res/drawable/abouthome_logo.xml \
res/drawable/address_bar_bg.xml \
res/drawable/address_bar_nav_button.xml \
res/drawable/address_bar_url.xml \
@@ -501,8 +497,7 @@ RES_DRAWABLE_BASE = \
res/drawable/favicon.png \
res/drawable/folder.png \
res/drawable/abouthome_icon.png \
- res/drawable/abouthome_logo_dark.png \
- res/drawable/abouthome_logo_light.png \
+ res/drawable/abouthome_logo.png \
res/drawable/abouthome_promo_box_bg.9.png \
res/drawable/abouthome_promo_box_pressed_bg.9.png \
res/drawable/abouthome_promo_logo_apps.png \
@@ -591,8 +586,7 @@ RES_DRAWABLE_HDPI = \
res/drawable-hdpi/home_bg.png \
res/drawable-hdpi/home_star.png \
res/drawable-hdpi/abouthome_icon.png \
- res/drawable-hdpi/abouthome_logo_dark.png \
- res/drawable-hdpi/abouthome_logo_light.png \
+ res/drawable-hdpi/abouthome_logo.png \
res/drawable-hdpi/abouthome_promo_box_bg.9.png \
res/drawable-hdpi/abouthome_promo_box_pressed_bg.9.png \
res/drawable-hdpi/abouthome_promo_logo_apps.png \
@@ -671,8 +665,7 @@ RES_DRAWABLE_XHDPI = \
res/drawable-xhdpi/favicon.png \
res/drawable-xhdpi/folder.png \
res/drawable-xhdpi/abouthome_icon.png \
- res/drawable-xhdpi/abouthome_logo_dark.png \
- res/drawable-xhdpi/abouthome_logo_light.png \
+ res/drawable-xhdpi/abouthome_logo.png \
res/drawable-xhdpi/abouthome_promo_box_bg.9.png \
res/drawable-xhdpi/abouthome_promo_box_pressed_bg.9.png \
res/drawable-xhdpi/abouthome_promo_logo_apps.png \
View
19 mobile/android/base/resources/color/abouthome_section_more_text.xml.in
@@ -1,19 +0,0 @@
-#filter substitution
-<?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/. -->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:gecko="http://schemas.android.com/apk/res/@ANDROID_PACKAGE_NAME@">
-
- <!-- dark theme -->
- <item gecko:state_dark="true" android:color="#80FFFFFF" />
-
- <!-- light theme -->
- <item gecko:state_light="true" android:color="#80222222" />
-
- <!-- default -->
- <item android:color="#FF22629E"/>
-
-</selector>
View
19 mobile/android/base/resources/color/abouthome_section_subtitle.xml.in
@@ -1,19 +0,0 @@
-#filter substitution
-<?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/. -->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:gecko="http://schemas.android.com/apk/res/@ANDROID_PACKAGE_NAME@">
-
- <!-- dark theme -->
- <item gecko:state_dark="true" android:color="#CCFFFFFF" />
-
- <!-- light theme -->
- <item gecko:state_light="true" android:color="#CC222222" />
-
- <!-- default -->
- <item android:color="#FF666666"/>
-
-</selector>
View
19 mobile/android/base/resources/color/abouthome_section_title.xml.in
@@ -1,19 +0,0 @@
-#filter substitution
-<?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/. -->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:gecko="http://schemas.android.com/apk/res/@ANDROID_PACKAGE_NAME@">
-
- <!-- dark theme -->
- <item gecko:state_dark="true" android:color="#FFFFFFFF" />
-
- <!-- light theme -->
- <item gecko:state_light="true" android:color="#FF222222" />
-
- <!-- default -->
- <item android:color="#FF000000"/>
-
-</selector>
View
0  ...e/resources/drawable-hdpi/abouthome_logo_dark.png → ...d/base/resources/drawable-hdpi/abouthome_logo.png
File renamed without changes
View
BIN  mobile/android/base/resources/drawable-hdpi/abouthome_logo_light.png
Deleted file not rendered
View
0  .../resources/drawable-xhdpi/abouthome_logo_dark.png → .../base/resources/drawable-xhdpi/abouthome_logo.png
File renamed without changes
View
BIN  mobile/android/base/resources/drawable-xhdpi/abouthome_logo_light.png
Deleted file not rendered
View
0  ...d/base/resources/drawable/abouthome_logo_dark.png → ...ndroid/base/resources/drawable/abouthome_logo.png
File renamed without changes
View
19 mobile/android/base/resources/drawable/abouthome_logo.xml.in
@@ -1,19 +0,0 @@
-#filter substitution
-<?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/. -->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:gecko="http://schemas.android.com/apk/res/@ANDROID_PACKAGE_NAME@">
-
- <!-- dark theme -->
- <item gecko:state_dark="true" android:drawable="@drawable/abouthome_logo_light" />
-
- <!-- light theme -->
- <item gecko:state_light="true" android:drawable="@drawable/abouthome_logo_dark" />
-
- <!-- default -->
- <item android:drawable="@drawable/abouthome_logo_dark" />
-
-</selector>
View
BIN  mobile/android/base/resources/drawable/abouthome_logo_light.png
Deleted file not rendered
View
35 mobile/android/base/resources/layout-xlarge-land-v11/abouthome_content.xml.in
@@ -18,24 +18,23 @@
android:layout_marginLeft="@dimen/abouthome_gutter_large"
android:layout_marginRight="@dimen/abouthome_gutter_small">
- <Gecko.ImageView android:id="@+id/abouthome_logo"
- android:src="@drawable/abouthome_logo"
- android:layout_width="wrap_content"
- android:layout_height="24dip"
- android:layout_marginTop="16dip"
- android:layout_marginBottom="10dip"
- android:layout_marginLeft="12dip"/>
-
- <Gecko.TextView android:id="@+id/top_sites_title"
- android:text="@string/abouthome_top_sites_title"
- android:layout_width="fill_parent"
- android:layout_height="26dip"
- android:background="#34FFFFFF"
- android:paddingLeft="12dip"
- android:textSize="12sp"
- android:textColor="@color/abouthome_section_title"
- android:textStyle="bold"
- android:gravity="left|center_vertical"/>
+ <ImageView android:src="@drawable/abouthome_logo"
+ android:layout_width="wrap_content"
+ android:layout_height="24dip"
+ android:layout_marginTop="16dip"
+ android:layout_marginBottom="10dip"
+ android:layout_marginLeft="12dip"/>
+
+ <TextView android:id="@+id/top_sites_title"
+ android:text="@string/abouthome_top_sites_title"
+ android:layout_width="fill_parent"
+ android:layout_height="26dip"
+ android:background="#34FFFFFF"
+ android:paddingLeft="12dip"
+ android:textSize="12sp"
+ android:textColor="#000000"
+ android:textStyle="bold"
+ android:gravity="left|center_vertical"/>
<view class="org.mozilla.gecko.AboutHomeContent$TopSitesGridView"
android:id="@+id/top_sites_grid"
View
9 mobile/android/base/resources/layout/abouthome_addon_row.xml
@@ -7,8 +7,7 @@
android:layout_width="fill_parent"
android:layout_height="47dip"
android:gravity="left|center_vertical"
- android:background="@drawable/action_bar_button"
- android:duplicateParentState="true">
+ android:background="@drawable/action_bar_button">
<ImageView android:id="@+id/addon_icon"
android:layout_width="32dp"
@@ -24,8 +23,7 @@
android:layout_marginLeft="12dip"
android:gravity="center_vertical"
android:textSize="15sp"
- android:textColor="@color/abouthome_section_title"
- android:duplicateParentState="true"/>
+ android:textColor="#222222"/>
<TextView android:id="@+id/addon_version"
android:layout_width="wrap_content"
@@ -35,8 +33,7 @@
android:layout_marginLeft="5dip"
android:gravity="center_vertical"
android:textSize="12sp"
- android:textColor="@color/abouthome_section_subtitle"
- android:duplicateParentState="true"/>
+ android:textColor="#666666"/>
<View android:layout_width="fill_parent"
android:layout_height="1dp"
View
40 mobile/android/base/resources/layout/abouthome_content.xml.in
@@ -12,27 +12,27 @@
android:paddingLeft="@dimen/abouthome_gutter_large"
android:paddingRight="@dimen/abouthome_gutter_large">
- <Gecko.ImageView android:id="@+id/abouthome_logo"
- android:src="@drawable/abouthome_logo"
- android:layout_width="wrap_content"
- android:layout_height="24dip"
- android:layout_marginTop="16dip"
- android:layout_marginBottom="10dip"
- android:layout_marginLeft="12dip"
- android:layout_alignParentTop="true"
- android:layout_alignParentLeft="true"/>
+ <ImageView android:id="@+id/abouthome_logo"
+ android:src="@drawable/abouthome_logo"
+ android:layout_width="wrap_content"
+ android:layout_height="24dip"
+ android:layout_marginTop="16dip"
+ android:layout_marginBottom="10dip"
+ android:layout_marginLeft="12dip"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true"/>
- <Gecko.TextView android:id="@+id/top_sites_title"
- android:text="@string/abouthome_top_sites_title"
- android:layout_width="fill_parent"
- android:layout_height="26dip"
- android:background="#34FFFFFF"
- android:paddingLeft="12dip"
- android:textSize="12sp"
- android:textColor="@color/abouthome_section_title"
- android:textStyle="bold"
- android:gravity="left|center_vertical"
- android:layout_below="@id/abouthome_logo"/>
+ <TextView android:id="@+id/top_sites_title"
+ android:text="@string/abouthome_top_sites_title"
+ android:layout_width="fill_parent"
+ android:layout_height="26dip"
+ android:background="#34FFFFFF"
+ android:paddingLeft="12dip"
+ android:textSize="12sp"
+ android:textColor="#000000"
+ android:textStyle="bold"
+ android:gravity="left|center_vertical"
+ android:layout_below="@id/abouthome_logo"/>
<ImageView android:src="@drawable/abouthome_icon"
android:layout_width="180dp"
View
9 mobile/android/base/resources/layout/abouthome_last_tabs_row.xml
@@ -8,8 +8,7 @@
android:layout_width="fill_parent"
android:layout_height="47dip"
android:gravity="left|center_vertical"
- android:background="@drawable/action_bar_button"
- android:duplicateParentState="true">
+ android:background="@drawable/action_bar_button">
<ImageView android:id="@+id/last_tab_favicon"
android:layout_width="32dip"
@@ -27,8 +26,7 @@
android:layout_marginRight="12dip"
android:textSize="15sp"
android:singleLine="true"
- android:textColor="@color/abouthome_section_title"
- android:duplicateParentState="true"/>
+ android:textColor="#222222"/>
<TextView android:id="@+id/last_tab_url"
android:layout_width="wrap_content"
@@ -39,8 +37,7 @@
android:layout_below="@id/last_tab_title"
android:textSize="12sp"
android:singleLine="true"
- android:textColor="@color/abouthome_section_subtitle"
- android:duplicateParentState="true"/>
+ android:textColor="#666666"/>
<View android:layout_width="fill_parent"
android:layout_height="1dp"
View
8 mobile/android/base/resources/layout/abouthome_remote_tab_row.xml
@@ -7,8 +7,7 @@
android:layout_width="fill_parent"
android:layout_height="47dip"
android:orientation="vertical"
- android:background="@drawable/action_bar_button"
- android:duplicateParentState="true">
+ android:background="@drawable/action_bar_button">
<TextView android:id="@+id/remote_tab_title"
android:layout_width="fill_parent"
@@ -17,10 +16,9 @@
android:paddingRight="12dip"
android:gravity="center_vertical"
android:textSize="15sp"
+ android:textColor="#222222"
android:singleLine="true"
- android:ellipsize="middle"
- android:textColor="@color/abouthome_section_title"
- android:duplicateParentState="true"/>
+ android:ellipsize="middle"/>
<View android:layout_width="fill_parent"
android:layout_height="1dp"
View
18 mobile/android/base/resources/layout/abouthome_section.xml
@@ -11,10 +11,9 @@
android:background="#34FFFFFF"
android:paddingLeft="12dip"
android:textSize="12sp"
- android:textColor="@color/abouthome_section_title"
+ android:textColor="#000000"
android:textStyle="bold"
- android:gravity="left|center_vertical"
- android:duplicateParentState="true"/>
+ android:gravity="left|center_vertical"/>
<TextView android:id="@+id/subtitle"
android:layout_width="fill_parent"
@@ -23,23 +22,20 @@
android:background="#34FFFFFF"
android:paddingLeft="12dip"
android:textSize="12sp"
- android:textColor="@color/abouthome_section_subtitle"
- android:gravity="left|center_vertical"
- android:duplicateParentState="true"/>
+ android:textColor="#666666"
+ android:gravity="left|center_vertical"/>
<LinearLayout android:id="@+id/items_container"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
- android:isScrollContainer="false"
- android:duplicateParentState="true"/>
+ android:isScrollContainer="false"/>
<org.mozilla.gecko.LinkTextView android:id="@+id/more_text"
android:layout_width="fill_parent"
android:layout_height="47dip"
- android:textColor="@color/abouthome_section_more_text"
+ android:textColor="#22629e"
android:textSize="12sp"
- android:gravity="center"
- android:duplicateParentState="true"/>
+ android:gravity="center"/>
</merge>
View
5 mobile/android/base/resources/values/attrs.xml
@@ -61,10 +61,5 @@
<attr name="state_private" format="boolean"/>
</declare-styleable>
- <declare-styleable name="LightweightTheme">
- <attr name="state_light" format="boolean"/>
- <attr name="state_dark" format="boolean"/>
- </declare-styleable>
-
</resources>
Please sign in to comment.
Something went wrong with that request. Please try again.