日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

android 8.1 开机壁纸下半部分黑屏2-3秒的问题解决

發布時間:2023/12/14 编程问答 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 android 8.1 开机壁纸下半部分黑屏2-3秒的问题解决 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

vendor/mediatek/proprietary/packages/apps/SystemUI/src/com/android/systemui/ImageWallpaper.java
private void loadWallpaper(boolean needsDraw, boolean needsReset)
上方法的異步改為同步進行測試(目的是將異步改為同步

private void loadWallpaper(boolean needsDraw, boolean needsReset) {mNeedsDrawAfterLoadingWallpaper |= needsDraw;if (mLoader != null) {if (needsReset) {mLoader.cancel(false /* interrupt */);mLoader = null;} else {if (DEBUG) {Log.d(TAG, "Skipping loadWallpaper, already in flight ");}return;}}/* SUN:jicong.wang remove for ALPS03943376mLoader = new AsyncTask<Void, Void, Bitmap>() {@Overrideprotected Bitmap doInBackground(Void... params) {Throwable exception;try {if (needsReset) {mWallpaperManager.forgetLoadedWallpaper();}return mWallpaperManager.getBitmap();} catch (RuntimeException | OutOfMemoryError e) {exception = e;}if (isCancelled()) {return null;}if (exception != null) {// Note that if we do fail at this, and the default wallpaper can't// be loaded, we will go into a cycle. Don't do a build where the// default wallpaper can't be loaded.Log.w(TAG, "Unable to load wallpaper!", exception);try {mWallpaperManager.clear();} catch (IOException ex) {// now we're really screwed.Log.w(TAG, "Unable reset to default wallpaper!", ex);}if (isCancelled()) {return null;}try {return mWallpaperManager.getBitmap();} catch (RuntimeException | OutOfMemoryError e) {Log.w(TAG, "Unable to load default wallpaper!", e);}}return null;}@Overrideprotected void onPostExecute(Bitmap b) {mBackground = null;mBackgroundWidth = -1;mBackgroundHeight = -1;if (b != null) {mBackground = b;mBackgroundWidth = mBackground.getWidth();mBackgroundHeight = mBackground.getHeight();}if (DEBUG) {Log.d(TAG, "Wallpaper loaded: " + mBackground);}updateSurfaceSize(getSurfaceHolder(), getDefaultDisplayInfo(),false );if (mNeedsDrawAfterLoadingWallpaper) {drawFrame();}mLoader = null;mNeedsDrawAfterLoadingWallpaper = false;}}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);*//*SUN:jicong.wang add start ALPS03943376 {@*/Bitmap b = null;Throwable exception = null;try {if (needsReset) {mWallpaperManager.forgetLoadedWallpaper();}b = mWallpaperManager.getBitmap();} catch (RuntimeException | OutOfMemoryError e) {exception = e;}if (exception != null) {// Note that if we do fail at this, and the default wallpaper can't// be loaded, we will go into a cycle. Don't do a build where the// default wallpaper can't be loaded.Log.w(TAG, "Unable to load wallpaper!", exception);try {mWallpaperManager.clear();} catch (IOException ex) {// now we're really screwed.Log.w(TAG, "Unable reset to default wallpaper!", ex);}try {b = mWallpaperManager.getBitmap();} catch (RuntimeException | OutOfMemoryError e) {Log.w(TAG, "Unable to load default wallpaper!", e);}}mBackground = null;mBackgroundWidth = -1;mBackgroundHeight = -1;if (b != null) {mBackground = b;mBackgroundWidth = mBackground.getWidth();mBackgroundHeight = mBackground.getHeight();}if (DEBUG) {Log.d(TAG, "Wallpaper loaded: " + mBackground);}updateSurfaceSize(getSurfaceHolder(), getDefaultDisplayInfo(),false );if (mNeedsDrawAfterLoadingWallpaper) {drawFrame();}mLoader = null;mNeedsDrawAfterLoadingWallpaper = false; /*SUN:jicong.wang add end ALPS03943376 @}*/ }

總結

以上是生活随笔為你收集整理的android 8.1 开机壁纸下半部分黑屏2-3秒的问题解决的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。