中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當(dāng)前位置: 首頁(yè) > news >正文

大安網(wǎng)站建設(shè)網(wǎng)站制作公司有哪些

大安網(wǎng)站建設(shè),網(wǎng)站制作公司有哪些,網(wǎng)站建設(shè)科技公司外部環(huán)境分析,煙臺(tái)門(mén)戶網(wǎng)站建設(shè)在工作中,對(duì)于系統(tǒng)開(kāi)發(fā)確實(shí)有些難度,特別是在開(kāi)機(jī)階段遇到的問(wèn)題,比如開(kāi)機(jī)動(dòng)畫(huà)播放完畢進(jìn)入鎖屏界面黑屏幾秒然后進(jìn)入 鎖屏界面,這就需要根據(jù)開(kāi)機(jī)日志來(lái)分析問(wèn)題所在,在工作中遇到的幾種黑屏情況做下記錄首次開(kāi)機(jī)進(jìn)入L…

在工作中,對(duì)于系統(tǒng)開(kāi)發(fā)確實(shí)有些難度,特別是在開(kāi)機(jī)階段遇到的問(wèn)題,比如開(kāi)機(jī)動(dòng)畫(huà)播放完畢進(jìn)入鎖屏界面黑屏幾秒然后進(jìn)入 鎖屏界面,這就需要根據(jù)開(kāi)機(jī)日志來(lái)分析問(wèn)題所在,在工作中遇到的幾種黑屏情況做下記錄

  1. 首次開(kāi)機(jī)進(jìn)入Launcher3前黑屏幾秒的幾種情況問(wèn)題的總結(jié)

2.1 開(kāi)機(jī)向?qū)б鸬倪M(jìn)入Launcher桌面短暫黑屏

在系統(tǒng)中默認(rèn)是有開(kāi)機(jī)向?qū)У?#xff0c;首次開(kāi)機(jī)會(huì)首選進(jìn)入開(kāi)機(jī)向?qū)?#xff0c;然后進(jìn)入鎖屏桌面,如果某些原因 引起開(kāi)機(jī)向?qū)ЭD,會(huì)造成短暫黑屏然后進(jìn)入Launcher界面 去掉開(kāi)機(jī)向?qū)У南嚓P(guān)修改為: frameworks/base/packages/SettingsProvider/res/values/defaults.xml

<!--本文的關(guān)鍵屬性======默認(rèn)是否開(kāi)啟跳過(guò)開(kāi)機(jī)向?qū)?->

<bool name="def_user_setup_complete">false</bool>

<!--設(shè)備是否已經(jīng)提供,開(kāi)機(jī)首次是否進(jìn)入鎖屏界面 -->

<bool name="def_device_provisioned">false</bool>

 可以修改如下:
frameworks/base/packages/SettingsProvider/res/values/defaults.xml
<bool name="def_user_setup_complete">true</bool>
<bool name="def_device_provisioned">true</bool>
再在產(chǎn)品mk中去掉這兩個(gè)app:
packages/apps/OneTimeInitializer
packages/apps/Provision
在build的handheld_product.mk中參與編譯這兩個(gè)apk
$(call inherit-product, $(SRC_TARGET_DIR)/product/media_product.mk)# /product packages
PRODUCT_PACKAGES += \Camera2 \DeskClock \LatinIME \Launcher3QuickStep \OneTimeInitializer \Provision \Music \Settings \SettingsIntelligence \StorageManager \SystemUI \WallpaperCropper \frameworks-base-overlaysPRODUCT_PACKAGES_DEBUG += \frameworks-base-overlays-debug修改如下:
build\make\target\product\handheld_product.mk
$(call inherit-product, $(SRC_TARGET_DIR)/product/media_product.mk)# /product packages
PRODUCT_PACKAGES += \Camera2 \DeskClock \LatinIME \Launcher3QuickStep \
-    OneTimeInitializer \
-    Provision \Music \Settings \SettingsIntelligence \StorageManager \SystemUI \WallpaperCropper \frameworks-base-overlaysPRODUCT_PACKAGES_DEBUG += \frameworks-base-overlays-debug

讓系統(tǒng)直接啟動(dòng)桌面,不用啟動(dòng)Provision。Provision干的事情和SetupWizard、 OneTimeInitializer類(lèi)似。都是設(shè)置DEVICE_PROVISIONED和USER_SETUP_COMPLETE。

2.2 開(kāi)機(jī)動(dòng)畫(huà)引起的進(jìn)入launcher前的黑屏情況

在系統(tǒng)進(jìn)入首次開(kāi)機(jī)的時(shí)候,由于需要加載相當(dāng)多的系統(tǒng)數(shù)據(jù)和服務(wù),首次開(kāi)機(jī)耗時(shí)會(huì)長(zhǎng)一點(diǎn),如果 開(kāi)機(jī)動(dòng)畫(huà)過(guò)少,在播放完開(kāi)機(jī)動(dòng)畫(huà)以后,還沒(méi)等到AMS執(zhí)行完停止播放動(dòng)畫(huà)的相關(guān)通知,就會(huì)陷入 黑屏狀態(tài)等得到AMS停止播放動(dòng)畫(huà)以后就會(huì)進(jìn)入桌面

 
frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.javafinal void finishBooting() {Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "FinishBooting");synchronized (this) {if (!mBootAnimationComplete) {mCallFinishBooting = true;return;}mCallFinishBooting = false;}ArraySet<String> completedIsas = new ArraySet<String>();for (String abi : Build.SUPPORTED_ABIS) {ZYGOTE_PROCESS.establishZygoteConnectionForAbi(abi);final String instructionSet = VMRuntime.getInstructionSet(abi);if (!completedIsas.contains(instructionSet)) {try {mInstaller.markBootComplete(VMRuntime.getInstructionSet(abi));} catch (InstallerException e) {if (!VMRuntime.didPruneDalvikCache()) {// This is technically not the right filter, as different zygotes may// have made different pruning decisions. But the log is best effort,// anyways.Slog.w(TAG, "Unable to mark boot complete for abi: " + abi + " (" +e.getMessage() +")");}}completedIsas.add(instructionSet);}}IntentFilter pkgFilter = new IntentFilter();pkgFilter.addAction(Intent.ACTION_QUERY_PACKAGE_RESTART);pkgFilter.addDataScheme("package");mContext.registerReceiver(new BroadcastReceiver() {@Overridepublic void onReceive(Context context, Intent intent) {String[] pkgs = intent.getStringArrayExtra(Intent.EXTRA_PACKAGES);if (pkgs != null) {for (String pkg : pkgs) {synchronized (ActivityManagerService.this) {if (forceStopPackageLocked(pkg, -1, false, false, false, false, false,0, "query restart")) {setResultCode(Activity.RESULT_OK);return;}}}}}}, pkgFilter);IntentFilter dumpheapFilter = new IntentFilter();dumpheapFilter.addAction(DumpHeapActivity.ACTION_DELETE_DUMPHEAP);mContext.registerReceiver(new BroadcastReceiver() {@Overridepublic void onReceive(Context context, Intent intent) {final long delay = intent.getBooleanExtra(DumpHeapActivity.EXTRA_DELAY_DELETE, false) ? 5 * 60 * 1000 : 0;mHandler.sendEmptyMessageDelayed(DELETE_DUMPHEAP_MSG, delay);}}, dumpheapFilter);// Inform checkpointing systems of successtry {// This line is needed to CTS test for the correct exception handling// See b/138952436#comment36 for contextSlog.i(TAG, "About to commit checkpoint");IStorageManager storageManager = PackageHelper.getStorageManager();storageManager.commitChanges();} catch (Exception e) {PowerManager pm = (PowerManager)mContext.getSystemService(Context.POWER_SERVICE);pm.reboot("Checkpoint commit failed");}// Let system services know.mSystemServiceManager.startBootPhase(SystemService.PHASE_BOOT_COMPLETED);synchronized (this) {// Ensure that any processes we had put on hold are now started// up.final int NP = mProcessesOnHold.size();if (NP > 0) {ArrayList<ProcessRecord> procs =new ArrayList<ProcessRecord>(mProcessesOnHold);for (int ip=0; ip<NP; ip++) {if (DEBUG_PROCESSES) Slog.v(TAG_PROCESSES, "Starting process on hold: "+ procs.get(ip));mProcessList.startProcessLocked(procs.get(ip), new HostingRecord("on-hold"));}}if (mFactoryTest == FactoryTest.FACTORY_TEST_LOW_LEVEL) {return;}// Start looking for apps that are abusing wake locks.Message nmsg = mHandler.obtainMessage(CHECK_EXCESSIVE_POWER_USE_MSG);mHandler.sendMessageDelayed(nmsg, mConstants.POWER_CHECK_INTERVAL);// Tell anyone interested that we are done booting!SystemProperties.set("sys.boot_completed", "1");// And trigger dev.bootcomplete if we are not showing encryption progressif (!"trigger_restart_min_framework".equals(VoldProperties.decrypt().orElse(""))|| "".equals(VoldProperties.encrypt_progress().orElse(""))) {SystemProperties.set("dev.bootcomplete", "1");}//發(fā)送有序的開(kāi)機(jī)廣播ACTION_LOCKED_BOOT_COMPLETEDmUserController.sendBootCompleted(new IIntentReceiver.Stub() {@Overridepublic void performReceive(Intent intent, int resultCode,String data, Bundle extras, boolean ordered,boolean sticky, int sendingUser) {synchronized (ActivityManagerService.this) {mOomAdjuster.mAppCompact.compactAllSystem();requestPssAllProcsLocked(SystemClock.uptimeMillis(), true, false);}}});mUserController.scheduleStartProfiles();}Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);}在SurfaceFlinger.bootFinished中停止動(dòng)畫(huà)相關(guān)方法
frameworks/native/services/surfaceflinger/SurfaceFlinger.cpp
void SurfaceFlinger::bootFinished(){if (mBootFinished == true) {ALOGE("Extra call to bootFinished");return;}mBootFinished = true;if (mStartPropertySetThread->join() != NO_ERROR) {ALOGE("Join StartPropertySetThread failed!");}const nsecs_t now = systemTime();const nsecs_t duration = now - mBootTime;ALOGI("Boot is finished (%ld ms)", long(ns2ms(duration)) );mFrameTracer->initialize();mTimeStats->onBootFinished();// wait patiently for the window manager deathconst String16 name("window");mWindowManager = defaultServiceManager()->getService(name);if (mWindowManager != 0) {mWindowManager->linkToDeath(static_cast<IBinder::DeathRecipient*>(this));}sp<IBinder> input(defaultServiceManager()->getService(String16("inputflinger")));if (input == nullptr) {ALOGE("Failed to link to input service");} else {mInputFlinger = interface_cast<IInputFlinger>(input);}if (mVrFlinger) {mVrFlinger->OnBootFinished();}// stop boot animation// formerly we would just kill the process, but we now ask it to exit so it// can choose where to stop the animation.property_set("service.bootanim.exit", "1");const int LOGTAG_SF_STOP_BOOTANIM = 60110;LOG_EVENT_LONG(LOGTAG_SF_STOP_BOOTANIM,ns2ms(systemTime(SYSTEM_TIME_MONOTONIC)));static_cast<void>(schedule([this] {readPersistentProperties();mPowerAdvisor.onBootFinished();mBootStage = BootStage::FINISHED;if (property_get_bool("sf.debug.show_refresh_rate_overlay", false)) {enableRefreshRateOverlay(true);}}));}
在BootAnimation.cpp退出動(dòng)畫(huà)的相關(guān)方法
frameworks/base/cmds/bootanimation/BootAnimation.cppvoid BootAnimation::checkExit() {// Allow surface flinger to gracefully request shutdownchar value[PROPERTY_VALUE_MAX];property_get(EXIT_PROP_NAME, value, "0");int exitnow = atoi(value);if (exitnow) {requestExit();mCallbacks->shutdown();}}

在項(xiàng)目中遇到開(kāi)機(jī)動(dòng)畫(huà)只有幾張的項(xiàng)目 在首次開(kāi)機(jī)的時(shí)候會(huì)出現(xiàn)黑屏 把開(kāi)機(jī)動(dòng)畫(huà)增加到30張左右的就解決了這個(gè)問(wèn)題

2.3 FallbackHome導(dǎo)致的黑屏問(wèn)題

在無(wú)鎖屏的情況下 會(huì)在開(kāi)機(jī)動(dòng)畫(huà)播放完畢后進(jìn)入系統(tǒng)設(shè)置的FallbackHome,等收到解鎖通知后 然后進(jìn)入默認(rèn)桌面,這時(shí)可以在onCreate設(shè)置開(kāi)機(jī)動(dòng)畫(huà)最后一張作為背景

 public class FallbackHome extends Activity {private static final String TAG = "FallbackHome";private static final int PROGRESS_TIMEOUT = 2000;private boolean mProvisioned;private WallpaperManager mWallManager;private final Runnable mProgressTimeoutRunnable = () -> {View v = getLayoutInflater().inflate(R.layout.fallback_home_finishing_boot, null /* root */);setContentView(v);v.setAlpha(0f);v.animate().alpha(1f).setDuration(500).setInterpolator(AnimationUtils.loadInterpolator(this, android.R.interpolator.fast_out_slow_in)).start();getWindow().addFlags(LayoutParams.FLAG_KEEP_SCREEN_ON);};private final OnColorsChangedListener mColorsChangedListener = new OnColorsChangedListener() {@Overridepublic void onColorsChanged(WallpaperColors colors, int which) {if (colors != null) {final View decorView = getWindow().getDecorView();decorView.setSystemUiVisibility(updateVisibilityFlagsFromColors(colors, decorView.getSystemUiVisibility()));mWallManager.removeOnColorsChangedListener(this);}}};@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);// Set ourselves totally black before the device is provisioned so that// we don't flash the wallpaper before SUWmProvisioned = Settings.Global.getInt(getContentResolver(),Settings.Global.DEVICE_PROVISIONED, 0) != 0;final int flags;if (!mProvisioned) {setTheme(R.style.FallbackHome_SetupWizard);flags = View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;} else {flags = View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;}mWallManager = getSystemService(WallpaperManager.class);if (mWallManager == null) {Log.w(TAG, "Wallpaper manager isn't ready, can't listen to color changes!");} else {loadWallpaperColors(flags);}getWindow().getDecorView().setSystemUiVisibility(flags);// 增加背景
+     getWindow().setBackgroundDrawableResource(R.drawable.background);registerReceiver(mReceiver, new IntentFilter(Intent.ACTION_USER_UNLOCKED));maybeFinish();}@Overrideprotected void onResume() {super.onResume();if (mProvisioned) {mHandler.postDelayed(mProgressTimeoutRunnable, PROGRESS_TIMEOUT);}}
}
第二種改法
<FrameLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"-   android:background="#80000000"+  android:background="@drawable/bg"android:forceHasOverlappingRendering="false"><LinearLayoutandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:orientation="vertical"android:layout_gravity="center"android:layout_marginStart="16dp"android:layout_marginEnd="16dp"><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:textSize="20sp"android:textColor="?android:attr/textColorPrimary"android:text="@*android:string/android_start_title"/><ProgressBarstyle="@android:style/Widget.Material.ProgressBar.Horizontal"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_marginTop="12.75dp"android:colorControlActivated="?android:attr/textColorPrimary"android:indeterminate="true"/></LinearLayout>
</FrameLayout>

總結(jié):這三種情況目前是開(kāi)發(fā)中,遇到常見(jiàn)的情況,具體情況可以根據(jù)開(kāi)機(jī)日子分析來(lái)解決相關(guān)的問(wèn)題

http://www.risenshineclean.com/news/47530.html

相關(guān)文章:

  • 如何尋找一批做網(wǎng)站的公司查看今日頭條
  • 開(kāi)發(fā)網(wǎng)站比較好的公司公司網(wǎng)絡(luò)搭建
  • 滄州網(wǎng)站建沒(méi)搜狗營(yíng)銷(xiāo)
  • 做網(wǎng)站 科目今天發(fā)生的新聞
  • 本地房產(chǎn)交易信息網(wǎng)人員優(yōu)化方案
  • 濰坊專科學(xué)校深圳seo排名
  • 諸城網(wǎng)站建設(shè)電子商務(wù)網(wǎng)店運(yùn)營(yíng)推廣
  • 開(kāi)個(gè)網(wǎng)站需要什么條件福建省人民政府
  • 東營(yíng)定制網(wǎng)站建設(shè)服務(wù)成人編程培訓(xùn)機(jī)構(gòu)排名前十
  • 免費(fèi)主機(jī)空間網(wǎng)絡(luò)營(yíng)銷(xiāo)優(yōu)化培訓(xùn)
  • 在線注冊(cè)個(gè)體工商戶企業(yè)seo關(guān)鍵詞優(yōu)化
  • 免費(fèi)行情網(wǎng)站北京sem
  • 西寧微信網(wǎng)站建設(shè)需要多少錢(qián)網(wǎng)店運(yùn)營(yíng)與推廣
  • dede建設(shè)網(wǎng)站教程sem推廣
  • 商務(wù)部網(wǎng)站建設(shè)情況匯報(bào)公司seo排名優(yōu)化
  • 如何制作一個(gè)自己的網(wǎng)站中國(guó)十大經(jīng)典廣告
  • 做網(wǎng)絡(luò)銷(xiāo)售都做什么網(wǎng)站饑餓營(yíng)銷(xiāo)的十大案例
  • 佛山專業(yè)網(wǎng)站營(yíng)銷(xiāo)seo是什么意思網(wǎng)絡(luò)用語(yǔ)
  • 平面設(shè)計(jì)類(lèi)網(wǎng)站app開(kāi)發(fā)公司排行榜
  • 湖南建設(shè)廳網(wǎng)站不良記錄數(shù)據(jù)分析師資格證書(shū)怎么考
  • 門(mén)戶網(wǎng)站意思種子搜索引擎在線
  • 做網(wǎng)站業(yè)務(wù)員提成幾個(gè)點(diǎn)網(wǎng)絡(luò)營(yíng)銷(xiāo)的渠道有哪些
  • 建設(shè)網(wǎng)站的目的服裝類(lèi)鎮(zhèn)江網(wǎng)站定制
  • 蕪湖做網(wǎng)站的鄧健照片企業(yè)培訓(xùn)
  • 做網(wǎng)站的費(fèi)用 可以抵扣嗎網(wǎng)絡(luò)整合營(yíng)銷(xiāo)4i原則
  • 下載app軟件安裝搜索引擎優(yōu)化公司排行
  • 網(wǎng)站開(kāi)發(fā)連接形式合肥網(wǎng)站優(yōu)化推廣方案
  • 刪除wordpress站高端營(yíng)銷(xiāo)型網(wǎng)站
  • 做外貿(mào)網(wǎng)站怎么訪問(wèn)外國(guó)網(wǎng)站成品影視app開(kāi)發(fā)
  • 網(wǎng)站個(gè)人備案 企業(yè)備案嗎新冠疫情最新情況最新消息