Home
last modified time | relevance | path

Searched refs:mContext (Results 1 – 25 of 100) sorted by relevance

1234

/developers/samples/android/tv/ChannelsPrograms/Application/src/main/java/com/example/android/tv/channelsprograms/
DSyncChannelJobService.java65 private final Context mContext; field in SyncChannelJobService.SyncChannelTask
68 this.mContext = context; in SyncChannelTask()
73 List<Subscription> subscriptions = MockDatabase.getSubscriptions(mContext); in doInBackground()
74 int numOfChannelsInTVProvider = TvUtil.getNumberOfChannels(mContext); in doInBackground()
82 subscriptions = MockMovieService.createUniversalSubscriptions(mContext); in doInBackground()
84 long channelId = TvUtil.createChannel(mContext, subscription); in doInBackground()
86 TvContractCompat.requestChannelBrowsable(mContext, channelId); in doInBackground()
89 MockDatabase.saveSubscriptions(mContext, subscriptions); in doInBackground()
95 TvUtil.scheduleSyncingProgramsForChannel(mContext, channel.getChannelId()); in doInBackground()
/developers/build/prebuilts/androidtv/leanback/app/src/main/java/com/example/android/leanback/
DCardPresenter.java39 private static Context mContext; field in CardPresenter
53 mDefaultCardImage = mContext.getResources().getDrawable(R.drawable.movie); in ViewHolder()
69 Picasso.with(mContext) in updateCardViewImage()
71 .resize(Utils.dpToPx(CARD_WIDTH, mContext), Utils.dpToPx(CARD_HEIGHT, mContext)) in updateCardViewImage()
80 mContext = parent.getContext(); in onCreateViewHolder()
82 ImageCardView cardView = new ImageCardView(mContext); in onCreateViewHolder()
85 cardView.setBackgroundColor(mContext.getResources().getColor(R.color.fastlane_background)); in onCreateViewHolder()
122 Drawable bitmapDrawable = new BitmapDrawable(mContext.getResources(), bitmap); in onBitmapLoaded()
DRecommendationBuilder.java40 private Context mContext; field in RecommendationBuilder
56 mContext = context; in setContext()
105 mNotificationManager = (NotificationManager) mContext in build()
114 Bitmap image = Picasso.with(mContext) in build()
116 .resize(Utils.dpToPx(CARD_WIDTH, mContext), Utils.dpToPx(CARD_HEIGHT, mContext)) in build()
120 new NotificationCompat.Builder(mContext) in build()
126 .setColor(mContext.getResources().getColor(R.color.fastlane_background)) in build()
DVideoItemLoader.java33 private Context mContext; field in VideoItemLoader
37 mContext = context; in VideoItemLoader()
44 return VideoProvider.buildMedia(mContext, mUrl); in loadInBackground()
/developers/samples/android/security/DirectBoot/Application/src/main/java/com/example/android/directboot/alarms/
DAlarmUtil.java34 private final Context mContext; field in AlarmUtil
38 mContext = context; in AlarmUtil()
39 mAlarmManager = mContext.getSystemService(AlarmManager.class); in AlarmUtil()
48 Intent intent = new Intent(mContext, AlarmIntentService.class); in scheduleAlarm()
53 .getService(mContext, alarm.id, intent, PendingIntent.FLAG_UPDATE_CURRENT); in scheduleAlarm()
77 Intent intent = new Intent(mContext, AlarmIntentService.class); in cancelAlarm()
79 .getService(mContext, alarm.id, intent, PendingIntent.FLAG_UPDATE_CURRENT); in cancelAlarm()
/developers/build/prebuilts/gradle/DirectBoot/Application/src/main/java/com/example/android/directboot/alarms/
DAlarmUtil.java34 private final Context mContext; field in AlarmUtil
38 mContext = context; in AlarmUtil()
39 mAlarmManager = mContext.getSystemService(AlarmManager.class); in AlarmUtil()
48 Intent intent = new Intent(mContext, AlarmIntentService.class); in scheduleAlarm()
53 .getService(mContext, alarm.id, intent, PendingIntent.FLAG_UPDATE_CURRENT); in scheduleAlarm()
77 Intent intent = new Intent(mContext, AlarmIntentService.class); in cancelAlarm()
79 .getService(mContext, alarm.id, intent, PendingIntent.FLAG_UPDATE_CURRENT); in cancelAlarm()
/developers/samples/android/content/WidgetData/Application/src/main/java/com/example/android/widgetdata/
DWeatherWidgetService.java41 private Context mContext; field in StackRemoteViewsFactory
46 mContext = context; in StackRemoteViewsFactory()
79 final String formatStr = mContext.getResources().getString(R.string.item_format_string); in getViewAt()
81 RemoteViews rv = new RemoteViews(mContext.getPackageName(), itemId); in getViewAt()
116 mCursor = mContext.getContentResolver().query(WeatherDataProvider.CONTENT_URI, null, null, in onDataSetChanged()
/developers/build/prebuilts/gradle/BasicContactables/Application/src/main/java/com/example/android/basiccontactables/
DContactablesLoaderCallbacks.java36 Context mContext; field in ContactablesLoaderCallbacks
43 mContext = context; in ContactablesLoaderCallbacks()
70 mContext, // Context in onCreateLoader()
81 TextView tv = (TextView) ((Activity)mContext).findViewById(R.id.sample_output); in onLoadFinished()
84 } else if (mContext == null) { in onLoadFinished()
91 tv.setText(mContext.getText(R.string.intro_message) + "\n\n"); in onLoadFinished()
/developers/samples/android/content/contacts/BasicContactables/Application/src/main/java/com/example/android/basiccontactables/
DContactablesLoaderCallbacks.java36 Context mContext; field in ContactablesLoaderCallbacks
43 mContext = context; in ContactablesLoaderCallbacks()
70 mContext, // Context in onCreateLoader()
81 TextView tv = (TextView) ((Activity)mContext).findViewById(R.id.sample_output); in onLoadFinished()
84 } else if (mContext == null) { in onLoadFinished()
91 tv.setText(mContext.getText(R.string.intro_message) + "\n\n"); in onLoadFinished()
/developers/build/prebuilts/gradle/XYZTouristAttractions/Wearable/src/main/java/com/example/android/xyztouristattractions/ui/
DAttractionsGridPagerAdapter.java66 private Context mContext; field in AttractionsGridPagerAdapter
76 mContext = context; in AttractionsGridPagerAdapter()
133 textView.setText(mContext.getString( in instantiateItem()
160 navActionPage.setText(mContext.getString(R.string.action_navigate)); in instantiateItem()
173 openActionPage.setText(mContext.getString(R.string.action_open)); in instantiateItem()
179 return new View(mContext); in instantiateItem()
188 return new BitmapDrawable(mContext.getResources(), mAttractions.get(row).image); in getBackgroundForPage()
225 Intent intent = new Intent(mContext, ConfirmationActivity.class); in startAction()
228 mContext.startActivity(intent); in startAction()
230 UtilityService.clearNotification(mContext); in startAction()
[all …]
/developers/samples/android/wearable/wear/XYZTouristAttractions/Wearable/src/main/java/com/example/android/xyztouristattractions/ui/
DAttractionsGridPagerAdapter.java66 private Context mContext; field in AttractionsGridPagerAdapter
76 mContext = context; in AttractionsGridPagerAdapter()
133 textView.setText(mContext.getString( in instantiateItem()
160 navActionPage.setText(mContext.getString(R.string.action_navigate)); in instantiateItem()
173 openActionPage.setText(mContext.getString(R.string.action_open)); in instantiateItem()
179 return new View(mContext); in instantiateItem()
188 return new BitmapDrawable(mContext.getResources(), mAttractions.get(row).image); in getBackgroundForPage()
225 Intent intent = new Intent(mContext, ConfirmationActivity.class); in startAction()
228 mContext.startActivity(intent); in startAction()
230 UtilityService.clearNotification(mContext); in startAction()
[all …]
/developers/build/prebuilts/androidtv/leanback/app/src/main/java/com/example/android/tvleanback/data/
DVideoItemLoader.java35 private Context mContext; field in VideoItemLoader
39 mContext = context; in VideoItemLoader()
46 return VideoProvider.buildMedia(mContext, mUrl); in loadInBackground()
/developers/build/prebuilts/gradle/ContentProviderPaging/app/src/main/java/com/example/android/contentproviderpaging/
DImageAdapter.java37 private final Context mContext; field in ImageAdapter
49 mContext = context; in ImageAdapter()
61 Resources resources = mContext.getResources(); in onBindViewHolder()
63 Glide.with(mContext) in onBindViewHolder()
/developers/samples/android/content/documentsUi/ContentProviderPaging/app/src/main/java/com/example/android/contentproviderpaging/
DImageAdapter.java37 private final Context mContext; field in ImageAdapter
49 mContext = context; in ImageAdapter()
61 Resources resources = mContext.getResources(); in onBindViewHolder()
63 Glide.with(mContext) in onBindViewHolder()
/developers/samples/android/wearable/wear/WearAccessibilityApp/Wearable/src/main/java/com/example/android/wearable/wear/wearaccessibilityapp/
DLongListRecyclerViewAdapter.java45 private Context mContext; field in LongListRecyclerViewAdapter
49 mContext = context; in LongListRecyclerViewAdapter()
76 mContext.getResources() in onCreateViewHolder()
91 mContext.getResources() in onCreateViewHolder()
149 return isChecked ? mContext.getString(R.string.on) : mContext.getString(R.string.off); in getSwitchToggleString()
DCircledImageViewPreference.java37 private Context mContext; field in CircledImageViewPreference
41 mContext = context; in CircledImageViewPreference()
44 mContext.getTheme().resolveAttribute(android.R.attr.colorPrimaryDark, typedValue, true); in CircledImageViewPreference()
46 mContext.getTheme().resolveAttribute(android.R.attr.colorAccent, typedValue, true); in CircledImageViewPreference()
/developers/samples/android/deprecated/wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/wearable/recipeassistant/
DRecipeListAdapter.java48 private Context mContext; field in RecipeListAdapter
52 mContext = context; in RecipeListAdapter()
57 JSONObject jsonObject = AssetUtils.loadJSONAsset(mContext, Constants.RECIPE_LIST_FILE); in loadRecipeList()
75 parsed.image = AssetUtils.loadBitmapAsset(mContext, imageFile); in parseJson()
117 LayoutInflater inf = LayoutInflater.from(mContext); in getView()
130 iv.setImageDrawable(mContext.getResources().getDrawable(R.drawable.ic_noimage)); in getView()
/developers/build/prebuilts/gradle/WearAccessibilityApp/Wearable/src/main/java/com/example/android/wearable/wear/wearaccessibilityapp/
DLongListRecyclerViewAdapter.java44 private Context mContext; field in LongListRecyclerViewAdapter
48 mContext = context; in LongListRecyclerViewAdapter()
75 mContext.getResources() in onCreateViewHolder()
90 mContext.getResources() in onCreateViewHolder()
148 return isChecked ? mContext.getString(R.string.on) : mContext.getString(R.string.off); in getSwitchToggleString()
DCircledImageViewPreference.java37 private Context mContext; field in CircledImageViewPreference
41 mContext = context; in CircledImageViewPreference()
44 mContext.getTheme().resolveAttribute(android.R.attr.colorPrimaryDark, typedValue, true); in CircledImageViewPreference()
46 mContext.getTheme().resolveAttribute(android.R.attr.colorAccent, typedValue, true); in CircledImageViewPreference()
/developers/build/prebuilts/gradle/RecipeAssistant/Application/src/main/java/com/example/android/wearable/recipeassistant/
DRecipeListAdapter.java48 private Context mContext; field in RecipeListAdapter
52 mContext = context; in RecipeListAdapter()
57 JSONObject jsonObject = AssetUtils.loadJSONAsset(mContext, Constants.RECIPE_LIST_FILE); in loadRecipeList()
75 parsed.image = AssetUtils.loadBitmapAsset(mContext, imageFile); in parseJson()
117 LayoutInflater inf = LayoutInflater.from(mContext); in getView()
130 iv.setImageDrawable(mContext.getResources().getDrawable(R.drawable.ic_noimage)); in getView()
/developers/build/prebuilts/androidtv/sample-inputs/app/src/main/java/com/example/android/sampletvinput/syncadapter/
DSyncAdapter.java55 private final Context mContext; field in SyncAdapter
59 mContext = context; in SyncAdapter()
64 mContext = context; in SyncAdapter()
78 List<ChannelInfo> channels = RichFeedUtil.getRichChannels(mContext); in onPerformSync()
80 mContext.getContentResolver(), inputId, channels); in onPerformSync()
120 mContext.getContentResolver(), channelUri) / 1000; in insertPrograms()
146 mContext.getContentResolver().applyBatch(TvContract.AUTHORITY, ops); in insertPrograms()
/developers/build/prebuilts/gradle/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/chatlist/
DChatListActivity.java136 final Context mContext; field in ChatListActivity.RetrieveChatsAsyncTask
139 this.mContext = context; in RetrieveChatsAsyncTask()
144 return MockDatabase.getAllChats(mContext); in doInBackground()
156 final Context mContext; field in ChatListActivity.CreateNewChatAsyncTask
161 this.mContext = context; in CreateNewChatAsyncTask()
168 return MockDatabase.createChat(mContext, mContacts, mUser); in doInBackground()
180 Intent startChat = new Intent(mContext, ChatActivity.class); in onPostExecute()
/developers/samples/android/deprecated/wearable/wear/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/chatlist/
DChatListActivity.java136 final Context mContext; field in ChatListActivity.RetrieveChatsAsyncTask
139 this.mContext = context; in RetrieveChatsAsyncTask()
144 return MockDatabase.getAllChats(mContext); in doInBackground()
156 final Context mContext; field in ChatListActivity.CreateNewChatAsyncTask
161 this.mContext = context; in CreateNewChatAsyncTask()
168 return MockDatabase.createChat(mContext, mContacts, mUser); in doInBackground()
180 Intent startChat = new Intent(mContext, ChatActivity.class); in onPostExecute()
/developers/samples/android/system/AppShortcuts/app/src/main/java/com/example/android/appshortcuts/
DShortcutHelper.java49 private final Context mContext; field in ShortcutHelper
54 mContext = context; in ShortcutHelper()
55 mShortcutManager = mContext.getSystemService(ShortcutManager.class); in ShortcutHelper()
77 Utils.showToast(mContext, "Call to ShortcutManager is rate-limited"); in callShortcutManager()
81 Utils.showToast(mContext, "Error while calling ShortcutManager: " + e.toString()); in callShortcutManager()
142 mContext, shortcut.getId()); in refreshShortcuts()
162 final ShortcutInfo.Builder b = new ShortcutInfo.Builder(mContext, urlAsString); in createShortcutForUrl()
183 b.setIcon(Icon.createWithResource(mContext, R.drawable.link)); in setSiteInformation()
/developers/build/prebuilts/gradle/AppShortcuts/app/src/main/java/com/example/android/appshortcuts/
DShortcutHelper.java49 private final Context mContext; field in ShortcutHelper
54 mContext = context; in ShortcutHelper()
55 mShortcutManager = mContext.getSystemService(ShortcutManager.class); in ShortcutHelper()
77 Utils.showToast(mContext, "Call to ShortcutManager is rate-limited"); in callShortcutManager()
81 Utils.showToast(mContext, "Error while calling ShortcutManager: " + e.toString()); in callShortcutManager()
142 mContext, shortcut.getId()); in refreshShortcuts()
162 final ShortcutInfo.Builder b = new ShortcutInfo.Builder(mContext, urlAsString); in createShortcutForUrl()
183 b.setIcon(Icon.createWithResource(mContext, R.drawable.link)); in setSiteInformation()

1234