Home
last modified time | relevance | path

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

1234

/development/samples/IntentPlayground/src/com/example/android/intentplayground/
DTestBase.java37 private Context mContext; field in TestBase
41 mContext = context; in TestBase()
89 mContext.startActivity(launch); in startActivities()
100 TaskStackBuilder tb = TaskStackBuilder.create(mContext); in setActivities()
113 Intent launcherIntent = new Intent(mContext, mContext.getClass()); in setActivities()
118 public Context getContext() { return mContext; } in getContext()
DStepAdapter.java34 private final Context mContext; field in StepAdapter
47 mContext = context; in StepAdapter()
49 mInflater = LayoutInflater.from(mContext); in StepAdapter()
71 tutorialText.setText(mContext.getString(currentStep.tutorialText)); in instantiateItem()
/development/samples/ApiDemos/src/com/example/android/apis/app/
DActionBarSettingsActionProviderActivity.java70 private final Context mContext; field in ActionBarSettingsActionProviderActivity.SettingsActionProvider
79 mContext = context; in SettingsActionProvider()
88 LayoutInflater layoutInflater = LayoutInflater.from(mContext); in onCreateActionView()
95 mContext.startActivity(sSettingsIntent); in onCreateActionView()
108 mContext.startActivity(sSettingsIntent); in onPerformDefaultAction()
DFragmentTabsFragment.java89 private final Context mContext; field in FragmentTabsFragment.TabManager
112 private final Context mContext; field in FragmentTabsFragment.TabManager.DummyTabFactory
115 mContext = context; in DummyTabFactory()
120 View v = new View(mContext); in createTabContent()
128 mContext = context; in TabManager()
144 tabSpec.setContent(new DummyTabFactory(mContext)); in addTab()
237 newTab.fragment = Fragment.instantiate(mContext, in doTabChanged()
/development/samples/MultiClientInputMethod/src/com/example/android/multiclientinputmethod/
DSoftInputWindowManager.java27 private final Context mContext; field in SoftInputWindowManager
32 mContext = context; in SoftInputWindowManager()
43 mContext.getSystemService(DisplayManager.class).getDisplay(displayId); in getOrCreateSoftInputWindow()
52 final Context displayContext = mContext.createDisplayContext(display); in getOrCreateSoftInputWindow()
/development/samples/ShortcutSample/src/com/example/android/shortcutsample/
DShortcutHelper.java51 private final Context mContext; field in ShortcutHelper
56 mContext = context; in ShortcutHelper()
57 mShortcutManager = mContext.getSystemService(ShortcutManager.class); in ShortcutHelper()
79 Utils.showToast(mContext, "Call to ShortcutManager is rate-limited"); in callShortcutManager()
83 Utils.showToast(mContext, "Error while calling ShortcutManager: " + e.toString()); in callShortcutManager()
144 mContext, shortcut.getId()); in refreshShortcuts()
165 final ShortcutInfo.Builder b = new ShortcutInfo.Builder(mContext, urlAsString); in createShortcutForUrl()
186 b.setIcon(Icon.createWithResource(mContext, R.drawable.link)); in setSiteInformation()
212 shortcut, MyReceiver.getPinRequestAcceptedIntent(mContext).getIntentSender())); in addWebSiteShortcut()
232 ShortcutManagerCompat.requestPinShortcut(mContext, in requestPinShortcut()
[all …]
/development/samples/browseable/DirectBoot/src/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()
76 Intent intent = new Intent(mContext, AlarmIntentService.class); in cancelAlarm()
78 .getService(mContext, alarm.id, intent, PendingIntent.FLAG_UPDATE_CURRENT); in cancelAlarm()
/development/samples/SampleSyncAdapter/src/com/example/android/samplesync/syncadapter/
DSyncAdapter.java58 private final Context mContext; field in SyncAdapter
62 mContext = context; in SyncAdapter()
94 final long groupId = ContactManager.ensureSampleGroupExists(mContext, account); in onPerformSync()
98 dirtyContacts = ContactManager.getDirtyContacts(mContext, account); in onPerformSync()
108 long newSyncState = ContactManager.updateContacts(mContext, in onPerformSync()
120 ContactManager.updateStatusMessages(mContext, updatedContacts); in onPerformSync()
127 ContactManager.clearSyncFlags(mContext, dirtyContacts); in onPerformSync()
/development/samples/browseable/BasicContactables/src/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()
/development/samples/WeatherListWidget/src/com/example/android/weatherlistwidget/
DWeatherWidgetService.java46 private Context mContext; field in StackRemoteViewsFactory
51 mContext = context; in StackRemoteViewsFactory()
84 final String formatStr = mContext.getResources().getString(R.string.item_format_string); in getViewAt()
86 RemoteViews rv = new RemoteViews(mContext.getPackageName(), itemId); in getViewAt()
121 mCursor = mContext.getContentResolver().query(WeatherDataProvider.CONTENT_URI, null, null, in onDataSetChanged()
/development/samples/ShortcutDemo/common/src/com/example/android/pm/shortcutdemo/
DAppLabelCache.java25 private final Context mContext; field in AppLabelCache
29 mContext = context; in AppLabelCache()
37 PackageManager pm = mContext.getPackageManager(); in getAppLabel()
DShortcutAdapter.java45 private final Context mContext; field in ShortcutAdapter
52 mContext = context; in ShortcutAdapter()
53 mAppLabelCache = new AppLabelCache(mContext); in ShortcutAdapter()
54 mInflater = mContext.getSystemService(LayoutInflater.class); in ShortcutAdapter()
55 mLauncherApps = mContext.getSystemService(LauncherApps.class); in ShortcutAdapter()
187 mContext.getResources().getDisplayMetrics().densityDpi)); in bindView()
/development/samples/browseable/XYZTouristAttractions/Wearable/src/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 …]
/development/samples/ReceiveContentDemo/src/com/example/android/receivecontent/
DAttachmentsRepo.java48 private final Context mContext; field in AttachmentsRepo
52 mContext = context; in AttachmentsRepo()
53 mAttachmentsDir = new File(mContext.getFilesDir(), "attachments"); in AttachmentsRepo()
62 ContentResolver contentResolver = mContext.getContentResolver(); in write()
109 return FileProvider.getUriForFile(mContext, FILE_PROVIDER_AUTHORITY, file); in getUriForFile()
/development/samples/ApiDemos/src/com/example/android/apis/os/
DTriggerSensors.java50 private Context mContext; field in TriggerListener
54 mContext = context; in TriggerListener()
61 mTextView.append(mContext.getString(R.string.sig_motion) + "\n"); in onTrigger()
62 mTextView.append(mContext.getString(R.string.sig_motion_auto_disabled) + "\n"); in onTrigger()
/development/samples/SampleSyncAdapter/tests/src/com/example/android/samplesync/authenticator/
DAuthenticatorActivityTest.java37 private Context mContext; field in AuthenticatorActivityTests
53 mContext = mInstrumentation.getTargetContext(); in setUp()
70 Intent intent = new Intent(mContext, AuthenticatorActivity.class); in testLoginOffered()
/development/samples/ApiDemos/src/com/example/android/apis/view/
DList5.java45 mContext = context; in MyListAdapter()
73 tv = (TextView) LayoutInflater.from(mContext).inflate( in getView()
82 private Context mContext; field in List5.MyListAdapter
/development/samples/browseable/RecipeAssistant/Application/src/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()
/development/samples/browseable/AppShortcuts/src/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()
/development/samples/ApiDemos/src/com/example/android/apis/accessibility/
DTaskListView.java69 private Context mContext = null; field in TaskAdapter
73 mContext = context; in TaskAdapter()
89 LayoutInflater inflater = LayoutInflater.from(mContext); in getView()
100 .append(mContext.getString(R.string.task_name)) in getView()
/development/samples/browseable/SpeedTracker/Wearable/src/com.example.android.wearable.speedtracker/ui/
DSpeedPickerListAdapter.java35 private final Context mContext; field in SpeedPickerListAdapter
39 mContext = context; in SpeedPickerListAdapter()
79 view.setText(mContext.getString(R.string.speed_for_list, mDataSet[position])); in onBindViewHolder()
/development/samples/SampleSyncAdapter/src/com/example/android/samplesync/authenticator/
DAuthenticator.java56 private final Context mContext; field in Authenticator
60 mContext = context; in Authenticator()
67 final Intent intent = new Intent(mContext, AuthenticatorActivity.class); in addAccount()
102 final AccountManager am = AccountManager.get(mContext); in getAuthToken()
118 final Intent intent = new Intent(mContext, AuthenticatorActivity.class); in getAuthToken()
/development/samples/training/device-management-policy/src/com/example/training/deviceadmin/
DPolicy.java50 private Context mContext; field in Policy
55 mContext = context; in Policy()
72 mContext.getSharedPreferences(APP_PREF, Context.MODE_PRIVATE).edit(); in saveToLocal()
89 SharedPreferences prefs = mContext.getSharedPreferences(APP_PREF, Context.MODE_PRIVATE); in readFromLocal()
/development/samples/browseable/AsymmetricFingerprintDialog/src/com.example.android.asymmetricfingerprintdialog/
DFingerprintModule.java49 private final Context mContext; field in FingerprintModule
52 mContext = context; in FingerprintModule()
57 return mContext; in providesContext()
/development/samples/StackWidget/src/com/example/android/stackwidget/
DStackWidgetService.java39 private Context mContext; field in StackRemoteViewsFactory
43 mContext = context; in StackRemoteViewsFactory()
81 RemoteViews rv = new RemoteViews(mContext.getPackageName(), R.layout.widget_item); in getViewAt()

1234