• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
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 
17 package com.android.car.settings.system;
18 
19 import android.os.Build;
20 
21 import com.android.car.settings.common.ListSettingsActivity;
22 import com.android.car.settings.common.SimpleTextLineItem;
23 import com.android.car.settings.common.TypedPagedListAdapter;
24 import com.android.car.settings.R;
25 import com.android.settingslib.DeviceInfoUtils;
26 
27 import java.util.ArrayList;
28 
29 /**
30  * Shows basic info about the system and provide some actions like update, reset etc.
31  */
32 public class AboutSettingsActivity extends ListSettingsActivity {
33 
34     @Override
getLineItems()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 }
51