Merge "Make sure fontScale in configuration sent to app is equal to global" into nyc-dev
This commit is contained in:
@@ -444,10 +444,17 @@ final class ActivityRecord {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
// Make sure fontScale is always equal to global. For fullscreen apps, config is
|
||||||
|
// the shared EMPTY config, which has default fontScale of 1.0. We don't want it
|
||||||
|
// to be applied as an override config.
|
||||||
|
Configuration overrideConfig = new Configuration(config);
|
||||||
|
overrideConfig.fontScale = service.mConfiguration.fontScale;
|
||||||
|
|
||||||
if (DEBUG_CONFIGURATION) Slog.v(TAG, "Sending new config to " + this + " " +
|
if (DEBUG_CONFIGURATION) Slog.v(TAG, "Sending new config to " + this + " " +
|
||||||
"reportToActivity=" + reportToActivity + " and config: " + config);
|
"reportToActivity=" + reportToActivity + " and config: " + overrideConfig);
|
||||||
|
|
||||||
app.thread.scheduleActivityConfigurationChanged(
|
app.thread.scheduleActivityConfigurationChanged(
|
||||||
appToken, new Configuration(config), reportToActivity);
|
appToken, overrideConfig, reportToActivity);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
// If process died, whatever.
|
// If process died, whatever.
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user