示例#1
0
 private void handleIncomingMessage(Message message) {
   Bundle data = message.peekData();
   long millis = 0;
   if (data != null) {
     millis = data.getLong("millis");
   }
   MinderApplication.getAppContext().unbindService(mConnection);
   listener.returnNextTime(millis);
 }
示例#2
0
 @Override
 public void getNextTime(long millis) {
   Intent matcherIntent = new Intent();
   matcherIntent.setComponent(matcher);
   matcherIntent.putExtra("millis", millis);
   matcherIntent.putExtra("values", values);
   matcherIntent.putExtra("messenger", new Messenger(handler));
   try {
     MinderApplication.getAppContext()
         .bindService(matcherIntent, mConnection, Context.BIND_AUTO_CREATE);
   } catch (SecurityException e) {
     // TODO: Decide how to handle invalid calls in production
   }
 }
示例#3
0
 private OptionCollector() throws ClassNotFoundException {
   addPotentialOptions();
   sortPotentialOptions();
   context = MinderApplication.getAppContext();
   resolver = context.getContentResolver();
 }