blob: a2ea9babc4a98de60b748853ebae4a20f6bc8662 [file] [log] [blame]
roger xueb292bf22017-03-02 16:05:00 -08001/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
15 */
16
17package com.android.car.settings.system;
18
19import android.os.Build;
20
21import com.android.car.settings.common.ListSettingsActivity;
22import com.android.car.settings.common.SimpleTextLineItem;
23import com.android.car.settings.common.TypedPagedListAdapter;
24import com.android.car.settings.R;
25import com.android.settingslib.DeviceInfoUtils;
26
27import java.util.ArrayList;
28
29/**
30 * Shows basic info about the system and provide some actions like update, reset etc.
31 */
32public class AboutSettingsActivity extends ListSettingsActivity {
33
34 @Override
35 public ArrayList<TypedPagedListAdapter.LineItem> getLineItems() {
36 ArrayList<TypedPagedListAdapter.LineItem> lineItems = new ArrayList<>();
37 lineItems.add(new SimpleTextLineItem(
38 getText(R.string.model_info), Build.MODEL + DeviceInfoUtils.getMsvSuffix()));
39 lineItems.add(new SimpleTextLineItem(
40 getText(R.string.firmware_version),
41 getString(R.string.about_summary, Build.VERSION.RELEASE)));
42 lineItems.add(new SimpleTextLineItem(
43 getText(R.string.security_patch), DeviceInfoUtils.getSecurityPatch()));
44 lineItems.add(new SimpleTextLineItem(
45 getText(R.string.kernel_version), DeviceInfoUtils.getFormattedKernelVersion()));
46 lineItems.add(new SimpleTextLineItem(
47 getText(R.string.build_number), Build.DISPLAY));
48 return lineItems;
49 }
50}