I've been riding in CA for +35 years. I've been lane sharing for most of that time. I've followed motor cops, and been followed by motor cops with no issue. If they think you're being unsafe, they will find a reason to ticket you.
Basic California speed law i no faster than is safe for the conditions. They can use that as a generic ticket and it's up to the Cop to decide if you were unsafe. They can also get you for unsafe lane change if you are bouncing back and forth across the lane divider.
Best way is to pick a lane and stick to it, if you do need to shift to the other lane to get around someone, then signal your intention, even though you are only shifting 6"-8". If you change lanes, keep it legal.
I am part of a state wide Motorcycle Rights Org here in CA. We've been fighting this since it was introduced on December 1, 2014
When this law was first proposed, it was really bad. AB51 was originally written such that traffic had to be no faster than 35mph and you could not go no more than 10mph faster than the traffic you were passing.
In February, it was amended to reduce the traffic speed to no more than 30mph. That was even worse.
In it's current form (5/22/2015), it now reads that the Motorcyclist can not ride at any speed that exceeds 50mph, nor more than 15mph above the speed of the surrounding traffic.
SECTION 1. Section 21658.1 is added to the Vehicle Code, to read:
21658.1. (a) A motorcycle, as defined in Section 400, that has two wheels in contact with the ground may be driven between rows of stopped or moving vehicles in the same lane, including both divided and undivided streets, roads, or highways, if both of the following conditions are present:
(1) The motorcycle is not driven at a speed of more than 50 miles per hour.
(2) The motorcycle is not driven more than 15 miles per hour faster than the speed of traffic moving in the same direction.
(b) This section does not authorize a motorcycle to be driven in contravention of other laws relating to the safe operation of a vehicle.
SEC. 2. No reimbursement is required by this act pursuant to Section 6 of Article XIII B of the California Constitution because the only costs that may be incurred by a local agency or school district will be incurred because this act creates a new crime or infraction, eliminates a crime or infraction, or changes the penalty for a crime or infraction, within the meaning of Section 17556 of the Government Code, or changes the definition of a crime within the meaning of Section 6 of Article XIII B of the California Constitution.
Currently, the bill has been passed to the Senate and sent to committee.
05/28/15 In Senate. Read first time. To Com. on RLS. for assignment.
05/28/15 Read third time. Passed. Ordered to the Senate. (Ayes 58. Noes 14.)
05/22/15 Read third time and amended. Ordered to third reading.
04/30/15 Read second time. Ordered to third reading.
04/29/15 From committee: Do pass. (Ayes 16. Noes 1.) (April 29).
04/07/15 From committee: Do pass and re-refer to Com. on APPR. (Ayes 13. Noes 1.) (April 6). Re-referred to Com. on APPR.
02/12/15 Re-referred to Com. on TRANS.
02/11/15 From committee chair, with author's amendments: Amend, and re-refer to Com. on TRANS. Read second time and amended.
01/22/15 Referred to Com. on TRANS.
12/02/14 From printer. May be heard in committee January 1.
12/01/14 Read first time. To print.
It's an improvement, but it was better when it was a grey area. Not illegal, because there was no law prohibiting it. It was a judgement call on the part of the rider and the officer if seen riding in this manner.
Just my $0.02. YMMV