Commit Graph

169 Commits

Author SHA1 Message Date
Adnan Begovic 6e46829eb7 CMSDK: Introduce factored out resources from framework.
Change-Id: I4193db99f3f883260354cde98366f94c608f6163
2015-07-09 20:05:29 -07:00
Adnan Begovic cc979035e7 CMSDK: Make sure to initialize ProfileTriggerHelper.
OSS-JIRA: NIGHTLIES-1480

Change-Id: I48fbb350d96424b593858aca1b2343a79f298b0c
2015-07-01 01:04:29 -07:00
Adnan Begovic 4334b3d969 CMSDK: Introduce Profiles API from frameworks.
Refactor to create a system service in secondary
  CM framework.

Change-Id: Ic69da01d941bbd09271c260429d744f8e79ab7b9
2015-06-25 17:35:48 -07:00
Jorge Ruesga 08a3470a78 cmsdk: customtiles: allow load resources from external packages
Saved the context passed to CustomTile.Builder in other to differenciate from the context
used to publish the tile. This allow to load resources (icons) from other packages

Change-Id: I8e40bc59a66f371f3a02f0182e25c6e9eca73c63
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
2015-06-14 00:07:54 +02:00
Jorge Ruesga 9567e3eb67 cmsdk: fix customtile listener service registering logic
mWrapper was never sets. getStatusBarInterface() before check mWrapper instance

Change-Id: Ib280fdf70bc96dcc2ec6c86c6a8bc380dc1e3da1
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
2015-06-11 02:35:20 +02:00
Jorge Ruesga f58b595b6f cmsdk: do not crash system if CustomTileListenerService isn't present
Change-Id: I786f3e791f0fe9fad12cc48846b6d4f8687dff8c
JIRA: NIGHTLIES-1249
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
2015-06-09 18:15:21 +00:00
Adnan Begovic 5024f16809 CMSDK: Utilize a SparseArray instead of Map, avoid autoboxing.
Change-Id: I207c4d323968f3491b0635859a52402215cdc599
2015-06-08 16:39:58 -07:00
Adnan Begovic e08be735a4 CMSDK: Create versioning for platform SDK.
Introduce Apricot, the first version for the
  platform sdk.

Change-Id: I4963650cb861725508aa71276977ac6157f248fc
2015-06-08 16:19:57 -07:00
Adnan Begovic 1299f2b0e5 CMSDK: Document the capabilities of ExpandedStyles for CustomTile.
Change-Id: I4e609a9ad7ec17d18271334dfb087a51eb5d5bd6
2015-06-04 17:33:03 -07:00
Adnan Begovic eac6272970 CMSDK: Create support for ExpandedStyles in CustomTiles.
Applications can now set and expanded style for either a
  gridview layout or a listview layout when providing content
  to be shown in the details panel.

  The mechanism is shown below

  mCustomTile = new CustomTile.Builder(this)
        ...
        .setExpandedStyle(new CustomTile.ListExpandedStyle())
        .build()

  Within SystemUI, if your application states that it wants an expanded
  view, the expanded view onclick will take priority over both
  the onClick intent as well as the onClickUri.

Change-Id: Ib181dab32d1792b6b778fd1ea2f0531bdf407c5f
2015-06-04 17:33:02 -07:00
Adnan Begovic 2c6734a167 CMSDK: Actually hide ThemeVersion.
Change-Id: If30819b969719f8af5693e37eb825d615c555131
2015-06-05 00:32:21 +00:00
Andy Mast 25410f2426 Introduce Theme Versioning [2/2]
See also frameworks/base

Change-Id: I17fd6bfa39ce04fcfb344d14a6af1a6a09ed3f2f
2015-06-01 17:10:07 +00:00
Adnan Begovic e2feecb3f1 CMSDK: Hide CMContextConstants from docs.
Until we can reference these managers through the current context,
  we should hide the constants that are utilized to retrieve them.
  Current implementations should stick to the singleton getInstance
  pattern.

Change-Id: I6c084a3a5b0745b0b6c5d10e000a40f5e61117ea
2015-05-27 15:34:34 -07:00
Adnan Begovic 8c36c41ff6 CMSDK: Update code comments for permission changes.
Change-Id: I1aac7721244a510acb967f5995303ab9d57a11d3
2015-05-19 13:27:17 -07:00
Adnan Begovic e54a96d647 CMSDK: Update implementation for permission declarations.
Change-Id: I9cca55f693ef3f0363bac2f5c8ae1db07adc4f34
2015-04-30 17:26:01 -07:00
Adnan Begovic 35a6d6c643 CMSDK: Update javadocs for onClick vs onClickUri.
Change-Id: I79c9bcfb757e0c57bbfb5c44331a3a74490c5276
2015-04-30 11:21:58 -07:00
Adnan Begovic 346b7587b3 CMSDK: Allow for a settings intent to be set by 3rd party.
This onSettingsClick intent will be triggered when the detail
  pane is shown in SystemuI and the user clicks "More Settings".

Change-Id: I3ddb65c64e81cd230718e7e6e56c436e5b05df8c
2015-04-29 11:51:44 -07:00
Adnan Begovic aa558ade9e CMSDK: Create means of removing tiles via listener interface.
Change-Id: I8934fe5c82963a3aba38ce5eec6e59e50a820d17
2015-04-29 10:46:06 -07:00
Adnan Begovic aa8614e39b CMSDK: Create Quick Settings Tile API.
Create a simple CustomTile object with builder which lets a 3rd party
  application publish a quick settings tile to the status bar panel.

  An example CustomTile build:

      CustomTile customTile = new CustomTile.Builder(mContext)
             .setLabel("custom label")
             .setContentDescription("custom description")
             .setOnClickIntent(pendingIntent)
             .setOnClickUri(Uri.parse("custom uri"))
             .setIcon(R.drawable.ic_launcher)
             .build();

  Which can be published to the status bar panel via CMStatusBarManager#publishTile.

  The CustomTile contains a click intent and click uri which can be
  sent or broadcasted when the CustomQSTile's handleClick is fired.

  This implementation closely mirrors that of NotificationManager#notify for
  notifications. In that each CMStatusBarManager#publishTile can have an appended
  id which can be kept by the 3rd party application to either update the tile with,
  or to remove the tile via CMStatusBarManager#removeTile.

Change-Id: I4b8a50e4e53ef2ececc9c7fc9c8d0ec6acfd0c0e
2015-04-26 16:55:08 -07:00