Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-30784

Android Tablets sent to mobile theme

    Details

    • Testing Instructions:
      Hide
      1. Set the mobile theme as afterburner
      2. Set the tablet theme as standard
      3. Set the default theme as brick
      4. Access the site on a android mobile phone and see the afterburner theme
      5. Access device on android tablet and see the standard theme
      6. Access device on ipad and see the standard theme.
      Show
      Set the mobile theme as afterburner Set the tablet theme as standard Set the default theme as brick Access the site on a android mobile phone and see the afterburner theme Access device on android tablet and see the standard theme Access device on ipad and see the standard theme.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-30784-master

      Description

      Android tablets are detected as mobile devices not as tablets in themes.

      I have attached a patch to lib/moodlelib.php to fix the issue. The change is that the mobile regex needs to search for android and mobile in the user agent not just android.

      The user agent for an android mobile device lists (Android version number) /4.0 Mobile Safari/
      The user agent for an android tablet device lists (Android version number) / 4.0 Safari/

      In the patch I change /android| to /android \. mobile| for the mobile regex and then I added |android to the tablet regex.

      This was tested and validated on a iPod OS 5, Galaxy Nexus on Android 4.0.2, a Motorola Xoom on Honeycomb 3.2, a Droid (original) running Android 2.3.6 and an iPad.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/May/12