Merge "Check for nullness in WallpaperService onDestroy" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
1ce89ea19d
@@ -2738,7 +2738,12 @@ public abstract class WallpaperService extends Service {
|
||||
engineWrapper.destroy();
|
||||
}
|
||||
mActiveEngines.clear();
|
||||
mBackgroundThread.quitSafely();
|
||||
if (mBackgroundThread != null) {
|
||||
// onDestroy might be called without a previous onCreate if WallpaperService was
|
||||
// instantiated manually. While this is a misuse of the API, some things break
|
||||
// if here we don't take into consideration this scenario.
|
||||
mBackgroundThread.quitSafely();
|
||||
}
|
||||
Trace.endSection();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user