You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CollegeDev handles this a little differently, but all privacy imports (for ease of patching) should go right at the top of the file, under package.
So:
/*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.telephony;
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
BEGIN PRIVACY
I have seen too many patch failures at dumb places like this. This is what broke our patches between 4.1.1 and 4.1.2, they imported a new class and it fudged our patches. If we standardize like the above, that goes away. I have seen it many times, it is not infrequent. And it should not be at the end, because that code changes often as well. At the top, the only time it will break is if they move the location, which will break them anyway.
The text was updated successfully, but these errors were encountered:
And while I am at it, I want to do the same thing with the variable declarations. I know that there is a standard grouping, but this seems like a perfect instance of substance over style. If we put the variables directly under the class declaration, upstream adding or subtracting variables doesn't have to break our patches. In lists like this, each variable is a line instead of part of a line, so it is much easier to break patches because each change completely wipes the context.
public class Instrumentation {
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
BEGIN PRIVACY
...
Even if it goes against style here. We declare our Privacy sections in a big flashy way now, I think anyone who needs to understand this will be able to.
CollegeDev handles this a little differently, but all privacy imports (for ease of patching) should go right at the top of the file, under package.
So:
I have seen too many patch failures at dumb places like this. This is what broke our patches between 4.1.1 and 4.1.2, they imported a new class and it fudged our patches. If we standardize like the above, that goes away. I have seen it many times, it is not infrequent. And it should not be at the end, because that code changes often as well. At the top, the only time it will break is if they move the location, which will break them anyway.
The text was updated successfully, but these errors were encountered: