diff options
| author | wqi <wqi@codeaurora.org> | 2016-05-12 16:44:09 +0800 |
|---|---|---|
| committer | Linux Build Service Account <lnxbuild@localhost> | 2016-07-06 22:42:12 -0600 |
| commit | 1e6342d96838f4d922ac26a901f914a5807f494d (patch) | |
| tree | c483389af012964dcdfb3905611ee8fd08c51869 /src/com | |
| parent | e94e766335f3689d2bbee84c7c003207149cbc8f (diff) | |
| download | android_packages_apps_Gallery2-1e6342d96838f4d922ac26a901f914a5807f494d.tar.gz android_packages_apps_Gallery2-1e6342d96838f4d922ac26a901f914a5807f494d.tar.bz2 android_packages_apps_Gallery2-1e6342d96838f4d922ac26a901f914a5807f494d.zip | |
Gallery2: Fix the strings not translated in editor interface.
Some of strings not translated after user change language, because of
the strings not update.
Change-Id: I5e6fa05e38f4c45caf72173ce69864f238470ac1
CRs-Fixed: 1002787
Diffstat (limited to 'src/com')
| -rw-r--r-- | src/com/android/gallery3d/filtershow/category/MainPanel.java | 20 | ||||
| -rw-r--r-- | src/com/android/gallery3d/filtershow/pipeline/ProcessingService.java | 2 |
2 files changed, 20 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/filtershow/category/MainPanel.java b/src/com/android/gallery3d/filtershow/category/MainPanel.java index bfa6b4fa4..f4b22e37b 100644 --- a/src/com/android/gallery3d/filtershow/category/MainPanel.java +++ b/src/com/android/gallery3d/filtershow/category/MainPanel.java @@ -16,6 +16,7 @@ package com.android.gallery3d.filtershow.category; +import android.content.res.Configuration; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; @@ -26,8 +27,11 @@ import android.widget.ImageButton; import android.widget.LinearLayout; import org.codeaurora.gallery.R; + +import com.android.gallery3d.common.ApiHelper; import com.android.gallery3d.filtershow.FilterShowActivity; import com.android.gallery3d.filtershow.editors.EditorPanel; +import com.android.gallery3d.filtershow.filters.FiltersManager; import com.android.gallery3d.filtershow.filters.HazeBusterActs; import com.android.gallery3d.filtershow.filters.SeeStraightActs; import com.android.gallery3d.filtershow.filters.SimpleMakeupImageFilter; @@ -548,9 +552,23 @@ public class MainPanel extends Fragment implements BottomPanel.BottomPanelDelega public void updateDualCameraButton() { if(dualCamButton != null) { DdmStatus status = MasterImage.getImage().getDepthMapLoadingStatus(); - boolean enable = (status == DdmStatus.DDM_LOADING || + boolean enable = (status == DdmStatus.DDM_LOADING || status == DdmStatus.DDM_LOADED); dualCamButton.setVisibility(enable?View.VISIBLE:View.GONE); } } + + @Override + public void onConfigurationChanged(Configuration newConfig) { + super.onConfigurationChanged(newConfig); + if (ApiHelper.getBooleanFieldIfExists(newConfig, "userSetLocale", false)) { + FiltersManager.reset(); + FilterShowActivity activity = (FilterShowActivity) getActivity(); + activity.getProcessingService().setupPipeline(); + activity.fillCategories(); + if (mCurrentSelected != -1) { + showPanel(mCurrentSelected); + } + } + } } diff --git a/src/com/android/gallery3d/filtershow/pipeline/ProcessingService.java b/src/com/android/gallery3d/filtershow/pipeline/ProcessingService.java index e1a83600b..86d4c92c1 100644 --- a/src/com/android/gallery3d/filtershow/pipeline/ProcessingService.java +++ b/src/com/android/gallery3d/filtershow/pipeline/ProcessingService.java @@ -292,7 +292,7 @@ public class ProcessingService extends Service { } } - private void setupPipeline() { + public void setupPipeline() { Resources res = getResources(); FiltersManager.setResources(res); CachingPipeline.createRenderscriptContext(this); |
