Skip to content

Commit

Permalink
Merge pull request google#831 from cco3/soterlint
Browse files Browse the repository at this point in the history
Fix lint errors
  • Loading branch information
cco3 authored Sep 20, 2016
2 parents 2093759 + fc44999 commit f146ecb
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public class BluetoothSite extends BluetoothGattCallback {
private static final UUID SERVICE_UUID = UUID.fromString("ae5946d4-e587-4ba8-b6a5-a97cca6affd3");
private static final UUID CHARACTERISTIC_WEBPAGE_UUID = UUID.fromString(
"d1a517f0-2499-46ca-9ccc-809bc1c966fa");
// This is BluetoothGatt.CONNECTION_PRIORITY_HIGH, from API level 21
private static final int CONNECTION_PRIORITY_HIGH = 1;
private Activity activity;
private BluetoothGatt mBluetoothGatt;
private BluetoothGattCharacteristic characteristic;
Expand Down Expand Up @@ -145,7 +147,7 @@ public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState
mBluetoothGatt = gatt;
html = new StringBuilder("");
if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) {
gatt.requestConnectionPriority(BluetoothGatt.CONNECTION_PRIORITY_HIGH);
gatt.requestConnectionPriority(CONNECTION_PRIORITY_HIGH);
gatt.requestMtu(505);
} else {
gatt.discoverServices();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package org.physical_web.physicalweb;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentTransaction;
Expand Down Expand Up @@ -210,10 +211,14 @@ private void showDemosFragment() {
showFragment(new DemosFragment(), DEMOS_FRAGMENT_TAG, true);
}

@SuppressLint("CommitTransaction")
private void showFragment(Fragment newFragment, String fragmentTag, boolean addToBackStack) {
FragmentTransaction transaction = getFragmentManager().beginTransaction()
.setCustomAnimations(R.animator.fade_in_and_slide_up_fragment, R.animator.fade_out_fragment,
R.animator.fade_in_activity, R.animator.fade_out_fragment)
.setCustomAnimations(
R.animator.fade_in_and_slide_up_fragment,
R.animator.fade_out_fragment,
R.animator.fade_in_activity,
R.animator.fade_out_fragment)
.replace(R.id.main_activity_container, newFragment, fragmentTag);
if (addToBackStack) {
transaction.addToBackStack(null);
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
android:layout_height="wrap_content"
android:id="@+id/demo_title"
android:gravity="center"
android:textSize="22dp" />
android:textSize="22sp" />

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/demo_summary"
android:gravity="start"
android:textSize="14dp" />
android:textSize="14sp" />

</LinearLayout>

0 comments on commit f146ecb

Please sign in to comment.