Merge "Make DreamService detach on DreamActivity onDestroy" into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
10104fccfc
@@ -70,7 +70,7 @@ public class DreamActivity extends Activity {
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (mCallback != null && !isFinishing()) {
|
||||
if (mCallback != null) {
|
||||
mCallback.onActivityDestroyed();
|
||||
}
|
||||
|
||||
|
||||
@@ -1588,7 +1588,8 @@ public class DreamService extends Service implements Window.Callback {
|
||||
// If DreamActivity is destroyed, wake up from Dream.
|
||||
void onActivityDestroyed() {
|
||||
mActivity = null;
|
||||
onDestroy();
|
||||
mWindow = null;
|
||||
detach();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user