List of usage examples for android.text.format DateUtils SECOND_IN_MILLIS
long SECOND_IN_MILLIS
To view the source code for android.text.format DateUtils SECOND_IN_MILLIS.
Click Source Link
From source file:net.niyonkuru.koodroid.MainActivity.java
@Override public void onLoginRequired() { long duration = DateUtils.SECOND_IN_MILLIS * 5; Toast.makeText(this, getString(R.string.service_error_session, duration / 1000), Toast.LENGTH_SHORT).show(); mHandler.postDelayed(mLoginAction, duration); }
From source file:com.android.gpstest.GpsStatusFragment.java
private void updateFixTime() { if (mFixTime == 0 || !GpsTestActivity.getInstance().mStarted) { mFixTimeView.setText(""); } else {//from ww w. j ava 2 s .c o m mFixTimeView.setText(DateUtils.getRelativeTimeSpanString(mFixTime, System.currentTimeMillis(), DateUtils.SECOND_IN_MILLIS)); } }
From source file:com.android.deskclock.timer.TimerSetupView.java
public long getTimeInMillis() { final int hoursInSeconds = mInput[5] * 36000 + mInput[4] * 3600; final int minutesInSeconds = mInput[3] * 600 + mInput[2] * 60; final int seconds = mInput[1] * 10 + mInput[0]; final int totalSeconds = hoursInSeconds + minutesInSeconds + seconds; return totalSeconds * DateUtils.SECOND_IN_MILLIS; }
From source file:net.niyonkuru.koodroid.ui.OverviewFragment.java
@Override public Loader<Cursor> onCreateLoader(int id, Bundle args) { switch (id) { case SUBSCRIBER_TOKEN: { final Uri uri = Subscribers.buildSubscriberUri(getSubscriber()); return new CursorLoader(mContext, uri, SubscribersQuery.PROJECTION, null, null, null); }/*from w w w. j a va 2s . c om*/ case BILL_TOKEN: { final Uri uri = Bills.buildBillUri(getEmail()); return new CursorLoader(mContext, uri, BillsQuery.PROJECTION, null, null, null); } case TAB_TOKEN: { final Uri uri = Tabs.buildTabUri(getSubscriber()); CursorLoader loader = new CursorLoader(mContext, uri, TabsQuery.PROJECTION, null, null, null); loader.setUpdateThrottle(DateUtils.SECOND_IN_MILLIS); return loader; } } return null; }
From source file:net.niyonkuru.koodroid.MainActivity.java
@Override public Loader<Cursor> onCreateLoader(int id, Bundle args) { String selection = Subscribers.SUBSCRIBER_EMAIL + "='" + App.getSettings().email() + "'"; CursorLoader loader = new CursorLoader(this, Subscribers.CONTENT_URI, SubscribersQuery.PROJECTION, selection, null, Subscribers.DEFAULT_SORT); loader.setUpdateThrottle(DateUtils.SECOND_IN_MILLIS); return loader; }
From source file:net.simonvt.cathode.ui.fragment.TrendingShowsFragment.java
@Override public Loader<SimpleCursor> onCreateLoader(int i, Bundle bundle) { final Uri contentUri = Shows.SHOWS_TRENDING; SimpleCursorLoader cl = new SimpleCursorLoader(getActivity(), contentUri, ShowDescriptionAdapter.PROJECTION, ShowColumns.NEEDS_SYNC + "=0", null, sortBy.getSortOrder()); cl.setUpdateThrottle(2 * DateUtils.SECOND_IN_MILLIS); return cl;//w ww. j a v a 2s . c o m }
From source file:net.simonvt.cathode.ui.fragment.MovieRecommendationsFragment.java
@Override public Loader<SimpleCursor> onCreateLoader(int i, Bundle bundle) { SimpleCursorLoader loader = new SimpleCursorLoader(getActivity(), Movies.RECOMMENDED, null, MovieColumns.NEEDS_SYNC + "=0", null, sortBy.getSortOrder()); loader.setUpdateThrottle(2 * DateUtils.SECOND_IN_MILLIS); return loader; }
From source file:com.example.activitydemo.app.service.GameService.java
public void endGame() { Log.d(TAG, "Ending game"); new UpdateDriveFileTask().execute(mGameHandler.mActivities); Games.Leaderboards.submitScore(mClient, getString(R.string.leaderboard_high_score_basic_track), ((GameLogic) mGameCallbacks).getScore()); removeActivityUpdates();/*from w ww . j a v a 2 s.com*/ setGameCallbacks(null); Notification notification = new NotificationCompat.Builder(this) .setContentTitle(getString(R.string.game_over)).setSmallIcon(getApplicationInfo().icon) .setContentText(getString(R.string.game_over_notification_text)) .setContentIntent(buildActivityPendingIntent()).build(); NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); nm.notify(R.string.game_over, notification); mGameHandler.sendMessageDelayed(mGameHandler.obtainMessage(MESSAGE_SHUTDOWN), 5 * DateUtils.SECOND_IN_MILLIS); if (mBinderService.isConnected()) { try { mBinderService.mCallbacks.onEndGame(); } catch (RemoteException e) { } } }
From source file:com.android.exchange.eas.EasSync.java
@Override protected long getTimeout() { if (mInitialSync) { return 120 * DateUtils.SECOND_IN_MILLIS; }//ww w . j av a 2s . co m return super.getTimeout(); }
From source file:net.simonvt.cathode.ui.fragment.ShowRecommendationsFragment.java
@Override public Loader<SimpleCursor> onCreateLoader(int i, Bundle bundle) { final Uri contentUri = Shows.SHOWS_RECOMMENDED; SimpleCursorLoader cl = new SimpleCursorLoader(getActivity(), contentUri, ShowDescriptionAdapter.PROJECTION, ShowColumns.NEEDS_SYNC, null, sortBy.getSortOrder()); cl.setUpdateThrottle(2 * DateUtils.SECOND_IN_MILLIS); return cl;/*from www. j a v a2 s .co m*/ }