Merge "Move the logic to update the system server timeouts to the end of the startup process."
This commit is contained in:
committed by
Android (Google) Code Review
commit
1a6fa0906f
@@ -929,6 +929,9 @@ public final class SystemServer implements Dumpable {
|
||||
startCoreServices(t);
|
||||
startOtherServices(t);
|
||||
startApexServices(t);
|
||||
// Only update the timeout after starting all the services so that we use
|
||||
// the default timeout to start system server.
|
||||
updateWatchdogTimeout(t);
|
||||
} catch (Throwable ex) {
|
||||
Slog.e("System", "******************************************");
|
||||
Slog.e("System", "************ Failure starting system services", ex);
|
||||
@@ -1499,10 +1502,6 @@ public final class SystemServer implements Dumpable {
|
||||
SQLiteCompatibilityWalFlags.reset();
|
||||
t.traceEnd();
|
||||
|
||||
t.traceBegin("UpdateWatchdogTimeout");
|
||||
Watchdog.getInstance().registerSettingsObserver(context);
|
||||
t.traceEnd();
|
||||
|
||||
// Records errors and logs, for example wtf()
|
||||
// Currently this service indirectly depends on SettingsProvider so do this after
|
||||
// InstallSystemProviders.
|
||||
@@ -3055,6 +3054,12 @@ public final class SystemServer implements Dumpable {
|
||||
t.traceEnd(); // startApexServices
|
||||
}
|
||||
|
||||
private void updateWatchdogTimeout(@NonNull TimingsTraceAndSlog t) {
|
||||
t.traceBegin("UpdateWatchdogTimeout");
|
||||
Watchdog.getInstance().registerSettingsObserver(mSystemContext);
|
||||
t.traceEnd();
|
||||
}
|
||||
|
||||
private boolean deviceHasConfigString(@NonNull Context context, @StringRes int resId) {
|
||||
String serviceName = context.getString(resId);
|
||||
return !TextUtils.isEmpty(serviceName);
|
||||
|
||||
Reference in New Issue
Block a user