/development/samples/devbytes/telephony/SmsSampleProject/SmsSample/src/main/java/com/example/android/smssample/receiver/ |
D | MessagingReceiver.java | 35 public void onReceive(Context context, Intent intent) { in onReceive() argument 39 if (Utils.hasKitKat() && Utils.isDefaultSmsApp(context)) { in onReceive() 41 handleIncomingSms(context, intent); in onReceive() 43 handleIncomingMms(context, intent); in onReceive() 47 handleIncomingSms(context, intent); in onReceive() 49 handleIncomingMms(context, intent); in onReceive() 54 private void handleIncomingSms(Context context, Intent intent) { in handleIncomingSms() argument 58 intent.setClass(context, MessagingService.class); in handleIncomingSms() 59 startWakefulService(context, intent); in handleIncomingSms() 62 private void handleIncomingMms(Context context, Intent intent) { in handleIncomingMms() argument [all …]
|
/development/samples/StackWidget/src/com/example/android/stackwidget/ |
D | StackWidgetProvider.java | 33 public void onDeleted(Context context, int[] appWidgetIds) { in onDeleted() argument 34 super.onDeleted(context, appWidgetIds); in onDeleted() 38 public void onDisabled(Context context) { in onDisabled() argument 39 super.onDisabled(context); in onDisabled() 43 public void onEnabled(Context context) { in onEnabled() argument 44 super.onEnabled(context); in onEnabled() 48 public void onReceive(Context context, Intent intent) { in onReceive() argument 49 AppWidgetManager mgr = AppWidgetManager.getInstance(context); in onReceive() 54 Toast.makeText(context, "Touched view " + viewIndex, Toast.LENGTH_SHORT).show(); in onReceive() 56 super.onReceive(context, intent); in onReceive() [all …]
|
/development/samples/ApiDemos/src/com/example/android/apis/appwidget/ |
D | ExampleAppWidgetProvider.java | 52 public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { in onUpdate() argument 61 String titlePrefix = ExampleAppWidgetConfigure.loadTitlePref(context, appWidgetId); in onUpdate() 62 updateAppWidget(context, appWidgetManager, appWidgetId, titlePrefix); in onUpdate() 67 public void onDeleted(Context context, int[] appWidgetIds) { in onDeleted() argument 72 ExampleAppWidgetConfigure.deleteTitlePref(context, appWidgetIds[i]); in onDeleted() 77 public void onEnabled(Context context) { in onEnabled() argument 83 PackageManager pm = context.getPackageManager(); in onEnabled() 91 public void onDisabled(Context context) { in onDisabled() argument 95 PackageManager pm = context.getPackageManager(); in onDisabled() 102 static void updateAppWidget(Context context, AppWidgetManager appWidgetManager, in updateAppWidget() argument [all …]
|
D | ExampleAppWidgetConfigure.java | 86 final Context context = ExampleAppWidgetConfigure.this; 91 saveTitlePref(context, mAppWidgetId, titlePrefix); 94 AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context); 95 ExampleAppWidgetProvider.updateAppWidget(context, appWidgetManager, 107 static void saveTitlePref(Context context, int appWidgetId, String text) { in saveTitlePref() argument 108 SharedPreferences.Editor prefs = context.getSharedPreferences(PREFS_NAME, 0).edit(); in saveTitlePref() 115 static String loadTitlePref(Context context, int appWidgetId) { in loadTitlePref() argument 116 SharedPreferences prefs = context.getSharedPreferences(PREFS_NAME, 0); in loadTitlePref() 121 return context.getString(R.string.appwidget_prefix_default); in loadTitlePref() 125 static void deleteTitlePref(Context context, int appWidgetId) { in deleteTitlePref() argument [all …]
|
/development/samples/RandomMusicPlayer/src/com/example/android/musicplayer/ |
D | MusicIntentReceiver.java | 34 public void onReceive(Context context, Intent intent) { in onReceive() argument 36 Toast.makeText(context, "Headphones disconnected.", Toast.LENGTH_SHORT).show(); in onReceive() 39 context.startService(new Intent(MusicService.ACTION_PAUSE)); in onReceive() 49 context.startService(new Intent(MusicService.ACTION_TOGGLE_PLAYBACK)); in onReceive() 52 context.startService(new Intent(MusicService.ACTION_PLAY)); in onReceive() 55 context.startService(new Intent(MusicService.ACTION_PAUSE)); in onReceive() 58 context.startService(new Intent(MusicService.ACTION_STOP)); in onReceive() 61 context.startService(new Intent(MusicService.ACTION_SKIP)); in onReceive() 66 context.startService(new Intent(MusicService.ACTION_REWIND)); in onReceive()
|
/development/samples/devbytes/telephony/SmsSampleProject/SmsSample/src/main/java/com/example/android/smssample/ |
D | Utils.java | 47 public static boolean isDefaultSmsApp(Context context) { in isDefaultSmsApp() argument 49 return context.getPackageName().equals(Telephony.Sms.getDefaultSmsPackage(context)); in isDefaultSmsApp() 60 public static void setDefaultSmsApp(Context context) { in setDefaultSmsApp() argument 64 intent.putExtra(Intents.EXTRA_PACKAGE_NAME, context.getPackageName()); in setDefaultSmsApp() 65 context.startActivity(intent); in setDefaultSmsApp()
|
/development/samples/devbytes/animation/ListViewExpandingCells/src/com/example/android/expandingcells/ |
D | ExpandingLayout.java | 43 public ExpandingLayout(Context context) { in ExpandingLayout() argument 44 super(context); in ExpandingLayout() 47 public ExpandingLayout(Context context, AttributeSet attrs) { in ExpandingLayout() argument 48 super(context, attrs); in ExpandingLayout() 51 public ExpandingLayout(Context context, AttributeSet attrs, int defStyle) { in ExpandingLayout() argument 52 super(context, attrs, defStyle); in ExpandingLayout()
|
/development/samples/ApiDemos/src/com/example/android/apis/text/ |
D | LogTextBox.java | 38 public LogTextBox(Context context) { in LogTextBox() argument 39 this(context, null); in LogTextBox() 42 public LogTextBox(Context context, AttributeSet attrs) { in LogTextBox() argument 43 this(context, attrs, android.R.attr.textViewStyle); in LogTextBox() 46 public LogTextBox(Context context, AttributeSet attrs, int defStyle) { in LogTextBox() argument 47 super(context, attrs, defStyle); in LogTextBox()
|
/development/samples/CrossCompatibility/src/com/example/android/touchexample/ |
D | TouchExampleView.java | 33 public TouchExampleView(Context context) { in TouchExampleView() argument 34 this(context, null, 0); in TouchExampleView() 37 public TouchExampleView(Context context, AttributeSet attrs) { in TouchExampleView() argument 38 this(context, attrs, 0); in TouchExampleView() 41 public TouchExampleView(Context context, AttributeSet attrs, int defStyle) { in TouchExampleView() argument 42 super(context, attrs, defStyle); in TouchExampleView() 43 mIcon = context.getResources().getDrawable(R.drawable.icon); in TouchExampleView() 46 mDetector = VersionedGestureDetector.newInstance(context, new GestureCallback()); in TouchExampleView()
|
/development/samples/WeatherListWidget/src/com/example/android/weatherlistwidget/ |
D | WeatherWidgetProvider.java | 88 public void onEnabled(Context context) { in onEnabled() argument 93 final ContentResolver r = context.getContentResolver(); in onEnabled() 95 final AppWidgetManager mgr = AppWidgetManager.getInstance(context); in onEnabled() 96 final ComponentName cn = new ComponentName(context, WeatherWidgetProvider.class); in onEnabled() 110 final Context context = ctx; in onReceive() local 115 final ContentResolver r = context.getContentResolver(); in onReceive() 132 final AppWidgetManager mgr = AppWidgetManager.getInstance(context); in onReceive() 133 … final ComponentName cn = new ComponentName(context, WeatherWidgetProvider.class); in onReceive() 152 private RemoteViews buildLayout(Context context, int appWidgetId, boolean largeLayout) { in buildLayout() argument 157 final Intent intent = new Intent(context, WeatherWidgetService.class); in buildLayout() [all …]
|
/development/apps/Development/src/com/android/development/ |
D | LogTextBox.java | 41 public LogTextBox(Context context) { in LogTextBox() argument 42 this(context, null); in LogTextBox() 45 public LogTextBox(Context context, AttributeSet attrs) { in LogTextBox() argument 46 this(context, attrs, android.R.attr.textViewStyle); in LogTextBox() 49 public LogTextBox(Context context, AttributeSet attrs, int defStyle) { in LogTextBox() argument 50 super(context, attrs, defStyle); in LogTextBox()
|
/development/samples/SoftKeyboard/src/com/android/inputmethodcommon/ |
D | InputMethodSettingsImpl.java | 57 public boolean init(final Context context, final PreferenceScreen prefScreen) { in init() argument 58 mContext = context; in init() 59 mImm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); in init() 60 mImi = getMyImi(context, mImm); in init() 64 mSubtypeEnablerPreference = new Preference(context); in init() 69 final CharSequence title = getSubtypeEnablerTitle(context); in init() 79 context.startActivity(intent); in init() 88 private static InputMethodInfo getMyImi(Context context, InputMethodManager imm) { in getMyImi() argument 92 if (imis.get(i).getPackageName().equals(context.getPackageName())) { in getMyImi() 100 Context context, InputMethodManager imm, InputMethodInfo imi) { in getEnabledSubtypesLabel() argument [all …]
|
/development/samples/devbytes/animation/ListViewItemAnimations/src/com/example/android/listviewitemanimations/ |
D | BackgroundContainer.java | 32 public BackgroundContainer(Context context) { in BackgroundContainer() argument 33 super(context); in BackgroundContainer() 37 public BackgroundContainer(Context context, AttributeSet attrs) { in BackgroundContainer() argument 38 super(context, attrs); in BackgroundContainer() 42 public BackgroundContainer(Context context, AttributeSet attrs, int defStyle) { in BackgroundContainer() argument 43 super(context, attrs, defStyle); in BackgroundContainer()
|
/development/samples/devbytes/animation/ListViewRemovalAnimation/src/com/example/android/listviewremovalanimation/ |
D | BackgroundContainer.java | 32 public BackgroundContainer(Context context) { in BackgroundContainer() argument 33 super(context); in BackgroundContainer() 37 public BackgroundContainer(Context context, AttributeSet attrs) { in BackgroundContainer() argument 38 super(context, attrs); in BackgroundContainer() 42 public BackgroundContainer(Context context, AttributeSet attrs, int defStyle) { in BackgroundContainer() argument 43 super(context, attrs, defStyle); in BackgroundContainer()
|
/development/samples/ApiDemos/src/com/example/android/apis/view/ |
D | GridLayout3.java | 39 public static View create(Context context) { in create() argument 40 GridLayout p = new GridLayout(context); in create() 43 Configuration configuration = context.getResources().getConfiguration(); in create() 65 TextView c = new TextView(context); in create() 71 TextView c = new TextView(context); in create() 77 TextView c = new TextView(context); in create() 82 EditText c = new EditText(context); in create() 88 TextView c = new TextView(context); in create() 93 TextView c = new EditText(context); in create() 99 Button c = new Button(context); in create() [all …]
|
D | CheckableFrameLayout.java | 28 public CheckableFrameLayout(Context context) { in CheckableFrameLayout() argument 29 super(context); in CheckableFrameLayout() 32 public CheckableFrameLayout(Context context, AttributeSet attrs) { in CheckableFrameLayout() argument 33 super(context, attrs); in CheckableFrameLayout()
|
/development/apps/BuildWidget/src/com/android/buildwidget/ |
D | BuildWidget.java | 43 public void onUpdate(Context context, AppWidgetManager appWidgetManager, in onUpdate() argument 46 context.startService(new Intent(context, UpdateService.class)); in onUpdate() 61 public RemoteViews buildUpdate(Context context) { in buildUpdate() argument 63 Resources res = context.getResources(); in buildUpdate() 65 context.getPackageName(), R.layout.widget); in buildUpdate() 67 PendingIntent pendingIntent = PendingIntent.getActivity(context, in buildUpdate() 75 DateUtils.formatDateTime(context, android.os.Build.TIME, in buildUpdate()
|
/development/samples/Support13Demos/src/com/example/android/supportv13/view/ |
D | CheckableFrameLayout.java | 28 public CheckableFrameLayout(Context context) { in CheckableFrameLayout() argument 29 super(context); in CheckableFrameLayout() 32 public CheckableFrameLayout(Context context, AttributeSet attrs) { in CheckableFrameLayout() argument 33 super(context, attrs); in CheckableFrameLayout()
|
/development/samples/Support4Demos/src/com/example/android/supportv4/view/ |
D | CheckableFrameLayout.java | 28 public CheckableFrameLayout(Context context) { in CheckableFrameLayout() argument 29 super(context); in CheckableFrameLayout() 32 public CheckableFrameLayout(Context context, AttributeSet attrs) { in CheckableFrameLayout() argument 33 super(context, attrs); in CheckableFrameLayout()
|
/development/samples/devbytes/animation/ToonGame/src/com/example/android/toongame/ |
D | SkewableTextView.java | 36 public SkewableTextView(Context context, AttributeSet attrs, int defStyle) { in SkewableTextView() argument 37 super(context, attrs, defStyle); in SkewableTextView() 40 public SkewableTextView(Context context, AttributeSet attrs) { in SkewableTextView() argument 41 super(context, attrs); in SkewableTextView() 44 public SkewableTextView(Context context) { in SkewableTextView() argument 45 super(context); in SkewableTextView()
|
/development/samples/training/AnimationsDemo/src/com/example/android/animationsdemo/ |
D | TouchHighlightImageButton.java | 44 public TouchHighlightImageButton(Context context) { in TouchHighlightImageButton() argument 45 super(context); in TouchHighlightImageButton() 49 public TouchHighlightImageButton(Context context, AttributeSet attrs) { in TouchHighlightImageButton() argument 50 super(context, attrs); in TouchHighlightImageButton() 54 public TouchHighlightImageButton(Context context, AttributeSet attrs, int defStyle) { in TouchHighlightImageButton() argument 55 super(context, attrs, defStyle); in TouchHighlightImageButton()
|
/development/samples/BasicGLSurfaceView/src/com/example/android/basicglsurfaceview/ |
D | BasicGLSurfaceView.java | 25 public BasicGLSurfaceView(Context context) { in BasicGLSurfaceView() argument 26 super(context); in BasicGLSurfaceView() 28 setRenderer(new GLES20TriangleRenderer(context)); in BasicGLSurfaceView()
|
/development/samples/devbytes/animation/SlidingFragments/src/com/example/android/slidingfragments/ |
D | FractionalLinearLayout.java | 39 public FractionalLinearLayout(Context context) { in FractionalLinearLayout() argument 40 super(context); in FractionalLinearLayout() 43 public FractionalLinearLayout(Context context, AttributeSet attrs) { in FractionalLinearLayout() argument 44 super(context, attrs); in FractionalLinearLayout()
|
/development/samples/ApiDemos/src/com/example/android/apis/accessibility/ |
D | CustomViewAccessibilityActivity.java | 76 public AccessibleCompoundButtonInheritance(Context context, AttributeSet attrs) { in AccessibleCompoundButtonInheritance() argument 77 super(context, attrs); in AccessibleCompoundButtonInheritance() 127 public AccessibleCompoundButtonComposition(Context context, AttributeSet attrs) { in AccessibleCompoundButtonComposition() argument 128 super(context, attrs); in AccessibleCompoundButtonComposition() 207 public BaseToggleButton(Context context, AttributeSet attrs) { in BaseToggleButton() argument 208 this(context, attrs, android.R.attr.buttonStyle); in BaseToggleButton() 211 public BaseToggleButton(Context context, AttributeSet attrs, int defStyle) { in BaseToggleButton() argument 212 super(context, attrs, defStyle); in BaseToggleButton() 217 context.getTheme().resolveAttribute(android.R.attr.textSize, typedValue, true); in BaseToggleButton() 219 context.getResources().getDisplayMetrics()); in BaseToggleButton() [all …]
|
/development/samples/devbytes/animation/ListViewCellInsertion/src/com/example/android/insertingcells/ |
D | RoundView.java | 42 public RoundView(Context context) { in RoundView() argument 43 super(context); in RoundView() 47 public RoundView(Context context, AttributeSet attrs) { in RoundView() argument 48 super(context, attrs); in RoundView() 52 public RoundView(Context context, AttributeSet attrs, int defStyle) { in RoundView() argument 53 super(context, attrs, defStyle); in RoundView()
|