| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.chrome.browser; | 5 package org.chromium.chrome.browser; |
| 6 | 6 |
| 7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
| 8 import android.annotation.TargetApi; | 8 import android.annotation.TargetApi; |
| 9 import android.app.Activity; | 9 import android.app.Activity; |
| 10 import android.app.SearchManager; | 10 import android.app.SearchManager; |
| (...skipping 2156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2167 | 2167 |
| 2168 private void setLowEndTheme() { | 2168 private void setLowEndTheme() { |
| 2169 if (getThemeId() == R.style.MainTheme_LowEnd) setTheme(R.style.MainTheme
_LowEnd); | 2169 if (getThemeId() == R.style.MainTheme_LowEnd) setTheme(R.style.MainTheme
_LowEnd); |
| 2170 } | 2170 } |
| 2171 | 2171 |
| 2172 /** | 2172 /** |
| 2173 * Records UMA histograms for the current screen width. Should only be calle
d when the activity | 2173 * Records UMA histograms for the current screen width. Should only be calle
d when the activity |
| 2174 * is in Android N multi-window mode. | 2174 * is in Android N multi-window mode. |
| 2175 */ | 2175 */ |
| 2176 protected void recordMultiWindowModeScreenWidth() { | 2176 protected void recordMultiWindowModeScreenWidth() { |
| 2177 if (!DeviceFormFactor.isTablet(this)) return; | 2177 if (!DeviceFormFactor.isTablet()) return; |
| 2178 | 2178 |
| 2179 RecordHistogram.recordBooleanHistogram( | 2179 RecordHistogram.recordBooleanHistogram( |
| 2180 "Android.MultiWindowMode.IsTabletScreenWidthBelow600", | 2180 "Android.MultiWindowMode.IsTabletScreenWidthBelow600", |
| 2181 mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP); | 2181 mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP); |
| 2182 | 2182 |
| 2183 if (mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP) { | 2183 if (mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP) { |
| 2184 RecordHistogram.recordLinearCountHistogram( | 2184 RecordHistogram.recordLinearCountHistogram( |
| 2185 "Android.MultiWindowMode.TabletScreenWidth", mScreenWidthDp,
1, | 2185 "Android.MultiWindowMode.TabletScreenWidth", mScreenWidthDp,
1, |
| 2186 DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP, 50); | 2186 DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP, 50); |
| 2187 } | 2187 } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2217 return false; | 2217 return false; |
| 2218 } | 2218 } |
| 2219 | 2219 |
| 2220 /** | 2220 /** |
| 2221 * @return the reference pool for this activity. | 2221 * @return the reference pool for this activity. |
| 2222 */ | 2222 */ |
| 2223 public DiscardableReferencePool getReferencePool() { | 2223 public DiscardableReferencePool getReferencePool() { |
| 2224 return mReferencePool; | 2224 return mReferencePool; |
| 2225 } | 2225 } |
| 2226 } | 2226 } |
| OLD | NEW |