Skip to content

Commit

Permalink
Merge branch 'jb-mr0-release' of https://android.googlesource.com/pla…
Browse files Browse the repository at this point in the history
…tform/frameworks/base into aosp-merge

Conflicts:
	packages/SystemUI/res/layout/status_bar_expanded.xml
	packages/SystemUI/res/values/dimens.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
	services/java/com/android/server/SystemServer.java
	telephony/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java
	telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java

Change-Id: I0f435852a82b2db10a6ec804e3b829a52ba0c577
  • Loading branch information
hyperb1iss committed Oct 9, 2012
2 parents e4df126 + 4873a48 commit 1119998
Show file tree
Hide file tree
Showing 763 changed files with 105,368 additions and 9,374 deletions.
7 changes: 6 additions & 1 deletion cmds/installd/commands.c
Expand Up @@ -1070,7 +1070,12 @@ int unlinklib(const char* dataDir)
rc = -errno;
goto out;
}

if (chmod(libdir, 0755) < 0) {
ALOGE("cannot chmod dir '%s': %s\n", libdir, strerror(errno));
unlink(libdir);
rc = -errno;
goto out;
}
if (chown(libdir, AID_SYSTEM, AID_SYSTEM) < 0) {
ALOGE("cannot chown dir '%s': %s\n", libdir, strerror(errno));
unlink(libdir);
Expand Down
Expand Up @@ -66,7 +66,7 @@
* accessibility service. Following is an example declaration:
* </p>
* <pre> &lt;service android:name=".MyAccessibilityService"
* android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE&gt;
* android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"&gt;
* &lt;intent-filter&gt;
* &lt;action android:name="android.accessibilityservice.AccessibilityService" /&gt;
* &lt;/intent-filter&gt;
Expand Down
7 changes: 5 additions & 2 deletions core/java/android/accounts/AccountManagerService.java
Expand Up @@ -220,8 +220,6 @@ public AccountManagerService(Context context, PackageManager packageManager,

sThis.set(this);

UserAccounts accounts = initUser(0);

IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(Intent.ACTION_PACKAGE_REMOVED);
intentFilter.addDataScheme("package");
Expand All @@ -242,6 +240,11 @@ public void onReceive(Context context, Intent intent) {
}, userFilter);
}

public void systemReady() {
mAuthenticatorCache.generateServicesMap();
initUser(0);
}

private UserAccounts initUser(int userId) {
synchronized (mUsers) {
UserAccounts accounts = mUsers.get(userId);
Expand Down
5 changes: 5 additions & 0 deletions core/java/android/accounts/IAccountAuthenticatorCache.java
Expand Up @@ -60,4 +60,9 @@ RegisteredServicesCache.ServiceInfo<AuthenticatorDescription> getServiceInfo(
*/
void setListener(RegisteredServicesCacheListener<AuthenticatorDescription> listener,
Handler handler);

/**
* Refreshes the authenticator cache.
*/
void generateServicesMap();
}
6 changes: 3 additions & 3 deletions core/java/android/app/ContextImpl.java
Expand Up @@ -368,10 +368,10 @@ public Object createService(ContextImpl ctx) {
return PolicyManager.makeNewLayoutInflater(ctx.getOuterContext());
}});

registerService(LOCATION_SERVICE, new StaticServiceFetcher() {
public Object createStaticService() {
registerService(LOCATION_SERVICE, new ServiceFetcher() {
public Object createService(ContextImpl ctx) {
IBinder b = ServiceManager.getService(LOCATION_SERVICE);
return new LocationManager(ILocationManager.Stub.asInterface(b));
return new LocationManager(ctx, ILocationManager.Stub.asInterface(b));
}});

registerService(NETWORK_POLICY_SERVICE, new ServiceFetcher() {
Expand Down
4 changes: 2 additions & 2 deletions core/java/android/app/DatePickerDialog.java
Expand Up @@ -33,8 +33,8 @@
/**
* A simple dialog containing an {@link android.widget.DatePicker}.
*
* <p>See the <a href="{@docRoot}resources/tutorials/views/hello-datepicker.html">Date Picker
* tutorial</a>.</p>
* <p>See the <a href="{@docRoot}guide/topics/ui/controls/pickers.html">Pickers</a>
* guide.</p>
*/
public class DatePickerDialog extends AlertDialog implements OnClickListener,
OnDateChangedListener {
Expand Down
2 changes: 1 addition & 1 deletion core/java/android/app/MediaRouteButton.java
Expand Up @@ -60,7 +60,7 @@ public MediaRouteButton(Context context) {
}

public MediaRouteButton(Context context, AttributeSet attrs) {
this(context, null, com.android.internal.R.attr.mediaRouteButtonStyle);
this(context, attrs, com.android.internal.R.attr.mediaRouteButtonStyle);
}

public MediaRouteButton(Context context, AttributeSet attrs, int defStyleAttr) {
Expand Down
20 changes: 17 additions & 3 deletions core/java/android/app/Notification.java
Expand Up @@ -906,12 +906,16 @@ public String toString() {
* Builder class for {@link Notification} objects.
*
* Provides a convenient way to set the various fields of a {@link Notification} and generate
* content views using the platform's notification layout template.
* content views using the platform's notification layout template. If your app supports
* versions of Android as old as API level 4, you can instead use
* {@link android.support.v4.app.NotificationCompat.Builder NotificationCompat.Builder},
* available in the <a href="{@docRoot}tools/extras/support-library.html">Android Support
* library</a>.
*
* Example:
* <p>Example:
*
* <pre class="prettyprint">
* Notification noti = new Notification.Builder()
* Notification noti = new Notification.Builder(mContext)
* .setContentTitle(&quot;New mail from &quot; + sender.toString())
* .setContentText(subject)
* .setSmallIcon(R.drawable.new_mail)
Expand Down Expand Up @@ -1740,6 +1744,9 @@ public BigPictureStyle setSummaryText(CharSequence cs) {
return this;
}

/**
* Provide the bitmap to be used as the payload for the BigPicture notification.
*/
public BigPictureStyle bigPicture(Bitmap b) {
mPicture = b;
return this;
Expand Down Expand Up @@ -1818,6 +1825,10 @@ public BigTextStyle setSummaryText(CharSequence cs) {
return this;
}

/**
* Provide the longer text to be displayed in the big form of the
* template in place of the content text.
*/
public BigTextStyle bigText(CharSequence cs) {
mBigText = cs;
return this;
Expand Down Expand Up @@ -1898,6 +1909,9 @@ public InboxStyle setSummaryText(CharSequence cs) {
return this;
}

/**
* Append a line to the digest section of the Inbox notification.
*/
public InboxStyle addLine(CharSequence cs) {
mTexts.add(cs);
return this;
Expand Down
4 changes: 2 additions & 2 deletions core/java/android/app/Service.java
Expand Up @@ -142,7 +142,7 @@
* to the service. The service will remain running as long as the connection
* is established (whether or not the client retains a reference on the
* service's IBinder). Usually the IBinder returned is for a complex
* interface that has been <a href="{@docRoot}guide/developing/tools/aidl.html">written
* interface that has been <a href="{@docRoot}guide/components/aidl.html">written
* in aidl</a>.
*
* <p>A service can be both started and have connections bound to it. In such
Expand Down Expand Up @@ -473,7 +473,7 @@ public void onTrimMemory(int level) {
* Return the communication channel to the service. May return null if
* clients can not bind to the service. The returned
* {@link android.os.IBinder} is usually for a complex interface
* that has been <a href="{@docRoot}guide/developing/tools/aidl.html">described using
* that has been <a href="{@docRoot}guide/components/aidl.html">described using
* aidl</a>.
*
* <p><em>Note that unlike other application components, calls on to the
Expand Down
4 changes: 2 additions & 2 deletions core/java/android/app/TimePickerDialog.java
Expand Up @@ -30,8 +30,8 @@
/**
* A dialog that prompts the user for the time of day using a {@link TimePicker}.
*
* <p>See the <a href="{@docRoot}resources/tutorials/views/hello-timepicker.html">Time Picker
* tutorial</a>.</p>
* <p>See the <a href="{@docRoot}guide/topics/ui/controls/pickers.html">Pickers</a>
* guide.</p>
*/
public class TimePickerDialog extends AlertDialog
implements OnClickListener, OnTimeChangedListener {
Expand Down
13 changes: 8 additions & 5 deletions core/java/android/app/backup/FullBackup.java
Expand Up @@ -64,7 +64,9 @@ static public native int backupToTar(String packageName, String domain,

/**
* Copy data from a socket to the given File location on permanent storage. The
* modification time and access mode of the resulting file will be set if desired.
* modification time and access mode of the resulting file will be set if desired,
* although group/all rwx modes will be stripped: the restored file will not be
* accessible from outside the target application even if the original file was.
* If the {@code type} parameter indicates that the result should be a directory,
* the socket parameter may be {@code null}; even if it is valid, no data will be
* read from it in this case.
Expand All @@ -79,8 +81,9 @@ static public native int backupToTar(String packageName, String domain,
* @param type Must be either {@link BackupAgent#TYPE_FILE} for ordinary file data
* or {@link BackupAgent#TYPE_DIRECTORY} for a directory.
* @param mode Unix-style file mode (as used by the chmod(2) syscall) to be set on
* the output file or directory. If this parameter is negative then neither
* the mode nor the mtime parameters will be used.
* the output file or directory. group/all rwx modes are stripped even if set
* in this parameter. If this parameter is negative then neither
* the mode nor the mtime values will be applied to the restored file.
* @param mtime A timestamp in the standard Unix epoch that will be imposed as the
* last modification time of the output file. if the {@code mode} parameter is
* negative then this parameter will be ignored.
Expand All @@ -105,8 +108,6 @@ static public void restoreFile(ParcelFileDescriptor data,
if (!parent.exists()) {
// in practice this will only be for the default semantic directories,
// and using the default mode for those is appropriate.
// TODO: support the edge case of apps that have adjusted the
// permissions on these core directories
parent.mkdirs();
}
out = new FileOutputStream(outFile);
Expand Down Expand Up @@ -146,6 +147,8 @@ static public void restoreFile(ParcelFileDescriptor data,
// Now twiddle the state to match the backup, assuming all went well
if (mode >= 0 && outFile != null) {
try {
// explicitly prevent emplacement of files accessible by outside apps
mode &= 0700;
Libcore.os.chmod(outFile.getPath(), (int)mode);
} catch (ErrnoException e) {
e.rethrowAsIOException();
Expand Down
2 changes: 1 addition & 1 deletion core/java/android/content/BroadcastReceiver.java
Expand Up @@ -735,7 +735,7 @@ public final PendingResult getPendingResult() {

/**
* Control inclusion of debugging help for mismatched
* calls to {@ Context#registerReceiver(BroadcastReceiver, IntentFilter)
* calls to {@link Context#registerReceiver(BroadcastReceiver, IntentFilter)
* Context.registerReceiver()}.
* If called with true, before given to registerReceiver(), then the
* callstack of the following {@link Context#unregisterReceiver(BroadcastReceiver)
Expand Down
5 changes: 4 additions & 1 deletion core/java/android/content/ContentService.java
Expand Up @@ -132,6 +132,9 @@ public boolean onTransact(int code, Parcel data, Parcel reply, int flags)
/*package*/ ContentService(Context context, boolean factoryTest) {
mContext = context;
mFactoryTest = factoryTest;
}

public void systemReady() {
getSyncManager();
}

Expand Down Expand Up @@ -524,7 +527,7 @@ public void removeStatusChangeListener(ISyncStatusObserver callback) {
}
}

public static IContentService main(Context context, boolean factoryTest) {
public static ContentService main(Context context, boolean factoryTest) {
ContentService service = new ContentService(context, factoryTest);
ServiceManager.addService(ContentResolver.CONTENT_SERVICE_NAME, service);
return service;
Expand Down
2 changes: 1 addition & 1 deletion core/java/android/content/pm/PackageManager.java
Expand Up @@ -1622,7 +1622,7 @@ public abstract int getUidForSharedUser(String sharedUserName)
*
* @param flags Additional option flags. Use any combination of
* {@link #GET_META_DATA}, {@link #GET_SHARED_LIBRARY_FILES},
* {link #GET_UNINSTALLED_PACKAGES} to modify the data returned.
* {@link #GET_UNINSTALLED_PACKAGES} to modify the data returned.
*
* @return A List of ApplicationInfo objects, one for each application that
* is installed on the device. In the unlikely case of there being
Expand Down
2 changes: 1 addition & 1 deletion core/java/android/content/pm/RegisteredServicesCache.java
Expand Up @@ -251,7 +251,7 @@ private boolean inSystemImage(int callerUid) {
return false;
}

void generateServicesMap() {
public void generateServicesMap() {
PackageManager pm = mContext.getPackageManager();
ArrayList<ServiceInfo<V>> serviceInfos = new ArrayList<ServiceInfo<V>>();
List<ResolveInfo> resolveInfos = pm.queryIntentServices(new Intent(mInterfaceName),
Expand Down
12 changes: 6 additions & 6 deletions core/java/android/content/res/Resources.java
Expand Up @@ -1120,8 +1120,8 @@ public void setTo(Theme other) {
* Return a StyledAttributes holding the values defined by
* <var>Theme</var> which are listed in <var>attrs</var>.
*
* <p>Be sure to call StyledAttributes.recycle() when you are done with
* the array.
* <p>Be sure to call {@link TypedArray#recycle() TypedArray.recycle()} when you are done
* with the array.
*
* @param attrs The desired attributes.
*
Expand All @@ -1148,8 +1148,8 @@ public TypedArray obtainStyledAttributes(int[] attrs) {
* Return a StyledAttributes holding the values defined by the style
* resource <var>resid</var> which are listed in <var>attrs</var>.
*
* <p>Be sure to call StyledAttributes.recycle() when you are done with
* the array.
* <p>Be sure to call {@link TypedArray#recycle() TypedArray.recycle()} when you are done
* with the array.
*
* @param resid The desired style resource.
* @param attrs The desired attributes in the style.
Expand Down Expand Up @@ -1208,8 +1208,8 @@ public TypedArray obtainStyledAttributes(int resid, int[] attrs)
* AttributeSet specifies a style class (through the "style" attribute),
* that style will be applied on top of the base attributes it defines.
*
* <p>Be sure to call StyledAttributes.recycle() when you are done with
* the array.
* <p>Be sure to call {@link TypedArray#recycle() TypedArray.recycle()} when you are done
* with the array.
*
* <p>When determining the final value of a particular attribute, there
* are four inputs that come into play:</p>
Expand Down
2 changes: 1 addition & 1 deletion core/java/android/content/res/TypedArray.java
Expand Up @@ -684,7 +684,7 @@ public String getPositionDescription() {
}

/**
* Give back a previously retrieved StyledAttributes, for later re-use.
* Give back a previously retrieved array, for later re-use.
*/
public void recycle() {
synchronized (mResources.mTmpValue) {
Expand Down
2 changes: 1 addition & 1 deletion core/java/android/hardware/usb/UsbManager.java
Expand Up @@ -257,7 +257,7 @@ public HashMap<String,UsbDevice> getDeviceList() {
* data using {@link android.hardware.usb.UsbRequest}.
*
* @param device the device to open
* @return true if we successfully opened the device
* @return a {@link UsbDeviceConnection}, or {@code null} if open failed
*/
public UsbDeviceConnection openDevice(UsbDevice device) {
try {
Expand Down
2 changes: 1 addition & 1 deletion core/java/android/net/DummyDataStateTracker.java
Expand Up @@ -123,7 +123,7 @@ public boolean teardown() {
* Record the detailed state of a network, and if it is a
* change from the previous state, send a notification to
* any listeners.
* @param state the new @{code DetailedState}
* @param state the new {@code DetailedState}
* @param reason a {@code String} indicating a reason for the state change,
* if one was supplied. May be {@code null}.
* @param extraInfo optional {@code String} providing extra information about the state change
Expand Down
2 changes: 1 addition & 1 deletion core/java/android/net/MobileDataStateTracker.java
Expand Up @@ -389,7 +389,7 @@ public boolean teardown() {
* Record the detailed state of a network, and if it is a
* change from the previous state, send a notification to
* any listeners.
* @param state the new @{code DetailedState}
* @param state the new {@code DetailedState}
* @param reason a {@code String} indicating a reason for the state change,
* if one was supplied. May be {@code null}.
* @param extraInfo optional {@code String} providing extra information about the state change
Expand Down
2 changes: 1 addition & 1 deletion core/java/android/nfc/NdefRecord.java
Expand Up @@ -70,7 +70,7 @@
* indicate location with an NDEF message, provide support for chunking of
* NDEF records, and to pack optional fields. This class does not expose
* those details. To write an NDEF Record as binary you must first put it
* into an @{link NdefMessage}, then call {@link NdefMessage#toByteArray()}.
* into an {@link NdefMessage}, then call {@link NdefMessage#toByteArray()}.
* <p class="note">
* {@link NdefMessage} and {@link NdefRecord} implementations are
* always available, even on Android devices that do not have NFC hardware.
Expand Down
2 changes: 1 addition & 1 deletion core/java/android/os/Binder.java
Expand Up @@ -32,7 +32,7 @@
* the standard support creating a local implementation of such an object.
*
* <p>Most developers will not implement this class directly, instead using the
* <a href="{@docRoot}guide/developing/tools/aidl.html">aidl</a> tool to describe the desired
* <a href="{@docRoot}guide/components/aidl.html">aidl</a> tool to describe the desired
* interface, having it generate the appropriate Binder subclass. You can,
* however, derive directly from Binder to implement your own custom RPC
* protocol or simply instantiate a raw Binder object directly to use as a
Expand Down
2 changes: 1 addition & 1 deletion core/java/android/os/storage/StorageManager.java
Expand Up @@ -289,7 +289,7 @@ void sendStorageStateChanged(String path, String oldState, String newState) {
* Constructs a StorageManager object through which an application can
* can communicate with the systems mount service.
*
* @param tgtLooper The {@android.os.Looper} which events will be received on.
* @param tgtLooper The {@link android.os.Looper} which events will be received on.
*
* <p>Applications can get instance of this class by calling
* {@link android.content.Context#getSystemService(java.lang.String)} with an argument
Expand Down
7 changes: 7 additions & 0 deletions core/java/android/preference/Preference.java
Expand Up @@ -55,6 +55,13 @@
* {@link SharedPreferences}. It is up to the subclass to decide how to store
* the value.
*
* <div class="special reference">
* <h3>Developer Guides</h3>
* <p>For information about building a settings UI with Preferences,
* read the <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>
* guide.</p>
* </div>
*
* @attr ref android.R.styleable#Preference_icon
* @attr ref android.R.styleable#Preference_key
* @attr ref android.R.styleable#Preference_title
Expand Down
7 changes: 7 additions & 0 deletions core/java/android/preference/PreferenceActivity.java
Expand Up @@ -84,6 +84,13 @@
* items. Doing this implicitly switches the class into its new "headers
* + fragments" mode rather than the old style of just showing a single
* preferences list.
*
* <div class="special reference">
* <h3>Developer Guides</h3>
* <p>For information about using {@code PreferenceActivity},
* read the <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>
* guide.</p>
* </div>
*
* <a name="SampleCode"></a>
* <h3>Sample Code</h3>
Expand Down
7 changes: 7 additions & 0 deletions core/java/android/preference/PreferenceCategory.java
Expand Up @@ -24,6 +24,13 @@
/**
* Used to group {@link Preference} objects
* and provide a disabled title above the group.
*
* <div class="special reference">
* <h3>Developer Guides</h3>
* <p>For information about building a settings UI with Preferences,
* read the <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>
* guide.</p>
* </div>
*/
public class PreferenceCategory extends PreferenceGroup {
private static final String TAG = "PreferenceCategory";
Expand Down

0 comments on commit 1119998

Please sign in to comment.