[Android] Onboarding: Hide permission text if granted

Geoffrey Métais git at videolan.org
Mon Feb 25 15:47:54 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Feb 25 15:21:30 2019 +0100| [eab9666b568f943d03249d4f1319831229585c03] | committer: Geoffrey Métais

Onboarding: Hide permission text if granted

> https://code.videolan.org/videolan/vlc-android/commit/eab9666b568f943d03249d4f1319831229585c03
---

 .../org/videolan/vlc/gui/onboarding/OnboardingWelcomeFragment.kt   | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/onboarding/OnboardingWelcomeFragment.kt b/vlc-android/src/org/videolan/vlc/gui/onboarding/OnboardingWelcomeFragment.kt
index 8232b6dd6..bdf508225 100644
--- a/vlc-android/src/org/videolan/vlc/gui/onboarding/OnboardingWelcomeFragment.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/onboarding/OnboardingWelcomeFragment.kt
@@ -6,6 +6,7 @@ import android.view.View
 import android.view.ViewGroup
 import androidx.fragment.app.Fragment
 import org.videolan.vlc.R
+import org.videolan.vlc.util.Permissions
 
 class OnboardingWelcomeFragment : Fragment() {
 
@@ -15,11 +16,7 @@ class OnboardingWelcomeFragment : Fragment() {
 
     override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
         super.onViewCreated(view, savedInstanceState)
-
-    }
-
-    override fun onActivityCreated(savedInstanceState: Bundle?) {
-        super.onActivityCreated(savedInstanceState)
+        if (Permissions.canReadStorage(view.context)) view.findViewById<View>(R.id.textView3).visibility = View.GONE
     }
 
     companion object {



More information about the Android mailing list