Fixed printing with forced English

This commit is contained in:
M66B 2019-06-18 21:41:15 +02:00
parent 852b90ebb7
commit b40ce24f61
2 changed files with 7 additions and 1 deletions

View File

@ -47,14 +47,20 @@ import java.util.List;
import java.util.Map;
abstract class ActivityBase extends AppCompatActivity implements SharedPreferences.OnSharedPreferenceChangeListener {
private Context originalContext;
private boolean contacts;
private List<IBackPressedListener> backPressedListeners = new ArrayList<>();
@Override
protected void attachBaseContext(Context base) {
originalContext = base;
super.attachBaseContext(ApplicationEx.getLocalizedContext(base));
}
Context getOriginalContext() {
return originalContext;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
Log.i("Create " + this.getClass().getName() + " version=" + BuildConfig.VERSION_NAME);

View File

@ -1277,7 +1277,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
@Override
public void onPageFinished(WebView view, String url) {
try {
PrintManager printManager = (PrintManager) getSystemService(Context.PRINT_SERVICE);
PrintManager printManager = (PrintManager) getOriginalContext().getSystemService(Context.PRINT_SERVICE);
String jobName = getString(R.string.app_name);
if (!TextUtils.isEmpty(data[0]))
jobName += " - " + data[0];