summaryrefslogtreecommitdiff
path: root/core/java/android/app/ApplicationThreadNative.java
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2013-12-19 14:49:36 +0000
committerNarayan Kamath <narayan@google.com>2014-03-07 13:48:04 +0000
commit27ad525c7e91bde38d6c9e3e67ab38b97eb7eed0 (patch)
treedec1f3dbb92932fd36b4f947aa2867ad0ef0ab9e /core/java/android/app/ApplicationThreadNative.java
parent29e55bef771ee1453017fbf73bb4de62d356e4fc (diff)
Inform libcore of time format pref. changes.
- Introduce a boolean extra for intent TIME_CHANGED that specifies if the user wants a 24 hour format or not. - Have the ActivityManagerService inform running processes of changes to this preference. - Add plumbing in ActivityThread to inform j.t.DateFormat Change-Id: I05fafb903ae54e39c03a048b7a219dc5a93fd472
Diffstat (limited to 'core/java/android/app/ApplicationThreadNative.java')
-rw-r--r--core/java/android/app/ApplicationThreadNative.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java
index 347d43f63a69..cb453e22a037 100644
--- a/core/java/android/app/ApplicationThreadNative.java
+++ b/core/java/android/app/ApplicationThreadNative.java
@@ -627,6 +627,15 @@ public abstract class ApplicationThreadNative extends Binder
reply.writeNoException();
return true;
}
+
+ case UPDATE_TIME_PREFS_TRANSACTION:
+ {
+ data.enforceInterface(IApplicationThread.descriptor);
+ byte is24Hour = data.readByte();
+ updateTimePrefs(is24Hour == (byte) 1);
+ reply.writeNoException();
+ return true;
+ }
}
return super.onTransact(code, data, reply, flags);
@@ -1266,4 +1275,13 @@ class ApplicationThreadProxy implements IApplicationThread {
mRemote.transact(SCHEDULE_INSTALL_PROVIDER_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
data.recycle();
}
+
+ @Override
+ public void updateTimePrefs(boolean is24Hour) throws RemoteException {
+ Parcel data = Parcel.obtain();
+ data.writeInterfaceToken(IApplicationThread.descriptor);
+ data.writeByte(is24Hour ? (byte) 1 : (byte) 0);
+ mRemote.transact(UPDATE_TIME_PREFS_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
+ data.recycle();
+ }
}