Git Product home page Git Product logo

frameworks_opt_hardware's Introduction

CyanogenMod Hardware Abstraction Framework

What's this?

It's a simple library with a set of classes to access hardware tunables and properties that tend to vary from platform to platform, or device to device, but are still useful to present functionality to the end user. Examples of these tunables are display color calibration, processor eco modes, vibration strength, sensor reset/recalibrate, etc.

The library should present a common interface and completely abstract implementation details so that the UI part of said functionality (the knobs and buttons users actually interact with) can be implemented at a single location on any shipped platform app (typically, Settings). No UI or layout elements should be included in here.

How do I use it?

Classes present in this repository are dummies, and should fully implement the expected API that'll be used in Settings.

Each device should implement its own classes for supported hardware tunables, and signal their existence by adding a BOARD_HARDWARE_CLASS variable to its BoardConfig, pointing to the path where said classes can be found. The Nexus4, for instance, has

BOARD_HARDWARE_CLASS := device/lge/mako/cmhw/

Every class present in this framework addresses a single tunable; Devices don't need to implement all the classes, but for every one that is implemented, all methods existing in this dummy implementation must be present, since the client applications will expect them to be there.

Wouldn't it be better if...?

There are reasons for this not to be implemented as an interface definition, or a set of superclasses. Fully overloading the reference class isn't pretty, but at this point it's the most flexible option we have, especially since we still haven't fully closed what we're going to put in here.

frameworks_opt_hardware's People

Contributors

rmcc avatar maniac103 avatar jruesga avatar mikeng avatar ryzenforce990 avatar brinlyau avatar frapeti avatar m1cha avatar pawitp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.