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

Delta Between Two Patch Sets: mobile/android/base/util/HardwareUtils.java

Issue 29385757: Issue 5005 - Always show the menu icon (Closed)
Left Patch Set: Created March 16, 2017, 9:58 p.m.
Right Patch Set: Fixing typo Created March 28, 2017, 12:34 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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.util; 6 package org.mozilla.gecko.util;
7 7
8 import org.mozilla.gecko.SysInfo; 8 import org.mozilla.gecko.SysInfo;
9 9
10 import android.content.Context; 10 import android.content.Context;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 public static boolean isSmallTablet() { 84 public static boolean isSmallTablet() {
85 return sIsSmallTablet; 85 return sIsSmallTablet;
86 } 86 }
87 87
88 public static boolean isTelevision() { 88 public static boolean isTelevision() {
89 return sIsTelevision; 89 return sIsTelevision;
90 } 90 }
91 91
92 public static boolean hasMenuButton() { 92 public static boolean hasMenuButton() {
93 // Forcing behavior idependently of the presence of a hardware menu butt on 93 // Forcing behavior independently of the presence of a hardware menu but ton
anton 2017/03/17 06:53:11 LGTM though i'd suggest to explain a bit what beha
Felix Dahlke 2017/03/27 15:46:57 I figure when looking at #5005 that becomes appare
94 // See https://issues.adblockplus.org/ticket/5005 94 // See https://issues.adblockplus.org/ticket/5005
95 return false; 95 return false;
96 } 96 }
97 97
98 public static int getMemSize() { 98 public static int getMemSize() {
99 return SysInfo.getMemSize(); 99 return SysInfo.getMemSize();
100 } 100 }
101 101
102 public static boolean isLowMemoryPlatform() { 102 public static boolean isLowMemoryPlatform() {
103 final int memSize = getMemSize(); 103 final int memSize = getMemSize();
104 104
105 // Fallback to false if we fail to read meminfo 105 // Fallback to false if we fail to read meminfo
106 // for some reason. 106 // for some reason.
107 if (memSize == 0) { 107 if (memSize == 0) {
108 Log.w(LOGTAG, "Could not compute system memory. Falling back to isLo wMemoryPlatform = false."); 108 Log.w(LOGTAG, "Could not compute system memory. Falling back to isLo wMemoryPlatform = false.");
109 return false; 109 return false;
110 } 110 }
111 111
112 return memSize < LOW_MEMORY_THRESHOLD_MB; 112 return memSize < LOW_MEMORY_THRESHOLD_MB;
113 } 113 }
114 } 114 }
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld