am 393afd34: Dogfood Crash Loop : Fixing crash loop by try and catch
* commit '393afd34566ba51f817c45a55305a9ac150d7f5b': Dogfood Crash Loop : Fixing crash loop by try and catch
This commit is contained in:
@@ -47,7 +47,12 @@ public class PackageInstallerCompatVL extends PackageInstallerCompat {
|
|||||||
mResumed = false;
|
mResumed = false;
|
||||||
mBound = false;
|
mBound = false;
|
||||||
|
|
||||||
mInstaller.registerSessionCallback(mCallback);
|
// STOPSHIP(mokani): Remove catch block once dogfood build is bigger than LRW70.
|
||||||
|
// This hack is just to prevent crash in older builds.
|
||||||
|
try {
|
||||||
|
mInstaller.registerSessionCallback(mCallback);
|
||||||
|
} catch (Throwable e) { }
|
||||||
|
|
||||||
// On start, send updates for all active sessions
|
// On start, send updates for all active sessions
|
||||||
for (SessionInfo info : mInstaller.getAllSessions()) {
|
for (SessionInfo info : mInstaller.getAllSessions()) {
|
||||||
mPendingReplays.append(info.getSessionId(), info);
|
mPendingReplays.append(info.getSessionId(), info);
|
||||||
@@ -72,7 +77,11 @@ public class PackageInstallerCompatVL extends PackageInstallerCompat {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onStop() {
|
public void onStop() {
|
||||||
mInstaller.unregisterSessionCallback(mCallback);
|
// STOPSHIP(mokani): Remove catch block once dogfood build is bigger than LRW70.
|
||||||
|
// This hack is just to prevent crash in older builds.
|
||||||
|
try {
|
||||||
|
mInstaller.unregisterSessionCallback(mCallback);
|
||||||
|
} catch (Throwable e) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user