chromium/chrome/browser/feedback/android/java/src/org/chromium/chrome/browser/feedback/LowEndDeviceFeedbackSource.java

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.chrome.browser.feedback;

import org.chromium.base.SysUtils;

import java.util.HashMap;
import java.util.Map;

/** Provides data about whether the feedback comes from a low-end device. */
public class LowEndDeviceFeedbackSource implements FeedbackSource {
    private static final String LOW_END_DEVICE_KEY = "lowmem";
    private final HashMap<String, String> mMap;

    LowEndDeviceFeedbackSource() {
        mMap = new HashMap<String, String>(1);
        mMap.put(LOW_END_DEVICE_KEY, Boolean.toString(SysUtils.isLowEndDevice()));
    }

    @Override
    public Map<String, String> getFeedback() {
        return mMap;
    }
}