docs/ui/android/device_form_factor.md
Most features built for Chrome for Android are applicable across all form factors (phones, tablets, experimental desktop, etc). While some features may be used more on certain form factors, that they are typically still useful across the breadth of devices Chrome for Android supports. We also generally strive to provide consistent feature experience across all form factors and minimize divergence; rather, features should be available and UI layouts or entry points should adapt to the screen size.
Sometimes, however, there is a need to make features conditionally available. The criteria for when a feature should be available will vary and should be established in the PRD phase. Below is a list of options and some examples of when they may be applicable. Note that some features may use more than one of these signals to determine availability.
Priority #1 - Most reliable and least ambiguous criterion to check. Directly answers the question: "Does the device have the specific technical ability to support this feature?"
Priority #2 - This addresses the practical usability of a feature within its current presentation layer
Priority #3 - Safeguard/proxy to limit memory-intensive features to "higher end devices", but hard to explain to users
Priority #4 - This is because "form factor" is a blunt and often misleading proxy for what a feature actually needs (e.g., screen size, input modality, or a specific API). For example, a "tablet" could have a small screen and no keyboard, while a "phone" could be connected to a large monitor with a mouse. Also, limits cross-device continuity.
There are some conditions that are generally discouraged:
If a feature could significantly impact binary size and needs to be enabled for a specific form factor, utilize ServiceLoaderUtil to instantiate your classes and conditionally enable these in your BUILD.gn files.
Current mechanisms: