Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: mobile/android/base/home/PanelAuthLayout.java

Issue 29341383: Issue 2606 - Firefox logo shown in background on empty Adblock Browser New Tab and Search pages (Closed)
Patch Set: Adding change comments Created Nov. 2, 2016, 10:47 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- 1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public 2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 5
6 package org.mozilla.gecko.home; 6 package org.mozilla.gecko.home;
7 7
8 import org.mozilla.gecko.GeckoAppShell; 8 import org.mozilla.gecko.GeckoAppShell;
9 import org.mozilla.gecko.GeckoEvent; 9 import org.mozilla.gecko.GeckoEvent;
10 import org.mozilla.gecko.R; 10 import org.mozilla.gecko.R;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 @Override 46 @Override
47 public void onClick(View v) { 47 public void onClick(View v) {
48 GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent(" HomePanels:Authenticate", panelId)); 48 GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent(" HomePanels:Authenticate", panelId));
49 } 49 }
50 }); 50 });
51 51
52 final ImageView imageView = (ImageView) findViewById(R.id.image); 52 final ImageView imageView = (ImageView) findViewById(R.id.image);
53 final String imageUrl = authConfig.getImageUrl(); 53 final String imageUrl = authConfig.getImageUrl();
54 54
55 if (TextUtils.isEmpty(imageUrl)) { 55 if (TextUtils.isEmpty(imageUrl)) {
56 // Changed icon. See https://issues.adblockplus.org/ticket/2606
Felix Dahlke 2016/11/17 18:38:51 Nit: Makes more sense to me if you'd move this one
56 // Use a default image if an image URL isn't specified. 57 // Use a default image if an image URL isn't specified.
57 imageView.setImageResource(R.drawable.icon_home_empty_firefox); 58 imageView.setImageResource(R.drawable.abb_icon_home_empty);
58 } else { 59 } else {
59 ImageLoader.with(getContext()) 60 ImageLoader.with(getContext())
60 .load(imageUrl) 61 .load(imageUrl)
61 .into(imageView); 62 .into(imageView);
62 } 63 }
63 } 64 }
64 } 65 }
OLDNEW
« no previous file with comments | « no previous file | mobile/android/base/home/PanelLayout.java » ('j') | mobile/android/base/home/PanelLayout.java » ('J')

Powered by Google App Engine
This is Rietveld