|
|
|
@ -45,8 +45,10 @@ class JunoOnboardingFragment : Fragment() {
|
|
|
|
|
@SuppressLint("SourceLockedOrientationActivity")
|
|
|
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
|
|
|
super.onCreate(savedInstanceState)
|
|
|
|
|
if (isNotATablet()) {
|
|
|
|
|
activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequiresApi(Build.VERSION_CODES.TIRAMISU)
|
|
|
|
|
override fun onCreateView(
|
|
|
|
@ -69,8 +71,10 @@ class JunoOnboardingFragment : Fragment() {
|
|
|
|
|
|
|
|
|
|
override fun onDestroy() {
|
|
|
|
|
super.onDestroy()
|
|
|
|
|
if (isNotATablet()) {
|
|
|
|
|
activity?.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequiresApi(Build.VERSION_CODES.TIRAMISU)
|
|
|
|
|
@Composable
|
|
|
|
@ -169,4 +173,7 @@ class JunoOnboardingFragment : Fragment() {
|
|
|
|
|
private fun shouldShowNotificationPage(context: Context) =
|
|
|
|
|
!NotificationManagerCompat.from(context.applicationContext).areNotificationsEnabledSafe() &&
|
|
|
|
|
Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU
|
|
|
|
|
|
|
|
|
|
private fun isNotATablet() =
|
|
|
|
|
!resources.getBoolean(R.bool.tablet)
|
|
|
|
|
}
|
|
|
|
|