摘要:客户衍生需求,通过扫QR码快速获取设备基础信息,并且基于POS SDK进行打印。
1. 定位至device info的xml添加相关perference
Index: vendor/mediatek/proprietary/packages/apps/MtkSettings/res/xml/my_device_info.xml
===================================================================
--- vendor/mediatek/proprietary/packages/apps/MtkSettings/res/xml/my_device_info.xml (版本 346)
+++ vendor/mediatek/proprietary/packages/apps/MtkSettings/res/xml/my_device_info.xml (版本 347)
@@ -92,10 +92,17 @@
android:selectable="false"
android:title="@string/my_device_info_device_details_category_title">
+ <com.android.settings.widget.QRDeviceInfoPreference
+ android:key="qr_info"
+ android:order="18"
+ android:persistent="false"
+ android:selectable="false"
+ settings:controller="com.android.settings.deviceinfo.QRDeviceInfoPreferenceController" />
+
<!-- SIM status -->
<Preference
android:key="sim_status"
- android:order="18"
+ android:order="19"
android:title="@string/sim_status_title"
settings:keywords="@string/keywords_sim_status"
android:summary="@string/summary_placeholder"
Index: vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java
===================================================================
--- vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java (版本 346)
+++ vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/aboutphone/MyDeviceInfoFragment.java (版本 347)
@@ -41,6 +41,7 @@
+import com.android.settings.deviceinfo.QRDeviceInfoPreferenceController;
@@ -150,6 +151,7 @@
+ controllers.add(new QRDeviceInfoPreferenceController(context));
return controllers;
}
2. preference布局
Index: vendor/mediatek/proprietary/packages/apps/MtkSettings/res/layout/qr_device_info_preference.xml
===================================================================
--- vendor/mediatek/proprietary/packages/apps/MtkSettings/res/layout/qr_device_info_preference.xml (不存在的)
+++ vendor/mediatek/proprietary/packages/apps/MtkSettings/res/layout/qr_device_info_preference.xml (版本 347)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical" >
+
+ <ImageView
+ android:id="@+id/iv_qr_image"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"/>
+
+ <Button
+ android:id="@+id/print_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom|end"
+ android:paddingVertical="14dp"
+ android:drawableStart="@drawable/ic_print"
+ android:drawablePadding="9dp"
+ android:text="@string/print"
+ style="@style/ActionPrimaryButton"/>
+</FrameLayout>
Index: vendor/mediatek/proprietary/packages/apps/MtkSettings/res/drawable/ic_print.xml
===================================================================
--- vendor/mediatek/proprietary/packages/apps/MtkSettings/res/drawable/ic_print.xml (不存在的)
+++ vendor/mediatek/proprietary/packages/apps/MtkSettings/res/drawable/ic_print.xml (版本 347)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright 2017 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:pathData="M19,8L5,8c-1.66,0 -3,1.34 -3,3v6h4v4h12v-4h4v-6c0,-1.66 -1.34,-3 -3,-3zM16,19L8,19v-5h8v5zM19,12c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1 1,0.45 1,1 -0.45,1 -1,1zM18,3L6,3v4h12L18,3z"
+ android:fillColor="#FFFFFF"/>
+</vector>
3. 实现
QR码的生成使用的是google公开的com.google.zxing
Index: vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/QRDeviceInfoPreference.java
===================================================================
--- vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/QRDeviceInfoPreference.java (不存在的)
+++ vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/QRDeviceInfoPreference.java (版本 347)
@@ -0,0 +1,401 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.widget;
+
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.Canvas;
+import android.os.Build;
+import android.os.Environment;
+import android.os.Handler;
+import android.os.Message;
+import android.os.SystemProperties;
+import android.telephony.TelephonyManager;
+import android.text.TextUtils;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.Button;
+import android.widget.ImageView;
+
+import androidx.preference.Preference;
+import androidx.preference.PreferenceViewHolder;
+
+import com.android.settings.R;
+
+import com.google.zxing.BarcodeFormat;
+import com.google.zxing.EncodeHintType;
+import com.google.zxing.MultiFormatWriter;
+import com.google.zxing.WriterException;
+import com.google.zxing.common.BitMatrix;
+
+import com.pos.sdk.accessory.PosAccessoryManager;
+import com.pos.sdk.printer.PosPrinter;
+
+import java.lang.StringBuilder;
+import java.util.Hashtable;
+
+public class QRDeviceInfoPreference extends Preference {
+
+ private static final String TAG = "QRDeviceInfoPreference";
+
+ private static final int BLACK = 0xff000000;
+
+ private static final int PRINTER_ERROR_NO_PAPER = 1;
+ private static final int PRINTER_ERROR_OVER_HEAT = 2;
+ private static final int PRINTER_STATE_CHANGED = 3;
+ private static final int PRINTER_ERROR_NO_BATTERY = 4;
+
+ private Context mContext;
+ private Bitmap qrCodeBitmap;
+ private Button mPrintBtn;
+ private ImageView qrImgImageView;
+ private PosPrinter mPrinter;
+ private TelephonyManager mTelephonyManager;
+ private String mSpVersion, mDsn, mPsn;
+
+ private PosPrinter.EventListener mListener = new PosPrinter.EventListener() {
+ @Override
+ public void onInfo(PosPrinter printer, int what, int extra) {
+ Log.i(TAG, "onInfo: what= " + what + ", extra= " + extra);
+ if (what == PosPrinter.PRINTER_INFO_STATE_CHANGED) {
+ mHandler.sendMessage(mHandler.obtainMessage(PRINTER_STATE_CHANGED, extra, 0));
+ }
+ }
+
+ @Override
+ public void onError(PosPrinter printer, int what, int extra) {
+ switch(what) {
+ case PosPrinter.PRINTER_ERROR_NO_PAPER:
+ mHandler.sendEmptyMessage(PRINTER_ERROR_NO_PAPER);
+ break;
+ case PosPrinter.PRINTER_ERROR_OVER_HEAT:
+ Log.e(TAG, "PRINTER_ERROR_OVER_HEAT");
+ mHandler.sendEmptyMessage(PRINTER_ERROR_OVER_HEAT);
+ break;
+ case PosPrinter.PRINTER_ERROR_STATE:
+ Log.e(TAG, "PRINTER_ERROR_STATE");
+ if (extra == PosPrinter.PRINTER_STATE_NO_BATTERY) {
+ mHandler.sendEmptyMessage(PRINTER_ERROR_NO_BATTERY);
+ }
+ break;
+ default:
+ Log.e(TAG, "PRINTER_ERROR: " + what);
+ break;
+ }
+ }
+
+ @Override
+ public void onCursorChanged(PosPrinter printer, int x, int y, int lastX, int lastY) {
+ Log.d(TAG, "onCursorChanged: x= " + x + ", y= " + ", lastX= " + ", lastY=" + lastY);
+ }
+ };
+
+ private Handler mHandler = new Handler() {
+ public void handleMessage(Message msg) {
+ super.handleMessage(msg);
+ switch (msg.what) {
+ case PRINTER_ERROR_NO_PAPER: {
+ AlertDialog.Builder dlg = new AlertDialog.Builder(mContext);
+ dlg.setTitle(R.string.reload_paper);
+ dlg.setCancelable(false);
+ dlg.setPositiveButton(R.string.been_installed_paper, new DialogInterface.OnClickListener(){
+ @Override
+ public void onClick(DialogInterface dialog, int whichButton) {
+ mPrintBtn.setEnabled(false);
+ mHandler.post(mPrinterRunnable);
+ }
+ });
+ dlg.setNegativeButton(R.string.dlg_cancel, new DialogInterface.OnClickListener(){
+ @Override
+ public void onClick(DialogInterface dialog, int whichButton) {
+ mPrintBtn.setEnabled(true);
+ }
+ });
+ dlg.show();
+ break;
+ }
+ case PRINTER_ERROR_OVER_HEAT: {
+ AlertDialog.Builder dlg = new AlertDialog.Builder(mContext);
+ dlg.setTitle(R.string.printer_overheat);
+ dlg.setMessage(R.string.printer_overheat_summary);
+ dlg.setCancelable(false);
+ dlg.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener(){
+ @Override
+ public void onClick(DialogInterface dialog, int whichButton) {
+ mPrintBtn.setEnabled(true);
+ }
+ });
+ dlg.show();
+ break;
+ }
+ case PRINTER_ERROR_NO_BATTERY: {
+ AlertDialog.Builder dlg = new AlertDialog.Builder(mContext);
+ dlg.setTitle(R.string.printer_no_battery);
+ dlg.setMessage(R.string.printer_no_battery_summary);
+ dlg.setCancelable(false);
+ dlg.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener(){
+ @Override
+ public void onClick(DialogInterface dialog, int whichButton) {
+ mPrintBtn.setEnabled(true);
+ }
+ });
+ dlg.show();
+ break;
+ }
+ case PRINTER_STATE_CHANGED:
+ if (msg.arg1 == PosPrinter.PRINTER_STATE_PRINTING) {
+ mPrintBtn.setEnabled(false);
+ } else {
+ mPrintBtn.setEnabled(true);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ };
+
+ public QRDeviceInfoPreference(Context context, AttributeSet attributeSet) {
+ this(context, attributeSet, 0);
+ }
+
+ public QRDeviceInfoPreference(Context context, AttributeSet attributeSet, int paramInt) {
+ super(context, attributeSet, paramInt);
+ setLayoutResource(R.layout.qr_device_info_preference);
+ mContext = context;
+ mTelephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
+ mDsn = mTelephonyManager.getDsn(mContext);
+ mPsn = mTelephonyManager.getPsn(mContext);
+ mSpVersion = PosAccessoryManager.getDefault().getSpVersion();
+
+ int ret = -1;
+ int numOfPrinter = PosPrinter.getNumberOfPrinters();
+ if (numOfPrinter > 0) {
+ mPrinter = PosPrinter.open();
+ if (mPrinter != null) {
+ mPrinter.setOnEventListener(mListener);
+ ret = 0;
+ }
+ }
+ if (ret == -1) {
+ Log.d(TAG, "no printer");
+ }
+ }
+
+ @Override
+ public void onBindViewHolder(PreferenceViewHolder view) {
+ super.onBindViewHolder(view);
+
+ mPrintBtn = (Button) view.findViewById(R.id.print_button);
+ mPrintBtn.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ mHandler.post(mPrinterRunnable);
+ }
+ });
+
+ qrImgImageView = (ImageView) view.findViewById(R.id.iv_qr_image);
+ qrImgImageView.setEnabled(false);
+ qrImgImageView.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ showDialog();
+ }
+ });
+ qrImgImageView.setOnLongClickListener(new View.OnLongClickListener() {
+ @Override
+ public boolean onLongClick(View v) {
+ if (qrCodeBitmap != null) {
+ print(qrCodeBitmap);
+ }
+ return true;
+ }
+ });
+
+ try {
+ String contentString = getDeviceInfo();
+ if (!TextUtils.isEmpty(contentString)) {
+ qrCodeBitmap = createQRCode(contentString, 350);
+ qrImgImageView.setImageBitmap(qrCodeBitmap);
+ }
+ } catch (WriterException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ private Bitmap createQRCode(String str,int widthAndHeight) throws WriterException {
+ Hashtable<EncodeHintType, String> hints = new Hashtable<EncodeHintType, String>();
+ hints.put(EncodeHintType.CHARACTER_SET, "utf-8");
+ BitMatrix matrix = new MultiFormatWriter().encode(str,
+ BarcodeFormat.QR_CODE, widthAndHeight, widthAndHeight);
+ int width = matrix.getWidth();
+ int height = matrix.getHeight();
+ int[] pixels = new int[width * height];
+
+ for (int y = 0; y < height; y++) {
+ for (int x = 0; x < width; x++) {
+ if (matrix.get(x, y)) {
+ pixels[y * width + x] = BLACK;
+ }
+ }
+ }
+ Bitmap bitmap = Bitmap.createBitmap(width, height,
+ Bitmap.Config.ARGB_8888);
+ bitmap.setPixels(pixels, 0, width, 0, 0, width, height);
+
+ // add logo
+ Bitmap brandBitmap = BitmapFactory.decodeResource(mContext.getResources(), R.mipmap.smartpeak);
+ if (brandBitmap != null) {
+ bitmap = addLogoToQRCode(bitmap, brandBitmap);
+ }
+ return bitmap;
+ }
+
+ private Bitmap addLogoToQRCode(Bitmap qrCodeBitmap, Bitmap logoBitmap) {
+ if (qrCodeBitmap == null) {
+ Log.d(TAG, "addLogoToQRCode::qrCodeBitmap is null");
+ return null;
+ }
+
+ if (logoBitmap == null) {
+ Log.d(TAG, "addLogoToQRCode::logoBitmap is null");
+ return qrCodeBitmap;
+ }
+
+ int qrWidth = qrCodeBitmap.getWidth();
+ int qrHeight = qrCodeBitmap.getHeight();
+ int logoWidth = logoBitmap.getWidth();
+ int logoHeight = logoBitmap.getHeight();
+
+ if (qrWidth == 0 || qrHeight == 0) {
+ Log.d(TAG, "addLogoToQRCode::qrCodeBitmap size is wrong");
+ return null;
+ }
+
+ if (logoWidth == 0 || logoHeight == 0) {
+ Log.d(TAG, "addLogoToQRCode::logoBitmap size is wrong");
+ return qrCodeBitmap;
+ }
+
+ float scaleFactor = qrWidth * 1.0f / 5 / logoWidth;
+ Bitmap resultBitmap = Bitmap.createBitmap(qrWidth, qrHeight, qrCodeBitmap.getConfig());
+ Canvas canvas = new Canvas(resultBitmap);
+ canvas.drawBitmap(qrCodeBitmap, 0, 0, null);
+
+ canvas.scale(scaleFactor, scaleFactor, qrWidth / 2, qrHeight / 2);
+ canvas.drawBitmap(logoBitmap, (qrWidth - logoWidth) / 2, (qrHeight - logoHeight) / 2, null);
+ canvas.save(Canvas.ALL_SAVE_FLAG);
+ canvas.restore();
+
+ return resultBitmap;
+ }
+
+ private void print(Bitmap bitmap) {
+ int num = PosPrinter.getNumberOfPrinters();
+ if (num > 0) {
+ mPrinter = PosPrinter.open();
+ mPrinter.printBitmap(bitmap);
+ }
+ }
+
+ private void showDialog() {
+ AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
+ final View dialogView = LayoutInflater.from(mContext).inflate(R.layout.qr_device_info_preference, null);
+ ImageView mImageView = (ImageView) dialogView.findViewById(R.id.iv_qr_image);
+ mImageView.setImageBitmap(qrCodeBitmap);
+ builder.setView(dialogView);
+ builder.setPositiveButton(R.string.print_settings, new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ if (qrCodeBitmap != null) {
+ print(qrCodeBitmap);
+ }
+ }
+ });
+ builder.show();
+ }
+
+ private String getDeviceInfo() {
+ String model = "Model:" + Build.MODEL;
+ String dsn = "DSN:" + mDsn;
+ String psn = "PSN:" + mPsn;
+ String ap_version = "AP:" + SystemProperties.get("ro.build.sw.version");
+ String sp_version = "SP:" + mSpVersion;
+ String modem_version = "Modem:" + Build.getRadioVersion();
+ StringBuilder sb = new StringBuilder();
+ sb.append(model + "\n");
+ sb.append(dsn + "\n");
+ sb.append(psn + "\n");
+ sb.append(ap_version + "\n");
+ sb.append(sp_version + "\n");
+ sb.append(modem_version + "\n");
+ return sb.toString();
+ }
+
+ private Runnable mPrinterRunnable = new Runnable(){
+ @Override
+ public void run() {
+ mPrinter.cleanCache();
+ PosPrinter.Parameters param = mPrinter.getParameters();
+
+ param.setPrintAlign(param.ALIGH_CENTER);
+ mPrinter.setParameters(param);
+ Bitmap brandBitmap = BitmapFactory.decodeResource(mContext.getResources(), R.mipmap.smartpeak);
+ if (brandBitmap != null) {
+ mPrinter.addBitmapToCache(brandBitmap);
+ }
+
+ param.setFontSize(30);
+ param.setPrintAlign(param.ALIGH_CENTER);
+ param.setFontName(Environment.getRootDirectory().toString() + "/fonts/DroidSansMono.ttf");
+ param.setFontEffet(param.EFFECT_BOLD);
+ mPrinter.setParameters(param);
+ mPrinter.addTextToCurCache("---" + mContext.getResources().getString(R.string.device_info) + "---");
+
+ param.setFontSize(24);
+ param.setPrintAlign(param.ALIGH_LEFT);
+ param.setFontName(Environment.getRootDirectory().toString() + "/fonts/Roboto-Italic.ttf");
+ param.setFontEffet(param.EFFECT_NONE);
+ mPrinter.setParameters(param);
+ mPrinter.addTextToCurCache("Model: " + Build.MODEL);
+ mPrinter.addTextToCurCache("AP: " + SystemProperties.get("ro.build.sw.version"));
+ mPrinter.addTextToCurCache("SP: " + mSpVersion);
+ mPrinter.addTextToCurCache("DSN: " + mDsn);
+ mPrinter.addTextToCurCache("PSN: " + mPsn);
+ mPrinter.addTextToCurCache("Modem: " + Build.getRadioVersion());
+
+ param.setFontSize(18);
+ param.setPrintAlign(param.ALIGH_CENTER);
+ param.setFontName(Environment.getRootDirectory().toString() + "/fonts/DroidSansMono.ttf");
+ param.setFontEffet(param.EFFECT_LEAN);
+ mPrinter.setParameters(param);
+ mPrinter.addTextToCurCache("-----" + mContext.getResources().getString(R.string.website) + "-----");
+
+ if (qrCodeBitmap != null) {
+ mPrinter.addBitmapToCache(qrCodeBitmap);
+ }
+ mPrinter.addTextToCurCache("\n\n\n");
+ mPrinter.print();
+ }
+ };
+}
4. 控制preference是否显示
Index: vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values/config.xml
===================================================================
--- vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values/config.xml (版本 346)
+++ vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values/config.xml (版本 347)
@@ -649,4 +649,6 @@
+
+ <bool name="config_show_qr_info">true</bool>
</resources>
Index: vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/QRDeviceInfoPreferenceController.java
===================================================================
--- vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/QRDeviceInfoPreferenceController.java (不存在的)
+++ vendor/mediatek/proprietary/packages/apps/MtkSettings/src/com/android/settings/deviceinfo/QRDeviceInfoPreferenceController.java (版本 347)
@@ -0,0 +1,35 @@
+package com.android.settings.deviceinfo;
+
+import android.content.Context;
+import androidx.preference.PreferenceScreen;
+
+import com.android.settings.R;
+import com.android.settings.core.BasePreferenceController;
+import com.android.settings.widget.QRDeviceInfoPreference;
+
+public class QRDeviceInfoPreferenceController extends BasePreferenceController {
+ private static final String PREF_KEY = "qr_info";
+ private QRDeviceInfoPreference mPreference;
+
+ public QRDeviceInfoPreferenceController(Context context) {
+ super(context, PREF_KEY);
+ }
+
+ @Override
+ public void displayPreference(PreferenceScreen screen) {
+ super.displayPreference(screen);
+ mPreference = (QRDeviceInfoPreference) screen.findPreference(PREF_KEY);
+ }
+
+ @Override
+ public int getAvailabilityStatus() {
+ return mContext.getResources()
+ .getBoolean(R.bool.config_show_qr_info)
+ ? AVAILABLE : DISABLED_FOR_USER;
+ }
+
+ @Override
+ public String getPreferenceKey() {
+ return PREF_KEY;
+ }
+}
5. 相关字串
Index: vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values/strings.xml
===================================================================
--- vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values/strings.xml (版本 346)
+++ vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values/strings.xml (版本 347)
@@ -364,4 +364,15 @@
+
+ <string name="print">print</string>
+ <string name="reload_paper">reload paper</string>
+ <string name="dlg_cancel">cancel</string>
+ <string name="been_installed_paper">paper ready</string>
+ <string name="printer_overheat">printer overheat</string>
+ <string name="printer_overheat_summary">printer overheat, please try again later</string>
+ <string name="printer_no_battery">printer no battery</string>
+ <string name="printer_no_battery_summary">no battery, please install the battery and try again</string>
+ <string name="device_info">DEVICE INFO</string>
+ <string name="website">www.xxx.cn</string>
</resources>
Index: vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values-zh-rCN/strings.xml
===================================================================
--- vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values-zh-rCN/strings.xml (版本 346)
+++ vendor/mediatek/proprietary/packages/apps/MtkSettings/res/values-zh-rCN/strings.xml (版本 347)
@@ -386,4 +386,15 @@
+ <string name="print">打印</string>
+ <string name="reload_paper">请重新装纸</string>
+ <string name="dlg_cancel">"取消"</string>
+ <string name="been_installed_paper">已经装好纸</string>
+ <string name="printer_overheat">温度过热</string>
+ <string name="printer_overheat_summary">打印机温度过热,请稍候再试</string>
+ <string name="printer_no_battery">没有电池</string>
+ <string name="printer_no_battery_summary">未安装电池,请安装电池再试</string>
+ <string name="no_printer">没有找到打印机</string>
+ <string name="no_printer_summary">没有找到打印机,请检查打印硬件是否正常</string>
+ <string name="device_info">设备信息</string>
</resources>