RK Android7.1 设置 内存条作假

RK Android7.1 设置 内存条作假,第1张

概述一.packages\apps\Settings\res\xml\process_stats_summary.xml<PreferenceCategoryandroid:title="@string/average_memory_use"android:layout="@layout/preference_category_short"/><com.android.settin

一.packages\apps\Settings\res\xml\process_stats_summary.xml

    <Preferencecategory        androID:title="@string/average_memory_use"        androID:layout="@layout/preference_category_short" />    <com.androID.settings.SummaryPreference        androID:key="status_header"        androID:selectable="false" /> 

二.内存 ProcessstatsSummary

--- a/packages/apps/Settings/src/com/androID/settings/applications/ProcessstatsSummary.java+++ b/packages/apps/Settings/src/com/androID/settings/applications/ProcessstatsSummary.java@@ -28,6 +28,7 @@ import com.androID.settings.SummaryPreference; import com.androID.settings.Utils; import com.androID.settings.applications.ProcStatsData.MemInfo; import com.androID.settings.dashboard.SummaryLoader;+import androID.util.Log;  public class ProcessstatsSummary extends ProcessstatsBase implements OnPreferenceClickListener { @@ -69,10 +70,13 @@ public class ProcessstatsSummary extends ProcessstatsBase implements OnPreferenc          double usedRam = memInfo.realUsedRam;         double totalRam = memInfo.realTotalRam;+		 double totalRam2 = totalRam*2;         double freeRam = memInfo.realFreeRam;         BytesResult usedResult = Formatter.formatBytes(context.getResources(), (long) usedRam,                 Formatter.FLAG_SHORTER);         String totalString = Formatter.formatShortfileSize(context, (long) totalRam);+		Log.d("gatsby","totalString->"+totalString);+		Log.d("gatsby","totalRam->"+(long) totalRam);         String freeString = Formatter.formatShortfileSize(context, (long) freeRam);         CharSequence memString;         CharSequence[] memStatesstr = getResources().getTextArray(R.array.ram_states);@@ -85,12 +89,17 @@ public class ProcessstatsSummary extends ProcessstatsBase implements OnPreferenc         mSummaryPref.setAmount(usedResult.value);         mSummaryPref.setUnits(usedResult.units);         float usedratio = (float)(usedRam / (freeRam + usedRam));-        mSummaryPref.setRatios(usedratio, 0, 1 - usedratio);+		float usedratio2 = usedratio / 2;+		//mSummaryPref.setRatios(usedratio, 0, 1 - usedratio);+        mSummaryPref.setRatios(usedratio2, 0, 1 - usedratio2);          mPerformance.setSummary(memString);-        mTotalMemory.setSummary(totalString);-        mAverageUsed.setSummary(Utils.formatPercentage((long) usedRam, (long) totalRam));-        mFree.setSummary(freeString);+        //mTotalMemory.setSummary(totalString);+		mTotalMemory.setSummary("4GB");+        //mAverageUsed.setSummary(Utils.formatPercentage((long) usedRam, (long) totalRam));+		mAverageUsed.setSummary(Utils.formatPercentage((long) usedRam, ((long) totalRam)*2));+        //mFree.setSummary(freeString);+		mFree.setSummary("3GB");         String durationString = getString(sDurationLabels[mDurationIndex]);         int numApps = mStatsManager.getEntrIEs().size();         mAppListPreference.setSummary(getResources().getQuantityString(

 三.改完

  

总结

以上是内存溢出为你收集整理的RK Android7.1 设置 内存条作假全部内容,希望文章能够帮你解决RK Android7.1 设置 内存条作假所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/999714.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-21
下一篇 2022-05-21

发表评论

登录后才能评论

评论列表(0条)

保存